powerpc: fix -Wimplicit-fallthrough
authorNick Desaulniers <ndesaulniers@google.com>
Mon, 16 Nov 2020 04:35:32 +0000 (20:35 -0800)
committerGustavo A. R. Silva <gustavoars@kernel.org>
Wed, 18 Nov 2020 20:18:09 +0000 (14:18 -0600)
The "fallthrough" pseudo-keyword was added as a portable way to denote
intentional fallthrough. Clang will still warn on cases where there is a
fallthrough to an immediate break. Add explicit breaks for those cases.

Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
Tested-by: Nathan Chancellor <natechancellor@gmail.com>
Reviewed-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Reviewed-by: Miguel Ojeda <ojeda@kernel.org>
Reviewed-by: Nathan Chancellor <natechancellor@gmail.com>
Acked-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://github.com/ClangBuiltLinux/linux/issues/236
Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
arch/powerpc/kernel/prom_init.c
arch/powerpc/kernel/uprobes.c
arch/powerpc/perf/imc-pmu.c

index 38ae5933d91741ddd15c7e065f2e03297b4acce5..e9d4eb6144e1f4ce9f536a5f319591a23269c7fd 100644 (file)
@@ -355,6 +355,7 @@ static int __init prom_strtobool(const char *s, bool *res)
                default:
                        break;
                }
+               break;
        default:
                break;
        }
index d200e7df71678926e3b5eb4df33e23cac61ac5da..e8a63713e65542a02d834197e1b5a302e7da07fe 100644 (file)
@@ -141,6 +141,7 @@ int arch_uprobe_exception_notify(struct notifier_block *self,
        case DIE_SSTEP:
                if (uprobe_post_sstep_notifier(regs))
                        return NOTIFY_STOP;
+               break;
        default:
                break;
        }
index 7b25548ec42b0db3ae872adce803de2a75ef9e03..e106909ff9c377e557a83bfc3e257b4e9a0224a1 100644 (file)
@@ -1500,6 +1500,7 @@ static int update_pmu_ops(struct imc_pmu *pmu)
                pmu->pmu.stop = trace_imc_event_stop;
                pmu->pmu.read = trace_imc_event_read;
                pmu->attr_groups[IMC_FORMAT_ATTR] = &trace_imc_format_group;
+               break;
        default:
                break;
        }