aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/bitops.h
diff options
context:
space:
mode:
authorAkinobu Mita <akinobu.mita@gmail.com>2010-03-05 16:41:37 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2010-03-06 14:26:23 -0500
commit984b3f5746ed2cde3d184651dabf26980f2b66e5 (patch)
tree87dc2162b4778b0075874d9592384530022e15a4 /include/linux/bitops.h
parente3cb91ce1ac1d93a7cc6f81bb5247f7602b572bb (diff)
bitops: rename for_each_bit() to for_each_set_bit()
Rename for_each_bit to for_each_set_bit in the kernel source tree. To permit for_each_clear_bit(), should that ever be added. The patch includes a macro to map the old for_each_bit() onto the new for_each_set_bit(). This is a (very) temporary thing to ease the migration. [akpm@linux-foundation.org: add temporary for_each_bit()] Suggested-by: Alexey Dobriyan <adobriyan@gmail.com> Suggested-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Cc: "David S. Miller" <davem@davemloft.net> Cc: Russell King <rmk@arm.linux.org.uk> Cc: David Woodhouse <dwmw2@infradead.org> Cc: Artem Bityutskiy <dedekind@infradead.org> Cc: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux/bitops.h')
-rw-r--r--include/linux/bitops.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/linux/bitops.h b/include/linux/bitops.h
index 25b8b2f33ae9..b79389879238 100644
--- a/include/linux/bitops.h
+++ b/include/linux/bitops.h
@@ -16,11 +16,13 @@
16 */ 16 */
17#include <asm/bitops.h> 17#include <asm/bitops.h>
18 18
19#define for_each_bit(bit, addr, size) \ 19#define for_each_set_bit(bit, addr, size) \
20 for ((bit) = find_first_bit((addr), (size)); \ 20 for ((bit) = find_first_bit((addr), (size)); \
21 (bit) < (size); \ 21 (bit) < (size); \
22 (bit) = find_next_bit((addr), (size), (bit) + 1)) 22 (bit) = find_next_bit((addr), (size), (bit) + 1))
23 23
24/* Temporary */
25#define for_each_bit(bit, addr, size) for_each_set_bit(bit, addr, size)
24 26
25static __inline__ int get_bitmask_order(unsigned int count) 27static __inline__ int get_bitmask_order(unsigned int count)
26{ 28{