Re: [PATCH] percpu: fix generic definition of__this_cpu_add_and_return()

From: Christoph Lameter
Date: Fri Feb 24 2012 - 10:43:16 EST


On Fri, 24 Feb 2012, Torsten Kaiser wrote:

> >  #define __this_cpu_sub_return(pcp, val)        this_cpu_add_return(pcp, -(val))
>
> I think, the same fix should be applied to the lines following this patch:
> #define __this_cpu_sub_return(pcp, val) this_cpu_add_return(pcp, -(val))
> #define __this_cpu_inc_return(pcp) this_cpu_add_return(pcp, 1)
> #define __this_cpu_dec_return(pcp) this_cpu_add_return(pcp, -1)
>
> Shouldn't these other operations also only give the __ relaxed guarantees?
Yes indeed that should also be fixed.