While working on a fix for a tracing soft lockup, it came to my attention that __local_dec() was broken on ppc64 and other arches (it actually increment the value). My first instinct was to fix it but the fact that this function was utterly broken for so long, decades for some arches makes me thing that those functions have not been used for a long time, if ever.
Anyway, they're not used now, so remove them. Signed-off-by: Jerome Marchand <[email protected]> --- include/asm-generic/local.h | 7 ------- 1 file changed, 7 deletions(-) diff --git a/include/asm-generic/local.h b/include/asm-generic/local.h index 7f97018df66fe..4bb458b57d470 100644 --- a/include/asm-generic/local.h +++ b/include/asm-generic/local.h @@ -47,11 +47,4 @@ typedef struct #define local_add_unless(l, _a, u) atomic_long_add_unless((&(l)->a), (_a), (u)) #define local_inc_not_zero(l) atomic_long_inc_not_zero(&(l)->a) -/* Non-atomic variants, ie. preemption disabled and won't be touched - * in interrupt, etc. Some archs can optimize this case well. */ -#define __local_inc(l) local_set((l), local_read(l) + 1) -#define __local_dec(l) local_set((l), local_read(l) - 1) -#define __local_add(i,l) local_set((l), local_read(l) + (i)) -#define __local_sub(i,l) local_set((l), local_read(l) - (i)) - #endif /* _ASM_GENERIC_LOCAL_H */ -- 2.56.0
