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

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/

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