Messages in this thread | | | Date | Wed, 15 Sep 2004 13:06:29 -0700 | From | Greg KH <> | Subject | Re: 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(®s.status); > > I assume that's "®s->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/
| |