Re: [PATCH] x86/events: Mark expected switch fall-throughs

Borislav Petkov
2019-01-29T15:25:12Z

On Fri, Jan 25, 2019 at 12:49:17PM -0600, Gustavo A. R. Silva wrote:
> In preparation to enabling -Wimplicit-fallthrough, mark switch
> cases where we are expecting to fall through.
>
> This patch fixes the following warnings:
>
> In file included from arch/x86/events/intel/core.c:22:
> arch/x86/events/intel/core.c: In function ‘intel_pmu_init’:
> arch/x86/events/intel/../perf_event.h:668:17: warning: this statement may fall through [-Wimplicit-fallthrough=]
> x86_pmu.quirks = &__quirk; \
> ~~~~~~~~~~~~~~~^~~~~~~~~~
> arch/x86/events/intel/core.c:4170:3: note: in expansion of macro ‘x86_add_quirk’
> x86_add_quirk(intel_clovertown_quirk);
> ^~~~~~~~~~~~~
> arch/x86/events/intel/core.c:4171:2: note: here
> case INTEL_FAM6_CORE2_MEROM_L:
> ^~~~
> arch/x86/events/intel/lbr.c:929:6: warning: this statement may fall through [-Wimplicit-fallthrough=]
>
> Warning level 3 was used: -Wimplicit-fallthrough=3
>
> This patch is part of the ongoing efforts to enabling -Wimplicit-fallthrough.
>
> Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
> ---
> arch/x86/events/intel/core.c | 2 ++
> arch/x86/events/intel/lbr.c | 1 +
> 2 files changed, 3 insertions(+)

You do know how to use scripts/get_maintainer.pl, right?

Because I don't see PeterZ on CC.

Please use that script when preparing patches.

--
Regards/Gruss,
Boris.

Good mailing practices for 400: avoid top-posting and trim the reply.