Thread (5 messages) 5 messages, 3 authors, 2007-08-23

Re: [PATCH 8/9] define global BIT macro

From: Randy Dunlap <hidden>
Date: 2007-08-18 16:42:57
Also in: linux-input, linux-mips, linux-scsi, linux-wireless, lkml

On Sat, 18 Aug 2007 11:44:12 +0200 (CEST) Jiri Slaby wrote:
quoted hunk ↗ jump to hunk
define global BIT macro

move all local BIT defines to the new globally define macro.

Signed-off-by: Jiri Slaby <redacted>

---

 include/linux/bitops.h                      |    1 +
 include/video/sstfb.h                       |    1 -
 include/video/tdfx.h                        |    2 --
 net/mac80211/ieee80211_i.h                  |    2 --
 18 files changed, 1 insertions(+), 37 deletions(-)
diff --git a/include/linux/bitops.h b/include/linux/bitops.h
index 3255b06..a57b81f 100644
--- a/include/linux/bitops.h
+++ b/include/linux/bitops.h
@@ -3,6 +3,7 @@
 #include <asm/types.h>
 
 #ifdef	__KERNEL__
+#define BIT(nr)			(1UL << (nr))
 #define BIT_MASK(nr)		(1UL << ((nr) % BITS_PER_LONG))
 #define BIT_WORD(nr)		((nr) / BITS_PER_LONG)
 #define BITS_TO_TYPE(nr, t)	(((nr)+(t)-1)/(t))

So users of the BIT() macro in include/linux/input.h can be
changed to use the global BIT_MASK() macro...
and the former can be removed.

---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help