Fwd: Need guidance regarding fixing styleguide error in rtl871x_pwrctrl.h

Jeffrey Walton noloader at gmail.com
Wed Feb 9 15:49:37 EST 2022


On Wed, Feb 9, 2022 at 11:36 AM Valdis Klētnieks
<valdis.kletnieks at vt.edu> wrote:
> ...
> It turns out that the C keyword 'volatile' usually doesn't actually do what
> needs to happen if a variable actually *is* volatile and subject to change
> while the executing thread isn't looking.
>
> There's a good documentation file on this:
>
> Documentation/process/volatile-considered-harmful.rst

Also see Ian Lance Taylor's https://www.airs.com/blog/archives/154.
He's a GCC dev, and he explains how GCC interprets the keyword.

Jeff



More information about the Kernelnewbies mailing list