Commit 93043ece authored by Jiri Slaby's avatar Jiri Slaby Committed by Linus Torvalds

define global BIT macro

define global BIT macro

move all local BIT defines to the new globally define macro.
Signed-off-by: default avatarJiri 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: default avatarRalf Baechle <ralf@linux-mips.org>
Cc: "John W. Linville" <linville@tuxdriver.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 7b19ada2
...@@ -49,7 +49,6 @@ extern void gen550_progress(char *, unsigned short); ...@@ -49,7 +49,6 @@ extern void gen550_progress(char *, unsigned short);
extern void gen550_init(int, struct uart_port *); extern void gen550_init(int, struct uart_port *);
extern void mv64360_pcibios_fixup(mv64x60_handle_t *bh); extern void mv64360_pcibios_fixup(mv64x60_handle_t *bh);
#define BIT(x) (1<<x)
#define CHESTNUT_PRESERVE_MASK (BIT(MV64x60_CPU2DEV_0_WIN) | \ #define CHESTNUT_PRESERVE_MASK (BIT(MV64x60_CPU2DEV_0_WIN) | \
BIT(MV64x60_CPU2DEV_1_WIN) | \ BIT(MV64x60_CPU2DEV_1_WIN) | \
BIT(MV64x60_CPU2DEV_2_WIN) | \ BIT(MV64x60_CPU2DEV_2_WIN) | \
......
...@@ -94,8 +94,6 @@ extern int edac_debug_level; ...@@ -94,8 +94,6 @@ extern int edac_debug_level;
#endif /* !CONFIG_EDAC_DEBUG */ #endif /* !CONFIG_EDAC_DEBUG */
#define BIT(x) (1 << (x))
#define PCI_VEND_DEV(vend, dev) PCI_VENDOR_ID_ ## vend, \ #define PCI_VEND_DEV(vend, dev) PCI_VENDOR_ID_ ## vend, \
PCI_DEVICE_ID_ ## vend ## _ ## dev PCI_DEVICE_ID_ ## vend ## _ ## dev
......
...@@ -20,8 +20,6 @@ ...@@ -20,8 +20,6 @@
#include <linux/sysfs.h> #include <linux/sysfs.h>
#include <linux/types.h> #include <linux/types.h>
#define BIT(x) (1UL << x)
#define MAX_SMI_DATA_BUF_SIZE (256 * 1024) #define MAX_SMI_DATA_BUF_SIZE (256 * 1024)
#define HC_ACTION_NONE (0) #define HC_ACTION_NONE (0)
......
...@@ -31,8 +31,6 @@ MODULE_LICENSE("GPL"); ...@@ -31,8 +31,6 @@ MODULE_LICENSE("GPL");
#define MACE_PS2_TIMEOUT 10000 /* in 50us unit */ #define MACE_PS2_TIMEOUT 10000 /* in 50us unit */
#define BIT(x) (1UL << (x))
#define PS2_STATUS_CLOCK_SIGNAL BIT(0) /* external clock signal */ #define PS2_STATUS_CLOCK_SIGNAL BIT(0) /* external clock signal */
#define PS2_STATUS_CLOCK_INHIBIT BIT(1) /* clken output signal */ #define PS2_STATUS_CLOCK_INHIBIT BIT(1) /* clken output signal */
#define PS2_STATUS_TX_INPROGRESS BIT(2) /* transmission in progress */ #define PS2_STATUS_TX_INPROGRESS BIT(2) /* transmission in progress */
......
...@@ -170,7 +170,6 @@ static char *version = ...@@ -170,7 +170,6 @@ static char *version =
/* Few macros */ /* Few macros */
#define BIT(a) ( (1 << (a)) )
#define BITSET(ioaddr, bnum) ((outb(((inb(ioaddr)) | (bnum)), ioaddr))) #define BITSET(ioaddr, bnum) ((outb(((inb(ioaddr)) | (bnum)), ioaddr)))
#define BITCLR(ioaddr, bnum) ((outb(((inb(ioaddr)) & (~(bnum))), ioaddr))) #define BITCLR(ioaddr, bnum) ((outb(((inb(ioaddr)) & (~(bnum))), ioaddr)))
......
...@@ -28,9 +28,6 @@ ...@@ -28,9 +28,6 @@
#define RX_BUFFER_OFFSET (sizeof(rx_status_vector)+2) /* staus vector + 2 bytes of padding */ #define RX_BUFFER_OFFSET (sizeof(rx_status_vector)+2) /* staus vector + 2 bytes of padding */
#define RX_BUCKET_SIZE 256 #define RX_BUCKET_SIZE 256
#undef BIT
#define BIT(x) (1UL << (x))
/* For more detailed explanations of what each field menas, /* For more detailed explanations of what each field menas,
see Nick's great comments to #defines below (or docs, if see Nick's great comments to #defines below (or docs, if
you are lucky enough toget hold of them :)*/ you are lucky enough toget hold of them :)*/
......
...@@ -4,9 +4,6 @@ ...@@ -4,9 +4,6 @@
#include <linux/types.h> #include <linux/types.h>
#include <linux/if_ether.h> #include <linux/if_ether.h>
#define BIT(x) (1 << (x))
/* IEEE 802.11 defines */ /* IEEE 802.11 defines */
/* Information Element IDs */ /* Information Element IDs */
......
...@@ -25,7 +25,6 @@ ...@@ -25,7 +25,6 @@
#define FAILURE 0xFFFFFFFFL #define FAILURE 0xFFFFFFFFL
#define BIT(x) ((unsigned char)(1<<(x))) /* single-bit mask in bit position x */
#define BITW(x) ((unsigned short)(1<<(x))) /* single-bit mask in bit position x */ #define BITW(x) ((unsigned short)(1<<(x))) /* single-bit mask in bit position x */
struct sccb; struct sccb;
......
...@@ -68,11 +68,6 @@ static char * nsp32_model[] = { ...@@ -68,11 +68,6 @@ static char * nsp32_model[] = {
typedef u32 u32_le; typedef u32 u32_le;
typedef u16 u16_le; typedef u16 u16_le;
/*
* MACRO
*/
#define BIT(x) (1UL << (x))
/* /*
* BASIC Definitions * BASIC Definitions
*/ */
......
...@@ -24,7 +24,6 @@ ...@@ -24,7 +24,6 @@
/************************************ /************************************
* Some useful macros... * Some useful macros...
*/ */
#define BIT(x) (1L << (x))
/* SCSI initiator must be ID 7 */ /* SCSI initiator must be ID 7 */
#define NSP_INITIATOR_ID 7 #define NSP_INITIATOR_ID 7
......
...@@ -77,9 +77,6 @@ ...@@ -77,9 +77,6 @@
#define CONF_DIRTYDETECTION_OFF (0x600) #define CONF_DIRTYDETECTION_OFF (0x600)
#define CONF_DIRTYDETECTION_ON (0x601) #define CONF_DIRTYDETECTION_ON (0x601)
/* Set the corresponding bit. */
#define BIT(n) (0x1U << (n))
struct dumchannel_uf { struct dumchannel_uf {
int channelnr; int channelnr;
u32 *dirty; u32 *dirty;
......
...@@ -17,9 +17,6 @@ ...@@ -17,9 +17,6 @@
#define IO_SPACE_LIMIT 0xffff0000 #define IO_SPACE_LIMIT 0xffff0000
#define BIT(x) ((1)<<(x))
extern int (*ixp4xx_pci_read)(u32 addr, u32 cmd, u32* data); extern int (*ixp4xx_pci_read)(u32 addr, u32 cmd, u32* data);
extern int ixp4xx_pci_write(u32 addr, u32 cmd, u32 data); extern int ixp4xx_pci_write(u32 addr, u32 cmd, u32 data);
......
...@@ -17,9 +17,6 @@ ...@@ -17,9 +17,6 @@
*/ */
#define CRIME_BASE 0x14000000 /* physical */ #define CRIME_BASE 0x14000000 /* physical */
#undef BIT
#define BIT(x) (1UL << (x))
struct sgi_crime { struct sgi_crime {
volatile unsigned long id; volatile unsigned long id;
#define CRIME_ID_MASK 0xff #define CRIME_ID_MASK 0xff
......
...@@ -17,9 +17,6 @@ ...@@ -17,9 +17,6 @@
*/ */
#define MACE_BASE 0x1f000000 /* physical */ #define MACE_BASE 0x1f000000 /* physical */
#undef BIT
#define BIT(x) (1UL << (x))
/* /*
* PCI interface * PCI interface
*/ */
......
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
#include <asm/types.h> #include <asm/types.h>
#ifdef __KERNEL__ #ifdef __KERNEL__
#define BIT(nr) (1UL << (nr))
#define BIT_MASK(nr) (1UL << ((nr) % BITS_PER_LONG)) #define BIT_MASK(nr) (1UL << ((nr) % BITS_PER_LONG))
#define BIT_WORD(nr) ((nr) / BITS_PER_LONG) #define BIT_WORD(nr) ((nr) / BITS_PER_LONG)
#define BITS_TO_TYPE(nr, t) (((nr)+(t)-1)/(t)) #define BITS_TO_TYPE(nr, t) (((nr)+(t)-1)/(t))
......
...@@ -68,7 +68,6 @@ ...@@ -68,7 +68,6 @@
# define print_var(X,Y...) # define print_var(X,Y...)
#endif #endif
#define BIT(x) (1ul<<(x))
#define POW2(x) (1ul<<(x)) #define POW2(x) (1ul<<(x))
/* /*
......
...@@ -79,8 +79,6 @@ ...@@ -79,8 +79,6 @@
/* register bitfields (not all, only as needed) */ /* register bitfields (not all, only as needed) */
#define BIT(x) (1UL << (x))
/* COMMAND_2D reg. values */ /* COMMAND_2D reg. values */
#define TDFX_ROP_COPY 0xcc /* src */ #define TDFX_ROP_COPY 0xcc /* src */
#define TDFX_ROP_INVERT 0x55 /* NOT dst */ #define TDFX_ROP_INVERT 0x55 /* NOT dst */
......
...@@ -37,8 +37,6 @@ ...@@ -37,8 +37,6 @@
struct ieee80211_local; struct ieee80211_local;
#define BIT(x) (1 << (x))
#define IEEE80211_ALIGN32_PAD(a) ((4 - ((a) & 3)) & 3) #define IEEE80211_ALIGN32_PAD(a) ((4 - ((a) & 3)) & 3)
/* Maximum number of broadcast/multicast frames to buffer when some of the /* Maximum number of broadcast/multicast frames to buffer when some of the
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment