Re: [PATCH] perf tests: evsel-tp-sched: Fix bitwise operator

From: Arnaldo Carvalho de Melo
Date: Tue Jan 29 2019 - 04:01:51 EST


Em Wed, Jan 23, 2019 at 09:33:38AM +0100, Jiri Olsa escreveu:
> On Tue, Jan 22, 2019 at 05:34:39PM -0600, Gustavo A. R. Silva wrote:
> > Notice that the use of the bitwise OR operator '|' always leads to
> > true in this particular case, which seems a bit suspicious due to
> > the context in which this expression is being used.
> >
> > Fix this by using bitwise AND operator '&' instead.
> >
> > This bug was detected with the help of Coccinelle.
> >
> > Fixes: 6a6cd11d4e57 ("perf test: Add test for the sched tracepoint format fields")
> > Cc: stable@xxxxxxxxxxxxxxx
> > Signed-off-by: Gustavo A. R. Silva <gustavo@xxxxxxxxxxxxxx>
>
> nice catch
>
> Acked-by: Jiri Olsa <jolsa@xxxxxxxxxx>

Argh, applied, and looking for an old brown paper bag...

- Arnaldo