diff options
author | Jiri Slaby <jirislaby@gmail.com> | 2007-10-19 02:40:35 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-19 14:53:42 -0400 |
commit | 93043ece030af58529e3e1367502461d265ab4e2 (patch) | |
tree | 48add1b72e3ebd07866089c88ad6122422f1da55 /include/linux/bitops.h | |
parent | 7b19ada2ed3c1eccb9fe94d74b05e1428224663d (diff) |
define global BIT macro
define global BIT macro
move all local BIT defines to the new globally define macro.
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Kumar Gala <galak@gate.crashing.org>
Cc: Dmitry Torokhov <dtor@mail.ru>
Cc: Jeff Garzik <jeff@garzik.org>
Cc: James Bottomley <James.Bottomley@steeleye.com>
Cc: "Antonino A. Daplas" <adaplas@pol.net>
Cc: Russell King <rmk@arm.linux.org.uk>
Acked-by: Ralf Baechle <ralf@linux-mips.org>
Cc: "John W. Linville" <linville@tuxdriver.com>
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.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/bitops.h b/include/linux/bitops.h index 939e80bdbef7..7fc90d7cd0c9 100644 --- a/include/linux/bitops.h +++ b/include/linux/bitops.h | |||
@@ -3,6 +3,7 @@ | |||
3 | #include <asm/types.h> | 3 | #include <asm/types.h> |
4 | 4 | ||
5 | #ifdef __KERNEL__ | 5 | #ifdef __KERNEL__ |
6 | #define BIT(nr) (1UL << (nr)) | ||
6 | #define BIT_MASK(nr) (1UL << ((nr) % BITS_PER_LONG)) | 7 | #define BIT_MASK(nr) (1UL << ((nr) % BITS_PER_LONG)) |
7 | #define BIT_WORD(nr) ((nr) / BITS_PER_LONG) | 8 | #define BIT_WORD(nr) ((nr) / BITS_PER_LONG) |
8 | #define BITS_TO_TYPE(nr, t) (((nr)+(t)-1)/(t)) | 9 | #define BITS_TO_TYPE(nr, t) (((nr)+(t)-1)/(t)) |