linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] soc: Fix for clean up pmic driver - trivial
@ 2015-10-05 11:45 Mutharaju, Prasanna (P.)
  2015-10-05 12:21 ` Arnd Bergmann
  0 siblings, 1 reply; 2+ messages in thread
From: Mutharaju, Prasanna (P.) @ 2015-10-05 11:45 UTC (permalink / raw)
  To: linux-arm-kernel

From: Prasanna Karthik <mkarthi3@visteon.com>

Prefer using the BIT macro reported by checkpatch

Signed-off-by: Prasanna Karthik <mkarthi3@visteon.com>
---
 drivers/soc/mediatek/mtk-pmic-wrap.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/soc/mediatek/mtk-pmic-wrap.c b/drivers/soc/mediatek/mtk-pmic-wrap.c
index f432291..628a919 100644
--- a/drivers/soc/mediatek/mtk-pmic-wrap.c
+++ b/drivers/soc/mediatek/mtk-pmic-wrap.c
@@ -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)
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [PATCH] soc: Fix for clean up pmic driver - trivial
  2015-10-05 11:45 [PATCH] soc: Fix for clean up pmic driver - trivial Mutharaju, Prasanna (P.)
@ 2015-10-05 12:21 ` Arnd Bergmann
  0 siblings, 0 replies; 2+ messages in thread
From: Arnd Bergmann @ 2015-10-05 12:21 UTC (permalink / raw)
  To: linux-arm-kernel

On Monday 05 October 2015 11:45:08 Mutharaju, Prasanna wrote:
> 
> diff --git a/drivers/soc/mediatek/mtk-pmic-wrap.c b/drivers/soc/mediatek/mtk-pmic-wrap.c
> index f432291..628a919 100644
> --- a/drivers/soc/mediatek/mtk-pmic-wrap.c
> +++ b/drivers/soc/mediatek/mtk-pmic-wrap.c
> @@ -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)

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

	Arnd

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-10-05 12:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-05 11:45 [PATCH] soc: Fix for clean up pmic driver - trivial Mutharaju, Prasanna (P.)
2015-10-05 12:21 ` Arnd Bergmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).