Commit 52bcc603 authored by Jiapeng Chong's avatar Jiapeng Chong Committed by Arnaldo Carvalho de Melo

perf tools: Simplify the calculation of variables

Fix the following coccicheck warnings:

./tools/perf/util/header.c:3809:18-20: WARNING !A || A && B is
equivalent to !A || B.
Reported-by: default avatarAbaci Robot <abaci@linux.alibaba.com>
Signed-off-by: default avatarJiapeng Chong <jiapeng.chong@linux.alibaba.com>
Acked-by: default avatarJiri Olsa <jolsa@redhat.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Alexei Starovoitov <ast@kernel.org>
Cc: Andrii Nakryiko <andrii@kernel.org>
Cc: Daniel Borkmann <daniel@iogearbox.net>
Cc: John Fastabend <john.fastabend@gmail.com>
Cc: KP Singh <kpsingh@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Martin KaFai Lau <kafai@fb.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Song Liu <songliubraving@fb.com>
Cc: Yonghong Song <yhs@fb.com>
Cc: bpf@vger.kernel.org
Cc: netdev@vger.kernel.org
Link: http://lore.kernel.org/lkml/1612497255-87189-1-git-send-email-jiapeng.chong@linux.alibaba.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent 37b9c7bb
...@@ -3806,7 +3806,7 @@ int perf_session__read_header(struct perf_session *session) ...@@ -3806,7 +3806,7 @@ int perf_session__read_header(struct perf_session *session)
* check for the pipe header regardless of source. * check for the pipe header regardless of source.
*/ */
err = perf_header__read_pipe(session); err = perf_header__read_pipe(session);
if (!err || (err && perf_data__is_pipe(data))) { if (!err || perf_data__is_pipe(data)) {
data->is_pipe = true; data->is_pipe = true;
return err; return err;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment