Skip to contentSkip to conversation

soc: Fix for clean up pmic driver - trivial

PATCH New Mutharaju, Prasanna (P.) 2 participants 2 messages Oct 5, 2015 Arm MediaTek

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 soc: Fix for clean up pmic driver - trivial

From: Prasanna Karthik <[email protected]>

Prefer using the BIT macro reported by checkpatch

---
 drivers/soc/mediatek/mtk-pmic-wrap.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/soc/mediatek/mtk-pmic-wrap.c +3 -3
index f432291..628a919 100644
@@ -35,8 +35,8 @@
 #define PWRAP_GET_WACS_RDATA(x)		(((x) >> 0) & 0x0000ffff)
 #define PWRAP_GET_WACS_FSM(x)		(((x) >> 16) & 0x00000007)
 #define PWRAP_GET_WACS_REQ(x)		(((x) >> 19) & 0x00000001)
-#define PWRAP_STATE_SYNC_IDLE0		(1 << 20)
-#define PWRAP_STATE_INIT_DONE0		(1 << 21)
+#define PWRAP_STATE_SYNC_IDLE0		BIT(20)
+#define PWRAP_STATE_INIT_DONE0		BIT(21)
 
 /* macro for WACS FSM */
 #define PWRAP_WACS_FSM_IDLE		0x00
@@ -52,7 +52,7 @@
 #define PWRAP_DEW_WRITE_TEST_VAL	0xa55a
 
 /* macro for manual command */
-#define PWRAP_MAN_CMD_SPI_WRITE		(1 << 13)
+#define PWRAP_MAN_CMD_SPI_WRITE		BIT(13)
 #define PWRAP_MAN_CMD_OP_CSH		(0x0 << 8)
 #define PWRAP_MAN_CMD_OP_CSL		(0x1 << 8)
 #define PWRAP_MAN_CMD_OP_CK		(0x2 << 8)
Signature · 1 line
1.9.1
#1 lore raw

PATCH 1/1 soc: Fix for clean up pmic driver - trivial

Quoted 17 lines · Prasanna
drivers/soc/mediatek/mtk-pmic-wrap.c +2 -2
index f432291..628a919 100644
@@ -35,8 +35,8 @@
 #define PWRAP_GET_WACS_RDATA(x)                (((x) >> 0) & 0x0000ffff)
 #define PWRAP_GET_WACS_FSM(x)          (((x) >> 16) & 0x00000007)
 #define PWRAP_GET_WACS_REQ(x)          (((x) >> 19) & 0x00000001)
-#define PWRAP_STATE_SYNC_IDLE0         (1 << 20)
-#define PWRAP_STATE_INIT_DONE0         (1 << 21)
+#define PWRAP_STATE_SYNC_IDLE0         BIT(20)
+#define PWRAP_STATE_INIT_DONE0         BIT(21)
 
 /* macro for WACS FSM */
 #define PWRAP_WACS_FSM_IDLE            0x00

drivers/soc/mediatek/mtk-pmic-wrap.c line 58

Quoted 8 lines
drivers/soc/mediatek/mtk-pmic-wrap.c +1 -1
@@ -52,7 +52,7 @@
 #define PWRAP_DEW_WRITE_TEST_VAL       0xa55a
 
 /* macro for manual command */
-#define PWRAP_MAN_CMD_SPI_WRITE                (1 << 13)
+#define PWRAP_MAN_CMD_SPI_WRITE                BIT(13)
 #define PWRAP_MAN_CMD_OP_CSH           (0x0 << 8)
 #define PWRAP_MAN_CMD_OP_CSL           (0x1 << 8)
 #define PWRAP_MAN_CMD_OP_CK            (0x2 << 8)

I'd say the original version is clearer because of the context that does not use (and should not) use BIT().

Arnd