diff options
Diffstat (limited to 'include/linux/bitops.h')
-rw-r--r-- | include/linux/bitops.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/bitops.h b/include/linux/bitops.h index 638165f571da..b9fb8ee3308b 100644 --- a/include/linux/bitops.h +++ b/include/linux/bitops.h | |||
@@ -8,6 +8,12 @@ | |||
8 | */ | 8 | */ |
9 | #include <asm/bitops.h> | 9 | #include <asm/bitops.h> |
10 | 10 | ||
11 | #define for_each_bit(bit, addr, size) \ | ||
12 | for ((bit) = find_first_bit((addr), (size)); \ | ||
13 | (bit) < (size); \ | ||
14 | (bit) = find_next_bit((addr), (size), (bit) + 1)) | ||
15 | |||
16 | |||
11 | static __inline__ int get_bitmask_order(unsigned int count) | 17 | static __inline__ int get_bitmask_order(unsigned int count) |
12 | { | 18 | { |
13 | int order; | 19 | int order; |