All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] perf/x86/intel: Mark expected switch fall-throughs
@ 2019-06-24 16:19 Gustavo A. R. Silva
  2019-06-24 19:31 ` Peter Zijlstra
  2019-07-25 16:27 ` [tip:perf/urgent] " tip-bot for Gustavo A. R. Silva
  0 siblings, 2 replies; 52+ messages in thread
From: Gustavo A. R. Silva @ 2019-06-24 16:19 UTC (permalink / raw)
  To: Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo,
	Alexander Shishkin, Jiri Olsa, Namhyung Kim, Thomas Gleixner,
	Borislav Petkov, H. Peter Anvin, x86, Kan Liang
  Cc: linux-kernel, Gustavo A. R. Silva, Kees Cook

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=]
   pmem = true;
   ~~~~~^~~~~~
arch/x86/events/intel/core.c:4960:2: note: here
  case INTEL_FAM6_SKYLAKE_MOBILE:
  ^~~~
arch/x86/events/intel/core.c:5008:8: warning: this statement may fall through [-Wimplicit-fallthrough=]
   pmem = true;
   ~~~~~^~~~~~
arch/x86/events/intel/core.c:5009:2: note: here
  case INTEL_FAM6_ICELAKE_MOBILE:
  ^~~~

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>
---
 arch/x86/events/intel/core.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/x86/events/intel/core.c b/arch/x86/events/intel/core.c
index bda450ff51ee..6154f052aa5f 100644
--- a/arch/x86/events/intel/core.c
+++ b/arch/x86/events/intel/core.c
@@ -4957,6 +4957,7 @@ __init int intel_pmu_init(void)
 
 	case INTEL_FAM6_SKYLAKE_X:
 		pmem = true;
+		/* fall through */
 	case INTEL_FAM6_SKYLAKE_MOBILE:
 	case INTEL_FAM6_SKYLAKE_DESKTOP:
 	case INTEL_FAM6_KABYLAKE_MOBILE:
@@ -5006,6 +5007,7 @@ __init int intel_pmu_init(void)
 	case INTEL_FAM6_ICELAKE_X:
 	case INTEL_FAM6_ICELAKE_XEON_D:
 		pmem = true;
+		/* fall through */
 	case INTEL_FAM6_ICELAKE_MOBILE:
 	case INTEL_FAM6_ICELAKE_DESKTOP:
 		x86_pmu.late_ack = true;
-- 
2.21.0


^ permalink raw reply related	[flat|nested] 52+ messages in thread

end of thread, other threads:[~2019-07-25 23:28 UTC | newest]

Thread overview: 52+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-24 16:19 [PATCH] perf/x86/intel: Mark expected switch fall-throughs Gustavo A. R. Silva
2019-06-24 19:31 ` Peter Zijlstra
2019-06-24 19:45   ` Joe Perches
2019-06-24 20:37     ` Peter Zijlstra
2019-06-24 20:53       ` Gustavo A. R. Silva
2019-06-24 20:57         ` Joe Perches
2019-06-25  7:20           ` Peter Zijlstra
2019-06-24 22:28         ` Miguel Ojeda
2019-06-25  7:18           ` Peter Zijlstra
2019-06-25 12:47             ` Miguel Ojeda
2019-06-25 18:15               ` Nick Desaulniers
2019-06-25 22:29                 ` Joe Perches
2019-06-25 22:57                   ` Nick Desaulniers
2019-06-25 23:25                     ` Joe Perches
2019-06-26  8:49                 ` Peter Zijlstra
2019-06-26 22:14                   ` Nick Desaulniers
2019-06-27  7:12                     ` Peter Zijlstra
2019-06-28 13:31                       ` Peter Zijlstra
2019-06-28 18:44                         ` Nick Desaulniers
2019-06-29  7:10                           ` Peter Zijlstra
2019-06-25 17:12             ` Kees Cook
2019-06-25 18:05               ` Nathan Chancellor
2019-06-25 19:53                 ` Thomas Gleixner
2019-06-25 20:27                   ` Nathan Chancellor
2019-06-25 20:37                     ` Nick Desaulniers
2019-06-25 21:47                     ` Thomas Gleixner
2019-06-26  5:10                       ` Nathan Chancellor
2019-06-26 15:18                         ` Thomas Gleixner
2019-06-26 19:00                           ` Nathan Chancellor
2019-06-26 19:46                             ` Thomas Gleixner
2019-06-26 20:03                               ` Nathan Chancellor
2019-06-26  9:24                       ` Peter Zijlstra
2019-06-26  9:55                         ` Peter Zijlstra
2019-06-26 22:23                           ` Nick Desaulniers
2019-06-27  7:35                             ` Peter Zijlstra
2019-06-26 10:43                         ` Peter Zijlstra
2019-06-26 22:15                         ` Nick Desaulniers
2019-06-27  7:16                           ` Peter Zijlstra
2019-06-26 16:30                       ` Peter Zijlstra
2019-06-26 22:33                         ` Nick Desaulniers
2019-06-26 23:11                           ` Thomas Gleixner
2019-06-27  7:11                           ` Peter Zijlstra
2019-06-25 23:46                     ` Arnaldo Carvalho de Melo
2019-06-26  5:14                       ` Nathan Chancellor
2019-06-25 20:09                 ` Kees Cook
2019-06-26  8:06               ` Peter Zijlstra
2019-06-25  7:15         ` Peter Zijlstra
2019-07-25 16:27 ` [tip:perf/urgent] " tip-bot for Gustavo A. R. Silva
2019-07-25 17:06   ` Borislav Petkov
2019-07-25 17:35     ` Peter Zijlstra
2019-07-25 23:18       ` Joe Perches
2019-07-25 23:28         ` Kees Cook

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.