[PATCH 06/11] mmc: sdio: Use BIT() macro

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Use the BIT(n) macro instead of (1<<n), no functional change.
Regex 's@(1 \?<< \?\([0-9A-Z_]\+\))@BIT(\1)' .

Signed-off-by: Marek Vasut <marex@xxxxxxx>
---
Cc: Adrian Hunter <adrian.hunter@xxxxxxxxx>
Cc: Avri Altman <avri.altman@xxxxxxx>
Cc: Bo Liu <liubo03@xxxxxxxxxx>
Cc: Deren Wu <deren.wu@xxxxxxxxxxxx>
Cc: Philipp Zabel <p.zabel@xxxxxxxxxxxxxx>
Cc: Pierre Ossman <pierre@xxxxxxxxx>
Cc: Russell King <linux@xxxxxxxxxxxxxxx>
Cc: Ulf Hansson <ulf.hansson@xxxxxxxxxx>
Cc: Yang Yingliang <yangyingliang@xxxxxxxxxx>
Cc: linux-mmc@xxxxxxxxxxxxxxx
---
 include/linux/mmc/sdio.h      | 24 ++++++++++++------------
 include/linux/mmc/sdio_func.h |  2 +-
 2 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/include/linux/mmc/sdio.h b/include/linux/mmc/sdio.h
index 1ef400f28642e..e43806e9dd138 100644
--- a/include/linux/mmc/sdio.h
+++ b/include/linux/mmc/sdio.h
@@ -34,8 +34,8 @@
  *      [8:0] Byte/block count
  */
 
-#define R4_18V_PRESENT (1<<24)
-#define R4_MEMORY_PRESENT (1 << 27)
+#define R4_18V_PRESENT BIT(24)
+#define R4_MEMORY_PRESENT BIT(27)
 
 /*
   SDIO status in R5
@@ -52,11 +52,11 @@
 	c : clear by read
  */
 
-#define R5_COM_CRC_ERROR	(1 << 15)	/* er, b */
-#define R5_ILLEGAL_COMMAND	(1 << 14)	/* er, b */
-#define R5_ERROR		(1 << 11)	/* erx, c */
-#define R5_FUNCTION_NUMBER	(1 << 9)	/* er, c */
-#define R5_OUT_OF_RANGE		(1 << 8)	/* er, c */
+#define R5_COM_CRC_ERROR	BIT(15)	/* er, b */
+#define R5_ILLEGAL_COMMAND	BIT(14)	/* er, b */
+#define R5_ERROR		BIT(11)	/* erx, c */
+#define R5_FUNCTION_NUMBER	BIT(9)	/* er, c */
+#define R5_OUT_OF_RANGE		BIT(8)	/* er, c */
 #define R5_STATUS(x)		(x & 0xCB00)
 #define R5_IO_CURRENT_STATE(x)	((x & 0x3000) >> 12) /* s, b */
 
@@ -150,9 +150,9 @@
 
 #define SDIO_CCCR_DRIVE_STRENGTH 0x15
 #define  SDIO_SDTx_MASK		0x07
-#define  SDIO_DRIVE_SDTA	(1<<0)
-#define  SDIO_DRIVE_SDTC	(1<<1)
-#define  SDIO_DRIVE_SDTD	(1<<2)
+#define  SDIO_DRIVE_SDTA	BIT(0)
+#define  SDIO_DRIVE_SDTC	BIT(1)
+#define  SDIO_DRIVE_SDTD	BIT(2)
 #define  SDIO_DRIVE_DTSx_MASK	0x03
 #define  SDIO_DRIVE_DTSx_SHIFT	4
 #define  SDIO_DTSx_SET_TYPE_B	(0 << SDIO_DRIVE_DTSx_SHIFT)
@@ -161,8 +161,8 @@
 #define  SDIO_DTSx_SET_TYPE_D	(3 << SDIO_DRIVE_DTSx_SHIFT)
 
 #define SDIO_CCCR_INTERRUPT_EXT	0x16
-#define SDIO_INTERRUPT_EXT_SAI	(1 << 0)
-#define SDIO_INTERRUPT_EXT_EAI	(1 << 1)
+#define SDIO_INTERRUPT_EXT_SAI	BIT(0)
+#define SDIO_INTERRUPT_EXT_EAI	BIT(1)
 
 /*
  * Function Basic Registers (FBR)
diff --git a/include/linux/mmc/sdio_func.h b/include/linux/mmc/sdio_func.h
index 478855b8e406f..ce8ffddd5bd3b 100644
--- a/include/linux/mmc/sdio_func.h
+++ b/include/linux/mmc/sdio_func.h
@@ -47,7 +47,7 @@ struct sdio_func {
 	unsigned		enable_timeout;	/* max enable timeout in msec */
 
 	unsigned int		state;		/* function state */
-#define SDIO_STATE_PRESENT	(1<<0)		/* present in sysfs */
+#define SDIO_STATE_PRESENT	BIT(0)		/* present in sysfs */
 
 	u8			*tmpbuf;	/* DMA:able scratch buffer */
 
-- 
2.39.2




[Index of Archives]     [Linux Memonry Technology]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux