Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Jiri Slaby and committed by
Linus Torvalds
93043ece 7b19ada2

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