Skip to contentSkip to conversation

bogus __clear_bit macro

Linux-ia64 Chen, Kenneth W 2 participants 2 messages Mar 11, 2003

lore
Share & tools
lore
#0 lore raw

David,

It looks like when __clear_bit() was implemented, the deletion of the macro falls through the crack. This macro prohibit the actual __clear_bit to be invoked.

asm-ia64/bitops.h renamed from asm-ia64/bitops.h- +0 -2
@@ -450,8 +450,6 @@
 
 #ifdef __KERNEL__
 
-#define __clear_bit(nr, addr)        clear_bit(nr, addr)
-
 #define ext2_set_bit                 test_and_set_bit
 #define ext2_clear_bit               test_and_clear_bit
 #define ext2_test_bit                test_bit
#1 lore raw
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Kenneth" = Kenneth W Chen <Chen> writes:

Kenneth> David,
Kenneth> It looks like when __clear_bit() was implemented, the deletion of the macro falls through the crack. This macro prohibit the actual __clear_bit to be invoked.

While you're fixing bitops.h, making test_bit take a const qualified arg will kill some warnings in reiserfs...

include/asm-ia64/bitops.h 2003-03-12 09:17:53.000000000 +1100 renamed from tmp/geta24522 2003-03-12 09:19:31.000000000 +1100 +1 -1
@@ -275,7 +275,7 @@
 }
 
 static __inline__ int
-test_bit (int nr, volatile void *addr)
+test_bit (int nr, const volatile void *addr)
 {
	return 1 & (((const volatile __u32 *) addr)[nr >> 5] >> (nr & 31));

}