Commit-ID: 43aa378b41700650e4ddbd068650f9fe4ab496df Gitweb: https://git.kernel.org/tip/43aa378b41700650e4ddbd068650f9fe4ab496df Author: Gustavo A. R. Silva <gust...@embeddedor.com> AuthorDate: Tue, 12 Feb 2019 14:54:30 -0600 Committer: Ingo Molnar <mi...@kernel.org> CommitDate: Sat, 9 Mar 2019 14:10:32 +0100
perf/core: Mark expected switch fall-through 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 <gust...@embeddedor.com> Signed-off-by: Peter Zijlstra (Intel) <pet...@infradead.org> Cc: Alexander Shishkin <alexander.shish...@linux.intel.com> Cc: Andy Lutomirski <l...@kernel.org> Cc: Arnaldo Carvalho de Melo <a...@kernel.org> Cc: Arnaldo Carvalho de Melo <a...@redhat.com> Cc: Borislav Petkov <b...@alien8.de> Cc: Dave Hansen <dave.han...@linux.intel.com> Cc: H. Peter Anvin <h...@zytor.com> Cc: Jiri Olsa <jo...@redhat.com> Cc: Kees Cook <keesc...@chromium.org> Cc: Linus Torvalds <torva...@linux-foundation.org> Cc: Namhyung Kim <namhy...@kernel.org> Cc: Peter Zijlstra <pet...@infradead.org> Cc: Rik van Riel <r...@surriel.com> Cc: Stephane Eranian <eran...@google.com> Cc: Thomas Gleixner <t...@linutronix.de> Cc: Vince Weaver <vincent.wea...@maine.edu> Link: https://lkml.kernel.org/r/20190212205430.GA8446@embeddedor Signed-off-by: Ingo Molnar <mi...@kernel.org> --- kernel/events/core.c | 1 + 1 file changed, 1 insertion(+) diff --git a/kernel/events/core.c b/kernel/events/core.c index 5f59d848171e..68ff130b99e7 100644 --- a/kernel/events/core.c +++ b/kernel/events/core.c @@ -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: