]> Git Repo - linux.git/commitdiff
perf/core: Mark expected switch fall-through
authorGustavo A. R. Silva <[email protected]>
Tue, 12 Feb 2019 20:54:30 +0000 (14:54 -0600)
committerIngo Molnar <[email protected]>
Sat, 9 Mar 2019 13:10:32 +0000 (14:10 +0100)
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 <[email protected]>
Signed-off-by: Peter Zijlstra (Intel) <[email protected]>
Cc: Alexander Shishkin <[email protected]>
Cc: Andy Lutomirski <[email protected]>
Cc: Arnaldo Carvalho de Melo <[email protected]>
Cc: Arnaldo Carvalho de Melo <[email protected]>
Cc: Borislav Petkov <[email protected]>
Cc: Dave Hansen <[email protected]>
Cc: H. Peter Anvin <[email protected]>
Cc: Jiri Olsa <[email protected]>
Cc: Kees Cook <[email protected]>
Cc: Linus Torvalds <[email protected]>
Cc: Namhyung Kim <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Rik van Riel <[email protected]>
Cc: Stephane Eranian <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: Vince Weaver <[email protected]>
Link: https://lkml.kernel.org/r/20190212205430.GA8446@embeddedor
Signed-off-by: Ingo Molnar <[email protected]>
kernel/events/core.c

index 5f59d848171ea587f4cfcc8c8e18e4b5ea01ae85..68ff130b99e77414d67bb8eac45c24e52f74a6ad 100644 (file)
@@ -9174,6 +9174,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:
This page took 0.067024 seconds and 4 git commands to generate.