lkml.org 
[lkml]   [2009]   [Dec]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: x86: Is 'volatile' necessary for readb/writeb and friends?
From
>>> 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



\
 
 \ /
  Last update: 2009-12-04 20:57    [W:0.039 / U:0.176 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site