* [PATCH] tools/perf: remove redundant err variable
@ 2022-01-12 8:01 cgel.zte
2022-01-22 20:26 ` Arnaldo Carvalho de Melo
0 siblings, 1 reply; 2+ messages in thread
From: cgel.zte @ 2022-01-12 8:01 UTC (permalink / raw)
To: mingo
Cc: acme, mark.rutland, alexander.shishkin, jolsa, namhyung,
linux-perf-users, linux-kernel, Minghao Chi, Zeal Robot, CGEL ZTE
From: Minghao Chi <chi.minghao@zte.com.cn>
Return value from perf_event__process_tracing_data() directly instead
of taking this in another redundant variable.
Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Minghao Chi <chi.minghao@zte.com.cn>
Signed-off-by: CGEL ZTE <cgel.zte@gmail.com>
---
tools/perf/builtin-inject.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/tools/perf/builtin-inject.c b/tools/perf/builtin-inject.c
index 409b721666cb..fbf43a454cba 100644
--- a/tools/perf/builtin-inject.c
+++ b/tools/perf/builtin-inject.c
@@ -535,12 +535,9 @@ static int perf_event__repipe_exit(struct perf_tool *tool,
static int perf_event__repipe_tracing_data(struct perf_session *session,
union perf_event *event)
{
- int err;
-
perf_event__repipe_synth(session->tool, event);
- err = perf_event__process_tracing_data(session, event);
- return err;
+ return perf_event__process_tracing_data(session, event);
}
static int dso__read_build_id(struct dso *dso)
--
2.25.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] tools/perf: remove redundant err variable
2022-01-12 8:01 [PATCH] tools/perf: remove redundant err variable cgel.zte
@ 2022-01-22 20:26 ` Arnaldo Carvalho de Melo
0 siblings, 0 replies; 2+ messages in thread
From: Arnaldo Carvalho de Melo @ 2022-01-22 20:26 UTC (permalink / raw)
To: cgel.zte
Cc: mingo, mark.rutland, alexander.shishkin, jolsa, namhyung,
linux-perf-users, linux-kernel, Minghao Chi, Zeal Robot
Em Wed, Jan 12, 2022 at 08:01:09AM +0000, cgel.zte@gmail.com escreveu:
> From: Minghao Chi <chi.minghao@zte.com.cn>
>
> Return value from perf_event__process_tracing_data() directly instead
> of taking this in another redundant variable.
Thanks, applied.
- Arnaldo
> Reported-by: Zeal Robot <zealci@zte.com.cn>
> Signed-off-by: Minghao Chi <chi.minghao@zte.com.cn>
> Signed-off-by: CGEL ZTE <cgel.zte@gmail.com>
> ---
> tools/perf/builtin-inject.c | 5 +----
> 1 file changed, 1 insertion(+), 4 deletions(-)
>
> diff --git a/tools/perf/builtin-inject.c b/tools/perf/builtin-inject.c
> index 409b721666cb..fbf43a454cba 100644
> --- a/tools/perf/builtin-inject.c
> +++ b/tools/perf/builtin-inject.c
> @@ -535,12 +535,9 @@ static int perf_event__repipe_exit(struct perf_tool *tool,
> static int perf_event__repipe_tracing_data(struct perf_session *session,
> union perf_event *event)
> {
> - int err;
> -
> perf_event__repipe_synth(session->tool, event);
> - err = perf_event__process_tracing_data(session, event);
>
> - return err;
> + return perf_event__process_tracing_data(session, event);
> }
>
> static int dso__read_build_id(struct dso *dso)
> --
> 2.25.1
--
- Arnaldo
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-01-22 20:28 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-01-12 8:01 [PATCH] tools/perf: remove redundant err variable cgel.zte
2022-01-22 20:26 ` Arnaldo Carvalho de Melo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).