drivers/macintosh/smu.c: Mark expected switch fall-through
authorStephen Rothwell <sfr@canb.auug.org.au>
Tue, 30 Jul 2019 04:37:04 +0000 (14:37 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Wed, 31 Jul 2019 11:44:45 +0000 (21:44 +1000)
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: 0365ba7fb1fa ("[PATCH] ppc64: SMU driver update & i2c support")
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Reviewed-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20190730143704.060a2606@canb.auug.org.au
drivers/macintosh/smu.c

index 276065c..23f1f41 100644 (file)
@@ -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;