Skip to content

Commit

Permalink
drivers/macintosh/smu.c: Mark expected switch fall-through
Browse files Browse the repository at this point in the history
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]
  • Loading branch information
sfrothwell authored and mpe committed Jul 31, 2019
1 parent 7db57e7 commit 7440ea8
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/macintosh/smu.c
Original file line number Diff line number Diff line change
Expand Up @@ -852,6 +852,7 @@ int smu_queue_i2c(struct smu_i2c_cmd *cmd)
break;
case SMU_I2C_TRANSFER_COMBINED:
cmd->info.devaddr &= 0xfe;
/* fall through */
case SMU_I2C_TRANSFER_STDSUB:
if (cmd->info.sublen > 3)
return -EINVAL;
Expand Down

0 comments on commit 7440ea8

Please sign in to comment.