[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tip-132efb95080bcf690bdfea1b6f0d57853ee4d48f@git.kernel.org>
Date: Fri, 14 Dec 2018 12:26:33 -0800
From: tip-bot for Wen Yang <tipbot@...or.com>
To: linux-tip-commits@...r.kernel.org
Cc: jolsa@...hat.com, namhyung@...nel.org,
linux-kernel@...r.kernel.org, hpa@...or.com, tglx@...utronix.de,
julia.lawall@...6.fr, yellowriver2010@...mail.com,
wen.yang99@....com.cn, mingo@...nel.org, acme@...hat.com,
peterz@...radead.org, alexander.shishkin@...ux.intel.com
Subject: [tip:perf/core] perf bpf: Use ERR_CAST instead of
ERR_PTR(PTR_ERR())
Commit-ID: 132efb95080bcf690bdfea1b6f0d57853ee4d48f
Gitweb: https://git.kernel.org/tip/132efb95080bcf690bdfea1b6f0d57853ee4d48f
Author: Wen Yang <wen.yang99@....com.cn>
AuthorDate: Tue, 27 Nov 2018 17:06:10 +0800
Committer: Arnaldo Carvalho de Melo <acme@...hat.com>
CommitDate: Thu, 29 Nov 2018 20:42:48 -0300
perf bpf: Use ERR_CAST instead of ERR_PTR(PTR_ERR())
Use ERR_CAST inlined function instead of ERR_PTR(PTR_ERR(...)). This
makes it more readable and also fix this warning detected by
err_cast.cocci:
tools/perf/util/bpf-loader.c:1606:11-18: WARNING: ERR_CAST can be used with op
Signed-off-by: Wen Yang <wen.yang99@....com.cn>
Cc: Alexander Shishkin <alexander.shishkin@...ux.intel.com>
Cc: Jiri Olsa <jolsa@...hat.com>
Cc: Julia Lawall <julia.lawall@...6.fr>
Cc: Namhyung Kim <namhyung@...nel.org>
Cc: Peter Zijlstra <peterz@...radead.org>
Cc: Wen Yang <yellowriver2010@...mail.com>
Cc: zhong.weidong@....com.cn
Link: http://lkml.kernel.org/r/20181127090610.28488-1-wen.yang99@zte.com.cn
Signed-off-by: Arnaldo Carvalho de Melo <acme@...hat.com>
---
tools/perf/util/bpf-loader.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/perf/util/bpf-loader.c b/tools/perf/util/bpf-loader.c
index f9ae1a993806..9a280647d829 100644
--- a/tools/perf/util/bpf-loader.c
+++ b/tools/perf/util/bpf-loader.c
@@ -1603,7 +1603,7 @@ struct perf_evsel *bpf__setup_output_event(struct perf_evlist *evlist, const cha
op = bpf_map__add_newop(map, NULL);
if (IS_ERR(op))
- return ERR_PTR(PTR_ERR(op));
+ return ERR_CAST(op);
op->op_type = BPF_MAP_OP_SET_EVSEL;
op->v.evsel = evsel;
}
Powered by blists - more mailing lists