[PATCH 1/7] alpha: Remove the unused non-atomic local_t functions
From: Jerome Marchand
Date: Mon Oct 26 2026 - 07:21:16 EST
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 <jmarchan@xxxxxxxxxx>
---
arch/alpha/include/asm/local.h | 6 ------
1 file changed, 6 deletions(-)
diff --git a/arch/alpha/include/asm/local.h b/arch/alpha/include/asm/local.h
index 88eb398947a5b..1578c76adda62 100644
--- a/arch/alpha/include/asm/local.h
+++ b/arch/alpha/include/asm/local.h
@@ -100,10 +100,4 @@ local_add_unless(local_t *l, long a, long u)
#define local_dec_and_test(l) (local_sub_return(1, (l)) == 0)
-/* Verify if faster than atomic ops */
-#define __local_inc(l) ((l)->a.counter++)
-#define __local_dec(l) ((l)->a.counter++)
-#define __local_add(i,l) ((l)->a.counter+=(i))
-#define __local_sub(i,l) ((l)->a.counter-=(i))
-
#endif /* _ALPHA_LOCAL_H */
--
2.56.0