Linux MultiMedia Card development
 help / color / mirror / Atom feed
From: Marek Vasut <marex@denx.de>
To: linux-mmc@vger.kernel.org
Cc: Marek Vasut <marex@denx.de>,
	Adrian Hunter <adrian.hunter@intel.com>,
	Avri Altman <avri.altman@wdc.com>, Bo Liu <liubo03@inspur.com>,
	Deren Wu <deren.wu@mediatek.com>,
	Philipp Zabel <p.zabel@pengutronix.de>,
	Pierre Ossman <pierre@ossman.eu>,
	Russell King <linux@armlinux.org.uk>,
	Ulf Hansson <ulf.hansson@linaro.org>,
	Yang Yingliang <yangyingliang@huawei.com>
Subject: [PATCH 06/11] mmc: sdio: Use BIT() macro
Date: Tue, 20 Jun 2023 12:47:17 +0200	[thread overview]
Message-ID: <20230620104722.16465-6-marex@denx.de> (raw)
In-Reply-To: <20230620104722.16465-1-marex@denx.de>

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


  parent reply	other threads:[~2023-06-20 10:47 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-20 10:47 [PATCH 01/11] mmc: core: Use BIT() macro Marek Vasut
2023-06-20 10:47 ` [PATCH 02/11] mmc: card: " Marek Vasut
2023-06-20 10:47 ` [PATCH 03/11] mmc: host: " Marek Vasut
2023-06-20 10:47 ` [PATCH 04/11] mmc: mmc: " Marek Vasut
2023-06-20 10:47 ` [PATCH 05/11] mmc: sd: " Marek Vasut
2023-06-20 10:47 ` Marek Vasut [this message]
2023-06-20 10:47 ` [PATCH 07/11] mmc: mmci: " Marek Vasut
2023-06-20 10:47 ` [PATCH 08/11] mmc: pxav3: " Marek Vasut
2023-06-20 10:47 ` [PATCH 09/11] mmc: sdhci: " Marek Vasut
2023-06-20 10:47 ` [PATCH 10/11] mmc: vub300: " Marek Vasut
2023-06-20 10:47 ` [PATCH 11/11] mmc: wbsd: " Marek Vasut
2023-06-20 11:15 ` [PATCH 01/11] mmc: core: " Ulf Hansson
2023-06-21  2:36   ` Marek Vasut
2023-06-21  9:18     ` Ulf Hansson
2023-06-21 10:28       ` Marek Vasut
2023-06-21 11:23       ` Christian Loehle

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230620104722.16465-6-marex@denx.de \
    --to=marex@denx.de \
    --cc=adrian.hunter@intel.com \
    --cc=avri.altman@wdc.com \
    --cc=deren.wu@mediatek.com \
    --cc=linux-mmc@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=liubo03@inspur.com \
    --cc=p.zabel@pengutronix.de \
    --cc=pierre@ossman.eu \
    --cc=ulf.hansson@linaro.org \
    --cc=yangyingliang@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox