Re: [RFC PATCH] x86: Use ACCESS_ONCE() for atomic_read()

From: Pranith Kumar
Date: Mon Sep 22 2014 - 16:20:43 EST


On Mon, Sep 22, 2014 at 4:07 PM, Peter Zijlstra <peterz@xxxxxxxxxxxxx> wrote:
> On Mon, Sep 22, 2014 at 03:53:09PM -0400, Pranith Kumar wrote:
>> Use the much easier to read ACCESS_ONCE() which is basically the same thing as
>> the cast to volatile.
>>
>> Please note the change in volatile cast: ACCESS_ONCE(v)->counter to
>> ACCESS_ONCE(v->counter).
>>
>> Signed-off-by: Pranith Kumar <bobby.prani@xxxxxxxxx>
>> ---
>> arch/x86/include/asm/atomic.h | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> If you want to do something like so, then be consistent and do them all.

Sure, I will change this in all architectures and send in an updated patch.

Thanks!
--
Pranith
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/