i2c: mv64xxx: fix indentation
PATCH 1/1 i2c: mv64xxx: fix indentation
The patch fixes this compiler's warning:
drivers/i2c/busses/i2c-mv64xxx.c: In function ‘mv64xxx_i2c_fsm’:
drivers/i2c/busses/i2c-mv64xxx.c:303:3: warning: this ‘if’ clause does
not guard... [-Wmisleading-indentation]
if (drv_data->bytes_left == 1)
^~
drivers/i2c/busses/i2c-mv64xxx.c:305:4: note: ...this statement, but the
latter is misleadingly indented as if it is guarded by the ‘if’
udelay(2);
^~~~~~Signed-off-by Antony Pavlov <[email protected]>
Cc Bastian Stender <[email protected]>
--- drivers/i2c/busses/i2c-mv64xxx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/i2c/busses/i2c-mv64xxx.c +1 -1
@@ -302,7 +302,7 @@ mv64xxx_i2c_fsm(struct mv64xxx_i2c_data *drv_data, u32 status)if (drv_data->bytes_left ==1 ) drv_data->cntl_bits &= ~REG_CONTROL_ACK ; -udelay (2 ); +udelay (2 );break ;case STATUS_MAST_RD_DATA_NO_ACK :/* 0x58 */
Signature · 7 lines
2.11.0 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
Quoted 24 lines · Antony Pavlov
The patch fixes this compiler's warning:
drivers/i2c/busses/i2c-mv64xxx.c: In function ‘mv64xxx_i2c_fsm’: drivers/i2c/busses/i2c-mv64xxx.c:303:3: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation] if (drv_data->bytes_left == 1) ^~ drivers/i2c/busses/i2c-mv64xxx.c:305:4: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the ‘if’ udelay(2); ^~~~~~Signed-off-by Antony Pavlov <[email protected]>Cc Bastian Stender <[email protected]>--- drivers/i2c/busses/i2c-mv64xxx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/i2c/busses/i2c-mv64xxx.c +0
-0
drivers/i2c/busses/i2c-mv64xxx.c mv64xxx_i2c_fsm(struct mv64xxx_i2c_data *drv_data, u32 status) · line 308
Quoted 8 lines
drivers/i2c/busses/i2c-mv64xxx.c +1
-1@@ -302,7 +302,7 @@ mv64xxx_i2c_fsm(struct mv64xxx_i2c_data *drv_data, u32 status)if (drv_data->bytes_left ==1 ) drv_data->cntl_bits &= ~REG_CONTROL_ACK ; -udelay (2 ); +udelay (2 );break ;case STATUS_MAST_RD_DATA_NO_ACK :/* 0x58 */
Yes, the indentation happened accidentally. I just checked the functional spec again: the udelay is necessary regardless of drv_data->bytes_left.
Thanks.
Regards,
Bastian
Signature · 10 lines
Pengutronix e.K. Industrial Linux Solutions http://www.pengutronix.de/ Peiner Str. 6-8, 31137 Hildesheim, Germany Amtsgericht Hildesheim, HRA 2686 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
Sascha Hauer
AppliedQuoted 12 lines · Antony Pavlov
The patch fixes this compiler's warning:
drivers/i2c/busses/i2c-mv64xxx.c: In function ‘mv64xxx_i2c_fsm’: drivers/i2c/busses/i2c-mv64xxx.c:303:3: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation] if (drv_data->bytes_left == 1) ^~ drivers/i2c/busses/i2c-mv64xxx.c:305:4: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the ‘if’ udelay(2); ^~~~~~
Quoted 2 lines
Signed-off-by Antony Pavlov <[email protected]>Cc Bastian Stender <[email protected]>
Applied, thanks
Sascha
Quoted 21 lines
--- drivers/i2c/busses/i2c-mv64xxx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/i2c/busses/i2c-mv64xxx.c +1
-1@@ -302,7 +302,7 @@ mv64xxx_i2c_fsm(struct mv64xxx_i2c_data *drv_data, u32 status)if (drv_data->bytes_left ==1 ) drv_data->cntl_bits &= ~REG_CONTROL_ACK ; -udelay (2 ); +udelay (2 );break ;case STATUS_MAST_RD_DATA_NO_ACK :/* 0x58 */ Signature · 1 line
2.11.0
Signature · 9 lines
Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox