Re: [RFC][PATCH 27/31] locking: Remove linux/atomic.h:atomic_fetch_or

From: Will Deacon
Date: Fri Apr 22 2016 - 09:03:12 EST


On Fri, Apr 22, 2016 at 11:04:40AM +0200, Peter Zijlstra wrote:
> Since all architectures have this implemented natively, remove this
> now dead code.
>
>
>
>
>
> Signed-off-by: Peter Zijlstra (Intel) <peterz@xxxxxxxxxxxxx>
> ---
> arch/alpha/include/asm/atomic.h | 2 --
> arch/arc/include/asm/atomic.h | 2 --
> arch/arm/include/asm/atomic.h | 2 --
> arch/arm64/include/asm/atomic.h | 2 --
> arch/avr32/include/asm/atomic.h | 2 --
> arch/frv/include/asm/atomic.h | 2 --
> arch/h8300/include/asm/atomic.h | 2 --
> arch/hexagon/include/asm/atomic.h | 2 --
> arch/m32r/include/asm/atomic.h | 2 --
> arch/m68k/include/asm/atomic.h | 2 --
> arch/metag/include/asm/atomic.h | 2 --
> arch/mips/include/asm/atomic.h | 2 --
> arch/mn10300/include/asm/atomic.h | 2 --
> arch/parisc/include/asm/atomic.h | 2 --
> arch/s390/include/asm/atomic.h | 2 --
> arch/sh/include/asm/atomic.h | 2 --
> arch/sparc/include/asm/atomic.h | 1 -
> arch/sparc/include/asm/atomic_32.h | 2 --
> arch/tile/include/asm/atomic.h | 2 --
> arch/x86/include/asm/atomic.h | 2 --
> arch/xtensa/include/asm/atomic.h | 2 --
> include/asm-generic/atomic.h | 2 --
> include/linux/atomic.h | 21 ---------------------
> 23 files changed, 64 deletions(-)
>
> --- a/arch/alpha/include/asm/atomic.h
> +++ b/arch/alpha/include/asm/atomic.h
> @@ -155,8 +155,6 @@ ATOMIC_OPS(sub)
> #define atomic_andnot atomic_andnot
> #define atomic64_andnot atomic64_andnot
>
> -#define atomic_fetch_or atomic_fetch_or
> -
> #undef ATOMIC_OPS
> #define ATOMIC_OPS(op, asm) \
> ATOMIC_OP(op, asm) \
> --- a/arch/arc/include/asm/atomic.h
> +++ b/arch/arc/include/asm/atomic.h
> @@ -226,8 +226,6 @@ ATOMIC_OPS(sub, -=, sub)
>
> #define atomic_andnot atomic_andnot
>
> -#define atomic_fetch_or atomic_fetch_or
> -
> #undef ATOMIC_OPS
> #define ATOMIC_OPS(op, c_op, asm_op) \
> ATOMIC_OP(op, c_op, asm_op) \
> --- a/arch/arm/include/asm/atomic.h
> +++ b/arch/arm/include/asm/atomic.h
> @@ -237,8 +237,6 @@ ATOMIC_OPS(sub, -=, sub)
>
> #define atomic_andnot atomic_andnot
>
> -#define atomic_fetch_or atomic_fetch_or
> -
> #undef ATOMIC_OPS
> #define ATOMIC_OPS(op, c_op, asm_op) \
> ATOMIC_OP(op, c_op, asm_op) \
> --- a/arch/arm64/include/asm/atomic.h
> +++ b/arch/arm64/include/asm/atomic.h
> @@ -128,8 +128,6 @@
> #define __atomic_add_unless(v, a, u) ___atomic_add_unless(v, a, u,)
> #define atomic_andnot atomic_andnot
>
> -#define atomic_fetch_or atomic_fetch_or

For some reason, you added this twice to our atomic.h, so there's still
one left after this patch.

Will