Skip to content

Commit 7440ea8

Browse files
sfrothwellmpe
authored andcommitted
drivers/macintosh/smu.c: Mark expected switch fall-through
Mark switch cases where we are expecting to fall through. This patch fixes the following warning (Building: powerpc): drivers/macintosh/smu.c: In function 'smu_queue_i2c': drivers/macintosh/smu.c:854:21: warning: this statement may fall through [-Wimplicit-fallthrough=] cmd->info.devaddr &= 0xfe; ~~~~~~~~~~~~~~~~~~^~~~~~~ drivers/macintosh/smu.c:855:2: note: here case SMU_I2C_TRANSFER_STDSUB: ^~~~ Fixes: 0365ba7 ("[PATCH] ppc64: SMU driver update & i2c support") Signed-off-by: Stephen Rothwell <[email protected]> Reviewed-by: Kees Cook <[email protected]> Signed-off-by: Michael Ellerman <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 7db57e7 commit 7440ea8

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/macintosh/smu.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -852,6 +852,7 @@ int smu_queue_i2c(struct smu_i2c_cmd *cmd)
852852
break;
853853
case SMU_I2C_TRANSFER_COMBINED:
854854
cmd->info.devaddr &= 0xfe;
855+
/* fall through */
855856
case SMU_I2C_TRANSFER_STDSUB:
856857
if (cmd->info.sublen > 3)
857858
return -EINVAL;

0 commit comments

Comments
 (0)