Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

perf/x86/intel: Mark expected switch fall-throughs

In preparation to enabling -Wimplicit-fallthrough, mark switch
cases where we are expecting to fall through.

This patch fixes the following warnings:

arch/x86/events/intel/core.c: In function ‘intel_pmu_init’:
arch/x86/events/intel/core.c:4959:8: warning: this statement may fall through [-Wimplicit-fallthrough=]
arch/x86/events/intel/core.c:5008:8: 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 enable -Wimplicit-fallthrough.

Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: Borislav Petkov <bp@alien8.de>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Kan Liang <kan.liang@linux.intel.com>
Cc: Kees Cook <keescook@chromium.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: https://lkml.kernel.org/r/20190624161913.GA32270@embeddedor
Signed-off-by: Ingo Molnar <mingo@kernel.org>

authored by

Gustavo A. R. Silva and committed by
Ingo Molnar
289a2d22 4ce54af8

+2
+2
arch/x86/events/intel/core.c
··· 4954 4954 4955 4955 case INTEL_FAM6_SKYLAKE_X: 4956 4956 pmem = true; 4957 + /* fall through */ 4957 4958 case INTEL_FAM6_SKYLAKE_MOBILE: 4958 4959 case INTEL_FAM6_SKYLAKE_DESKTOP: 4959 4960 case INTEL_FAM6_KABYLAKE_MOBILE: ··· 5004 5003 case INTEL_FAM6_ICELAKE_X: 5005 5004 case INTEL_FAM6_ICELAKE_XEON_D: 5006 5005 pmem = true; 5006 + /* fall through */ 5007 5007 case INTEL_FAM6_ICELAKE_MOBILE: 5008 5008 case INTEL_FAM6_ICELAKE_DESKTOP: 5009 5009 x86_pmu.late_ack = true;