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 | |
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>
-rw-r--r-- | arch/ppc/platforms/chestnut.c | 1 | ||||
-rw-r--r-- | drivers/edac/edac_core.h | 2 | ||||
-rw-r--r-- | drivers/firmware/dcdbas.h | 2 | ||||
-rw-r--r-- | drivers/input/serio/maceps2.c | 2 | ||||
-rw-r--r-- | drivers/net/eth16i.c | 1 | ||||
-rw-r--r-- | drivers/net/meth.h | 3 | ||||
-rw-r--r-- | drivers/net/wireless/hostap/hostap_common.h | 3 | ||||
-rw-r--r-- | drivers/scsi/FlashPoint.c | 1 | ||||
-rw-r--r-- | drivers/scsi/nsp32.h | 5 | ||||
-rw-r--r-- | drivers/scsi/pcmcia/nsp_cs.h | 1 | ||||
-rw-r--r-- | drivers/video/pnx4008/sdum.h | 3 | ||||
-rw-r--r-- | include/asm-arm/arch-ixp4xx/io.h | 3 | ||||
-rw-r--r-- | include/asm-mips/ip32/crime.h | 3 | ||||
-rw-r--r-- | include/asm-mips/ip32/mace.h | 3 | ||||
-rw-r--r-- | include/linux/bitops.h | 1 | ||||
-rw-r--r-- | include/video/sstfb.h | 1 | ||||
-rw-r--r-- | include/video/tdfx.h | 2 | ||||
-rw-r--r-- | net/mac80211/ieee80211_i.h | 2 |
18 files changed, 1 insertions, 38 deletions
diff --git a/arch/ppc/platforms/chestnut.c b/arch/ppc/platforms/chestnut.c index 248684f50dd9..dcd6070b85eb 100644 --- a/arch/ppc/platforms/chestnut.c +++ b/arch/ppc/platforms/chestnut.c | |||
@@ -49,7 +49,6 @@ extern void gen550_progress(char *, unsigned short); | |||
49 | extern void gen550_init(int, struct uart_port *); | 49 | extern void gen550_init(int, struct uart_port *); |
50 | extern void mv64360_pcibios_fixup(mv64x60_handle_t *bh); | 50 | extern void mv64360_pcibios_fixup(mv64x60_handle_t *bh); |
51 | 51 | ||
52 | #define BIT(x) (1<<x) | ||
53 | #define CHESTNUT_PRESERVE_MASK (BIT(MV64x60_CPU2DEV_0_WIN) | \ | 52 | #define CHESTNUT_PRESERVE_MASK (BIT(MV64x60_CPU2DEV_0_WIN) | \ |
54 | BIT(MV64x60_CPU2DEV_1_WIN) | \ | 53 | BIT(MV64x60_CPU2DEV_1_WIN) | \ |
55 | BIT(MV64x60_CPU2DEV_2_WIN) | \ | 54 | BIT(MV64x60_CPU2DEV_2_WIN) | \ |
diff --git a/drivers/edac/edac_core.h b/drivers/edac/edac_core.h index e80af67664cc..2d23e304f5ec 100644 --- a/drivers/edac/edac_core.h +++ b/drivers/edac/edac_core.h | |||
@@ -94,8 +94,6 @@ extern int edac_debug_level; | |||
94 | 94 | ||
95 | #endif /* !CONFIG_EDAC_DEBUG */ | 95 | #endif /* !CONFIG_EDAC_DEBUG */ |
96 | 96 | ||
97 | #define BIT(x) (1 << (x)) | ||
98 | |||
99 | #define PCI_VEND_DEV(vend, dev) PCI_VENDOR_ID_ ## vend, \ | 97 | #define PCI_VEND_DEV(vend, dev) PCI_VENDOR_ID_ ## vend, \ |
100 | PCI_DEVICE_ID_ ## vend ## _ ## dev | 98 | PCI_DEVICE_ID_ ## vend ## _ ## dev |
101 | 99 | ||
diff --git a/drivers/firmware/dcdbas.h b/drivers/firmware/dcdbas.h index 8960cad3d022..87bc3417de27 100644 --- a/drivers/firmware/dcdbas.h +++ b/drivers/firmware/dcdbas.h | |||
@@ -20,8 +20,6 @@ | |||
20 | #include <linux/sysfs.h> | 20 | #include <linux/sysfs.h> |
21 | #include <linux/types.h> | 21 | #include <linux/types.h> |
22 | 22 | ||
23 | #define BIT(x) (1UL << x) | ||
24 | |||
25 | #define MAX_SMI_DATA_BUF_SIZE (256 * 1024) | 23 | #define MAX_SMI_DATA_BUF_SIZE (256 * 1024) |
26 | 24 | ||
27 | #define HC_ACTION_NONE (0) | 25 | #define HC_ACTION_NONE (0) |
diff --git a/drivers/input/serio/maceps2.c b/drivers/input/serio/maceps2.c index 5a41b8f7f888..558200e96d0f 100644 --- a/drivers/input/serio/maceps2.c +++ b/drivers/input/serio/maceps2.c | |||
@@ -31,8 +31,6 @@ MODULE_LICENSE("GPL"); | |||
31 | 31 | ||
32 | #define MACE_PS2_TIMEOUT 10000 /* in 50us unit */ | 32 | #define MACE_PS2_TIMEOUT 10000 /* in 50us unit */ |
33 | 33 | ||
34 | #define BIT(x) (1UL << (x)) | ||
35 | |||
36 | #define PS2_STATUS_CLOCK_SIGNAL BIT(0) /* external clock signal */ | 34 | #define PS2_STATUS_CLOCK_SIGNAL BIT(0) /* external clock signal */ |
37 | #define PS2_STATUS_CLOCK_INHIBIT BIT(1) /* clken output signal */ | 35 | #define PS2_STATUS_CLOCK_INHIBIT BIT(1) /* clken output signal */ |
38 | #define PS2_STATUS_TX_INPROGRESS BIT(2) /* transmission in progress */ | 36 | #define PS2_STATUS_TX_INPROGRESS BIT(2) /* transmission in progress */ |
diff --git a/drivers/net/eth16i.c b/drivers/net/eth16i.c index 243fc6b354b5..e3dd8b136908 100644 --- a/drivers/net/eth16i.c +++ b/drivers/net/eth16i.c | |||
@@ -170,7 +170,6 @@ static char *version = | |||
170 | 170 | ||
171 | 171 | ||
172 | /* Few macros */ | 172 | /* Few macros */ |
173 | #define BIT(a) ( (1 << (a)) ) | ||
174 | #define BITSET(ioaddr, bnum) ((outb(((inb(ioaddr)) | (bnum)), ioaddr))) | 173 | #define BITSET(ioaddr, bnum) ((outb(((inb(ioaddr)) | (bnum)), ioaddr))) |
175 | #define BITCLR(ioaddr, bnum) ((outb(((inb(ioaddr)) & (~(bnum))), ioaddr))) | 174 | #define BITCLR(ioaddr, bnum) ((outb(((inb(ioaddr)) & (~(bnum))), ioaddr))) |
176 | 175 | ||
diff --git a/drivers/net/meth.h b/drivers/net/meth.h index ea3b8fc86d1e..a78dc1ca8c29 100644 --- a/drivers/net/meth.h +++ b/drivers/net/meth.h | |||
@@ -28,9 +28,6 @@ | |||
28 | #define RX_BUFFER_OFFSET (sizeof(rx_status_vector)+2) /* staus vector + 2 bytes of padding */ | 28 | #define RX_BUFFER_OFFSET (sizeof(rx_status_vector)+2) /* staus vector + 2 bytes of padding */ |
29 | #define RX_BUCKET_SIZE 256 | 29 | #define RX_BUCKET_SIZE 256 |
30 | 30 | ||
31 | #undef BIT | ||
32 | #define BIT(x) (1UL << (x)) | ||
33 | |||
34 | /* For more detailed explanations of what each field menas, | 31 | /* For more detailed explanations of what each field menas, |
35 | see Nick's great comments to #defines below (or docs, if | 32 | see Nick's great comments to #defines below (or docs, if |
36 | you are lucky enough toget hold of them :)*/ | 33 | you are lucky enough toget hold of them :)*/ |
diff --git a/drivers/net/wireless/hostap/hostap_common.h b/drivers/net/wireless/hostap/hostap_common.h index ceb7f1e5e9e0..517f89845144 100644 --- a/drivers/net/wireless/hostap/hostap_common.h +++ b/drivers/net/wireless/hostap/hostap_common.h | |||
@@ -4,9 +4,6 @@ | |||
4 | #include <linux/types.h> | 4 | #include <linux/types.h> |
5 | #include <linux/if_ether.h> | 5 | #include <linux/if_ether.h> |
6 | 6 | ||
7 | #define BIT(x) (1 << (x)) | ||
8 | |||
9 | |||
10 | /* IEEE 802.11 defines */ | 7 | /* IEEE 802.11 defines */ |
11 | 8 | ||
12 | /* Information Element IDs */ | 9 | /* Information Element IDs */ |
diff --git a/drivers/scsi/FlashPoint.c b/drivers/scsi/FlashPoint.c index a7f916c0c9cd..cf549ffe4baa 100644 --- a/drivers/scsi/FlashPoint.c +++ b/drivers/scsi/FlashPoint.c | |||
@@ -25,7 +25,6 @@ | |||
25 | 25 | ||
26 | #define FAILURE 0xFFFFFFFFL | 26 | #define FAILURE 0xFFFFFFFFL |
27 | 27 | ||
28 | #define BIT(x) ((unsigned char)(1<<(x))) /* single-bit mask in bit position x */ | ||
29 | #define BITW(x) ((unsigned short)(1<<(x))) /* single-bit mask in bit position x */ | 28 | #define BITW(x) ((unsigned short)(1<<(x))) /* single-bit mask in bit position x */ |
30 | 29 | ||
31 | struct sccb; | 30 | struct sccb; |
diff --git a/drivers/scsi/nsp32.h b/drivers/scsi/nsp32.h index a976e8193d16..6715ecb3bfca 100644 --- a/drivers/scsi/nsp32.h +++ b/drivers/scsi/nsp32.h | |||
@@ -69,11 +69,6 @@ typedef u32 u32_le; | |||
69 | typedef u16 u16_le; | 69 | typedef u16 u16_le; |
70 | 70 | ||
71 | /* | 71 | /* |
72 | * MACRO | ||
73 | */ | ||
74 | #define BIT(x) (1UL << (x)) | ||
75 | |||
76 | /* | ||
77 | * BASIC Definitions | 72 | * BASIC Definitions |
78 | */ | 73 | */ |
79 | #ifndef TRUE | 74 | #ifndef TRUE |
diff --git a/drivers/scsi/pcmcia/nsp_cs.h b/drivers/scsi/pcmcia/nsp_cs.h index b7f0fa246413..98397559c53b 100644 --- a/drivers/scsi/pcmcia/nsp_cs.h +++ b/drivers/scsi/pcmcia/nsp_cs.h | |||
@@ -24,7 +24,6 @@ | |||
24 | /************************************ | 24 | /************************************ |
25 | * Some useful macros... | 25 | * Some useful macros... |
26 | */ | 26 | */ |
27 | #define BIT(x) (1L << (x)) | ||
28 | 27 | ||
29 | /* SCSI initiator must be ID 7 */ | 28 | /* SCSI initiator must be ID 7 */ |
30 | #define NSP_INITIATOR_ID 7 | 29 | #define NSP_INITIATOR_ID 7 |
diff --git a/drivers/video/pnx4008/sdum.h b/drivers/video/pnx4008/sdum.h index e8c5dcdd8813..189c3d641383 100644 --- a/drivers/video/pnx4008/sdum.h +++ b/drivers/video/pnx4008/sdum.h | |||
@@ -77,9 +77,6 @@ | |||
77 | #define CONF_DIRTYDETECTION_OFF (0x600) | 77 | #define CONF_DIRTYDETECTION_OFF (0x600) |
78 | #define CONF_DIRTYDETECTION_ON (0x601) | 78 | #define CONF_DIRTYDETECTION_ON (0x601) |
79 | 79 | ||
80 | /* Set the corresponding bit. */ | ||
81 | #define BIT(n) (0x1U << (n)) | ||
82 | |||
83 | struct dumchannel_uf { | 80 | struct dumchannel_uf { |
84 | int channelnr; | 81 | int channelnr; |
85 | u32 *dirty; | 82 | u32 *dirty; |
diff --git a/include/asm-arm/arch-ixp4xx/io.h b/include/asm-arm/arch-ixp4xx/io.h index c72f9d79417c..eeeea90cd5a9 100644 --- a/include/asm-arm/arch-ixp4xx/io.h +++ b/include/asm-arm/arch-ixp4xx/io.h | |||
@@ -17,9 +17,6 @@ | |||
17 | 17 | ||
18 | #define IO_SPACE_LIMIT 0xffff0000 | 18 | #define IO_SPACE_LIMIT 0xffff0000 |
19 | 19 | ||
20 | #define BIT(x) ((1)<<(x)) | ||
21 | |||
22 | |||
23 | extern int (*ixp4xx_pci_read)(u32 addr, u32 cmd, u32* data); | 20 | extern int (*ixp4xx_pci_read)(u32 addr, u32 cmd, u32* data); |
24 | extern int ixp4xx_pci_write(u32 addr, u32 cmd, u32 data); | 21 | extern int ixp4xx_pci_write(u32 addr, u32 cmd, u32 data); |
25 | 22 | ||
diff --git a/include/asm-mips/ip32/crime.h b/include/asm-mips/ip32/crime.h index a13702fafa85..7c36b0e5b1c6 100644 --- a/include/asm-mips/ip32/crime.h +++ b/include/asm-mips/ip32/crime.h | |||
@@ -17,9 +17,6 @@ | |||
17 | */ | 17 | */ |
18 | #define CRIME_BASE 0x14000000 /* physical */ | 18 | #define CRIME_BASE 0x14000000 /* physical */ |
19 | 19 | ||
20 | #undef BIT | ||
21 | #define BIT(x) (1UL << (x)) | ||
22 | |||
23 | struct sgi_crime { | 20 | struct sgi_crime { |
24 | volatile unsigned long id; | 21 | volatile unsigned long id; |
25 | #define CRIME_ID_MASK 0xff | 22 | #define CRIME_ID_MASK 0xff |
diff --git a/include/asm-mips/ip32/mace.h b/include/asm-mips/ip32/mace.h index 990082c81f39..d08d7c672139 100644 --- a/include/asm-mips/ip32/mace.h +++ b/include/asm-mips/ip32/mace.h | |||
@@ -17,9 +17,6 @@ | |||
17 | */ | 17 | */ |
18 | #define MACE_BASE 0x1f000000 /* physical */ | 18 | #define MACE_BASE 0x1f000000 /* physical */ |
19 | 19 | ||
20 | #undef BIT | ||
21 | #define BIT(x) (1UL << (x)) | ||
22 | |||
23 | /* | 20 | /* |
24 | * PCI interface | 21 | * PCI interface |
25 | */ | 22 | */ |
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)) |
diff --git a/include/video/sstfb.h b/include/video/sstfb.h index baa163f770ab..b52f07381243 100644 --- a/include/video/sstfb.h +++ b/include/video/sstfb.h | |||
@@ -68,7 +68,6 @@ | |||
68 | # define print_var(X,Y...) | 68 | # define print_var(X,Y...) |
69 | #endif | 69 | #endif |
70 | 70 | ||
71 | #define BIT(x) (1ul<<(x)) | ||
72 | #define POW2(x) (1ul<<(x)) | 71 | #define POW2(x) (1ul<<(x)) |
73 | 72 | ||
74 | /* | 73 | /* |
diff --git a/include/video/tdfx.h b/include/video/tdfx.h index 05b63c2a5abc..7431d9681e57 100644 --- a/include/video/tdfx.h +++ b/include/video/tdfx.h | |||
@@ -79,8 +79,6 @@ | |||
79 | 79 | ||
80 | /* register bitfields (not all, only as needed) */ | 80 | /* register bitfields (not all, only as needed) */ |
81 | 81 | ||
82 | #define BIT(x) (1UL << (x)) | ||
83 | |||
84 | /* COMMAND_2D reg. values */ | 82 | /* COMMAND_2D reg. values */ |
85 | #define TDFX_ROP_COPY 0xcc /* src */ | 83 | #define TDFX_ROP_COPY 0xcc /* src */ |
86 | #define TDFX_ROP_INVERT 0x55 /* NOT dst */ | 84 | #define TDFX_ROP_INVERT 0x55 /* NOT dst */ |
diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h index d34a9deca67a..4b4ed2a5803c 100644 --- a/net/mac80211/ieee80211_i.h +++ b/net/mac80211/ieee80211_i.h | |||
@@ -37,8 +37,6 @@ | |||
37 | 37 | ||
38 | struct ieee80211_local; | 38 | struct ieee80211_local; |
39 | 39 | ||
40 | #define BIT(x) (1 << (x)) | ||
41 | |||
42 | #define IEEE80211_ALIGN32_PAD(a) ((4 - ((a) & 3)) & 3) | 40 | #define IEEE80211_ALIGN32_PAD(a) ((4 - ((a) & 3)) & 3) |
43 | 41 | ||
44 | /* Maximum number of broadcast/multicast frames to buffer when some of the | 42 | /* Maximum number of broadcast/multicast frames to buffer when some of the |