All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] i2c: iproc: Fix checkpatch warnings by using 'BIT' macro
@ 2020-08-14 22:40 Ray Jui
  2020-08-15 15:28 ` Florian Fainelli
  2020-08-25  7:49 ` Wolfram Sang
  0 siblings, 2 replies; 3+ messages in thread
From: Ray Jui @ 2020-08-14 22:40 UTC (permalink / raw)
  To: Wolfram Sang
  Cc: linux-i2c, linux-kernel, bcm-kernel-feedback-list,
	Rayagonda Kokatanur, Ray Jui

Fix additional checkpatch warnings in the iProc I2C driver by using
'BIT' marcro.

Reported-by: Wolfram Sang <wsa@kernel.org>
Signed-off-by: Ray Jui <ray.jui@broadcom.com>
---
 drivers/i2c/busses/i2c-bcm-iproc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/i2c/busses/i2c-bcm-iproc.c b/drivers/i2c/busses/i2c-bcm-iproc.c
index 688e92818821..d8295b1c379d 100644
--- a/drivers/i2c/busses/i2c-bcm-iproc.c
+++ b/drivers/i2c/busses/i2c-bcm-iproc.c
@@ -720,7 +720,7 @@ static int bcm_iproc_i2c_xfer_internal(struct bcm_iproc_i2c_dev *iproc_i2c,
 
 			/* mark the last byte */
 			if (!process_call && (i == msg->len - 1))
-				val |= 1 << M_TX_WR_STATUS_SHIFT;
+				val |= BIT(M_TX_WR_STATUS_SHIFT);
 
 			iproc_i2c_wr_reg(iproc_i2c, M_TX_OFFSET, val);
 		}
@@ -738,7 +738,7 @@ static int bcm_iproc_i2c_xfer_internal(struct bcm_iproc_i2c_dev *iproc_i2c,
 		 */
 		addr = i2c_8bit_addr_from_msg(msg);
 		/* mark it the last byte out */
-		val = addr | (1 << M_TX_WR_STATUS_SHIFT);
+		val = addr | BIT(M_TX_WR_STATUS_SHIFT);
 		iproc_i2c_wr_reg(iproc_i2c, M_TX_OFFSET, val);
 	}
 
-- 
2.17.1


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

* Re: [PATCH] i2c: iproc: Fix checkpatch warnings by using 'BIT' macro
  2020-08-14 22:40 [PATCH] i2c: iproc: Fix checkpatch warnings by using 'BIT' macro Ray Jui
@ 2020-08-15 15:28 ` Florian Fainelli
  2020-08-25  7:49 ` Wolfram Sang
  1 sibling, 0 replies; 3+ messages in thread
From: Florian Fainelli @ 2020-08-15 15:28 UTC (permalink / raw)
  To: Ray Jui, Wolfram Sang
  Cc: linux-i2c, linux-kernel, bcm-kernel-feedback-list, Rayagonda Kokatanur



On 8/14/2020 3:40 PM, Ray Jui wrote:
> Fix additional checkpatch warnings in the iProc I2C driver by using
> 'BIT' marcro.
> 
> Reported-by: Wolfram Sang <wsa@kernel.org>
> Signed-off-by: Ray Jui <ray.jui@broadcom.com>

Acked-by: Florian Fainelli <f.fainelli@gmail.com>
-- 
Florian

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

* Re: [PATCH] i2c: iproc: Fix checkpatch warnings by using 'BIT' macro
  2020-08-14 22:40 [PATCH] i2c: iproc: Fix checkpatch warnings by using 'BIT' macro Ray Jui
  2020-08-15 15:28 ` Florian Fainelli
@ 2020-08-25  7:49 ` Wolfram Sang
  1 sibling, 0 replies; 3+ messages in thread
From: Wolfram Sang @ 2020-08-25  7:49 UTC (permalink / raw)
  To: Ray Jui
  Cc: linux-i2c, linux-kernel, bcm-kernel-feedback-list, Rayagonda Kokatanur

[-- Attachment #1: Type: text/plain, Size: 395 bytes --]

On Fri, Aug 14, 2020 at 03:40:08PM -0700, Ray Jui wrote:
> Fix additional checkpatch warnings in the iProc I2C driver by using
> 'BIT' marcro.
> 
> Reported-by: Wolfram Sang <wsa@kernel.org>
> Signed-off-by: Ray Jui <ray.jui@broadcom.com>

Changed the commit msg a little. This is not about 'checkpatch', this is
about fixing undefined C behaviour.

Applied to for-current, thanks!


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

end of thread, other threads:[~2020-08-25  7:49 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-14 22:40 [PATCH] i2c: iproc: Fix checkpatch warnings by using 'BIT' macro Ray Jui
2020-08-15 15:28 ` Florian Fainelli
2020-08-25  7:49 ` Wolfram Sang

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.