i2c: iproc: Fix checkpatch warnings by using 'BIT' macro
Subsystems (2)
PATCH 1/1 i2c: iproc: Fix checkpatch warnings by using 'BIT' macro
Fix additional checkpatch warnings in the iProc I2C driver by using 'BIT' marcro.
Reported-by Wolfram Sang <[email protected]>
Signed-off-by Ray Jui <[email protected]>
--- drivers/i2c/busses/i2c-bcm-iproc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/i2c/busses/i2c-bcm-iproc.c +2 -2
@@ -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); }
Signature · 1 line
2.17.1
Quoted 5 lines · Ray Jui
Fix additional checkpatch warnings in the iProc I2C driver by using 'BIT' marcro.
Reported-by Wolfram Sang <[email protected]>Signed-off-by Ray Jui <[email protected]>
Acked-by Florian Fainelli <[email protected]>
Signature · 1 line
Florian
Wolfram Sang
AppliedQuoted 5 lines · Ray Jui
Fix additional checkpatch warnings in the iProc I2C driver by using 'BIT' marcro.
Reported-by Wolfram Sang <[email protected]>Signed-off-by Ray Jui <[email protected]>
Changed the commit msg a little. This is not about 'checkpatch', this is about fixing undefined C behaviour.
Applied to for-current, thanks!