diff mbox series

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

Message ID 20230620104722.16465-6-marex@denx.de
State New
Headers show
Series [01/11] mmc: core: Use BIT() macro | expand

Commit Message

Marek Vasut June 20, 2023, 10:47 a.m. UTC
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@denx.de>
---
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Avri Altman <avri.altman@wdc.com>
Cc: Bo Liu <liubo03@inspur.com>
Cc: Deren Wu <deren.wu@mediatek.com>
Cc: Philipp Zabel <p.zabel@pengutronix.de>
Cc: Pierre Ossman <pierre@ossman.eu>
Cc: Russell King <linux@armlinux.org.uk>
Cc: Ulf Hansson <ulf.hansson@linaro.org>
Cc: Yang Yingliang <yangyingliang@huawei.com>
Cc: linux-mmc@vger.kernel.org
---
 include/linux/mmc/sdio.h      | 24 ++++++++++++------------
 include/linux/mmc/sdio_func.h |  2 +-
 2 files changed, 13 insertions(+), 13 deletions(-)
diff mbox series

Patch

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 */