All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] perf/core: Mark expected switch fall-through
@ 2019-02-12 20:54 Gustavo A. R. Silva
  2019-02-28 21:31 ` Gustavo A. R. Silva
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Gustavo A. R. Silva @ 2019-02-12 20:54 UTC (permalink / raw)
  To: Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo,
	Alexander Shishkin, Jiri Olsa, Namhyung Kim
  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 warning:

kernel/events/core.c: In function ‘perf_event_parse_addr_filter’:
kernel/events/core.c:9154:11: warning: this statement may fall through [-Wimplicit-fallthrough=]
    kernel = 1;
    ~~~~~~~^~~
kernel/events/core.c:9156:3: note: here
   case IF_SRC_FILEADDR:
   ^~~~

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>
---
 kernel/events/core.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/kernel/events/core.c b/kernel/events/core.c
index ac194d3aae32..343ee21ab958 100644
--- a/kernel/events/core.c
+++ b/kernel/events/core.c
@@ -9152,6 +9152,7 @@ perf_event_parse_addr_filter(struct perf_event *event, char *fstr,
 		case IF_SRC_KERNELADDR:
 		case IF_SRC_KERNEL:
 			kernel = 1;
+			/* fall through */
 
 		case IF_SRC_FILEADDR:
 		case IF_SRC_FILE:
-- 
2.20.1


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

end of thread, other threads:[~2019-03-09 19:49 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-12 20:54 [PATCH] perf/core: Mark expected switch fall-through Gustavo A. R. Silva
2019-02-28 21:31 ` Gustavo A. R. Silva
2019-03-01 13:53   ` Arnaldo Carvalho de Melo
2019-03-01 15:50     ` Gustavo A. R. Silva
2019-03-09 14:40 ` [tip:perf/urgent] " tip-bot for Gustavo A. R. Silva
2019-03-09 19:48 ` [tip:perf/urgent] perf: " tip-bot for Gustavo A. R. Silva

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.