[lkml]   [2004]   [Sep]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: 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(&regs.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(&regs.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()?


greg k-h
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 14:06    [W:0.064 / U:3.776 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site