Messages in this thread | | | Date | Fri, 4 Dec 2009 20:54:41 +0100 (CET) | Subject | Re: x86: Is 'volatile' necessary for readb/writeb and friends? | From | "Segher Boessenkool" <> |
| |
>>> static inline unsigned char readb(const volatile void __iomem *addr) { >> >> This "volatile" is meaningless. > > Wrong. "volatile" here is an assertion that it is safe to pass pointer > to a volatile object to this function.
Yes, sorry. What I meant is: this volatile has no effect on what the rest of the function does.
> Either way, it works, it is guaranteed to be safe, and removing it can > only introduce bugs, not remove them.
Oh definitely, I wasn't suggesting otherwise.
Segher
| |