Skip to content

Commit 8eb9a2d

Browse files
GustavoARSilvaWolfram Sang
authored andcommitted
i2c: s3c2410: Mark expected switch fall-through
Mark switch cases where we are expecting to fall through. This patch fixes the following warning: drivers/i2c/busses/i2c-s3c2410.c: In function 'i2c_s3c_irq_nextbyte': drivers/i2c/busses/i2c-s3c2410.c:431:6: warning: this statement may fall through [-Wimplicit-fallthrough=] if (i2c->state == STATE_READ) ^ drivers/i2c/busses/i2c-s3c2410.c:439:2: note: here case STATE_WRITE: ^~~~ Notice that, in this particular case, the code comment is modified in accordance with what GCC is expecting to find. Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com> Reviewed-by: Kees Cook <keescook@chromium.org> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
1 parent b1ac670 commit 8eb9a2d

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/i2c/busses/i2c-s3c2410.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -435,6 +435,7 @@ static int i2c_s3c_irq_nextbyte(struct s3c24xx_i2c *i2c, unsigned long iicstat)
435435
* fall through to the write state, as we will need to
436436
* send a byte as well
437437
*/
438+
/* Fall through */
438439

439440
case STATE_WRITE:
440441
/*

0 commit comments

Comments
 (0)