lkml.org 
[lkml]   [2019]   [Mar]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH] perf/core: Mark expected switch fall-through
Em Thu, Feb 28, 2019 at 03:31:31PM -0600, Gustavo A. R. Silva escreveu:
> Hi all,
>
> Friendly ping:
>
> Who can ack or review this, please?

I'm applying it, thanks.

- Arnaldo

> Thanks
> --
> Gustavo
>
> On 2/12/19 2:54 PM, Gustavo A. R. Silva wrote:
> > 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:
> >

--

- Arnaldo

\
 
 \ /
  Last update: 2019-03-01 14:54    [W:0.109 / U:0.508 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site