x86/bitops: Remove CONST_ADDR

All this does is obfuscate the usage sites.

No functional change.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Teddy Astie <teddy.astie@vates.tech>
This commit is contained in:
Andrew Cooper committed 2026-09-02 21:44:30 +01:00
1 parent 9b24af44e5
commit cdeace021b
1 file changed
+3 -2
+3 -2
View File
@@ -18,7 +18,6 @@
*/
#define ADDR (*(volatile int *) addr)
#define CONST_ADDR (*(const volatile int *) addr)
/**
* set_bit - Atomically set a bit in memory
@@ -285,7 +284,9 @@ static inline int variable_test_bit(int nr, const volatile void *addr)
asm volatile ( "btl %[nr], %[addr]\n\t"
ASM_FLAG_OUT(, "sbbl %[old], %[old]\n\t")
: [old] ASM_FLAG_OUT("=@ccc", "=r") (oldbit)
: [addr] "m" (CONST_ADDR), [nr] "Ir" (nr) : "memory" );
: [addr] "m" (*(const volatile int *)addr),
[nr] "Ir" (nr)
: "memory" );
return oldbit;
}
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.