Skip to content

Commit

Permalink
i3c: master: dw-i3c-master: mark expected switch fall-through
Browse files Browse the repository at this point in the history
In preparation to enabling -Wimplicit-fallthrough, mark switch
cases where we are expecting to fall through.

This patch fixes the following warning:

drivers/i3c/master/dw-i3c-master.c: In function ‘dw_i3c_master_bus_init’:
drivers/i3c/master/dw-i3c-master.c:603:6: warning: this statement may fall through [-Wimplicit-fallthrough=]
   if (ret)
      ^
drivers/i3c/master/dw-i3c-master.c:605:2: note: here
  case I3C_BUS_MODE_PURE:
  ^~~~

Warning level 3 was used: -Wimplicit-fallthrough=3

This patch is part of the ongoing efforts to enable
-Wimplicit-fallthrough.

Signed-off-by: Gustavo A. R. Silva <[email protected]>
Acked-by: Vitor Soares <[email protected]>
Signed-off-by: Boris Brezillon <[email protected]>
GustavoARSilva authored and bbrezillon committed Feb 28, 2019
1 parent 65907c5 commit 988bb4a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/i3c/master/dw-i3c-master.c
Original file line number Diff line number Diff line change
@@ -596,6 +596,7 @@ static int dw_i3c_master_bus_init(struct i3c_master_controller *m)
ret = dw_i2c_clk_cfg(master);
if (ret)
return ret;
/* fall through */
case I3C_BUS_MODE_PURE:
ret = dw_i3c_clk_cfg(master);
if (ret)

0 comments on commit 988bb4a

Please sign in to comment.