Messages in this thread | | | Date | Wed, 15 Sep 2004 12:34:14 -0700 | From | Greg KH <> | Subject | Re: Being more anal about iospace accesses.. |
| |
On Wed, Sep 15, 2004 at 10:57:25AM -0700, Linus Torvalds wrote: > > So you can absolutely still continue with > > struct mydev_iolayout { > __u32 status; > __u32 irqmask; > ... > > struct mydev_iolayout __iomem *regs = pci_map(...); > status = ioread32(®s.status); > > which is often a lot more readable, and thus in fact _preferred_. It also > adds another level of type-checking, so I applaud drivers that do this.
Currently a few drivers do: status = readl(®s.status); which causes sparse warnings.
How should that code be changed to prevent this? Convert them all to ioread32()? Or figure out a way to supress the warning for readl()?
thanks,
greg k-h - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |