summaryrefslogtreecommitdiffstats
path: root/tools/perf
diff options
context:
space:
mode:
authorJiapeng Chong <jiapeng.chong@linux.alibaba.com>2021-02-05 04:54:15 +0100
committerArnaldo Carvalho de Melo <acme@redhat.com>2021-02-18 14:13:37 +0100
commit52bcc6031c0b459baa1f2cacd1fd4adc78ae0127 (patch)
treedd9161527855ae51bc7fe5263c83a75c42b63a75 /tools/perf
parentperf vendor events arm64: Add JSON metrics for imx8mp DDR Perf (diff)
downloadlinux-52bcc6031c0b459baa1f2cacd1fd4adc78ae0127.tar.xz
linux-52bcc6031c0b459baa1f2cacd1fd4adc78ae0127.zip
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: Abaci Robot <abaci@linux.alibaba.com> Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com> Acked-by: Jiri 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.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf')
-rw-r--r--tools/perf/util/header.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/perf/util/header.c b/tools/perf/util/header.c
index c4ed3dc2c8f4..4fe9e2a54346 100644
--- a/tools/perf/util/header.c
+++ b/tools/perf/util/header.c
@@ -3806,7 +3806,7 @@ int perf_session__read_header(struct perf_session *session)
* check for the pipe header regardless of source.
*/
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;
return err;
}