Skip to contentSkip to conversation

tools/perf: remove redundant err variable

PATCH Applied [email protected] 2 participants 2 messages Jan 12, 2022 – Jan 22, 2022 perf events

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tools/perf: remove redundant err variable

From: Minghao Chi <[email protected]>

Return value from perf_event__process_tracing_data() directly instead of taking this in another redundant variable.

---
 tools/perf/builtin-inject.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
tools/perf/builtin-inject.c +1 -4
index 409b721666cb..fbf43a454cba 100644
@@ -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)
Signature · 1 line
2.25.1
maintainer Applied
#1 lore raw

Em Wed, Jan 12, 2022 at 08:01:09AM +0000, [email protected] escreveu:

Quoted 4 lines

From: Minghao Chi <[email protected]>

Return value from perf_event__process_tracing_data() directly instead of taking this in another redundant variable.

Thanks, applied.

- Arnaldo

Quoted 27 lines
---
 tools/perf/builtin-inject.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
tools/perf/builtin-inject.c +1 -4
index 409b721666cb..fbf43a454cba 100644
@@ -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)
Signature · 1 line
2.25.1
Signature · 1 line
- Arnaldo