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 12:53:51PM -0700, Linus Torvalds wrote:
>
>
> On Wed, 15 Sep 2004, Greg KH wrote:
> >
> > Currently a few drivers do:
> > status = readl(&regs.status);
>
> I assume that's "&regs->status", since regs had better be a pointer..

Yes, sorry.

> > 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()?
>
> Just make sure that you annotate "regs" as a pointer to IO space.

Ah, ok, that works. Thanks for the clarification, I now realize that
__iomem can be a marker for any type of pointer, not just a void.
That's where I was confused.

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.045 / U:0.420 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site