DORMANTno replies

[PATCH] perf tools: remove unneeded variable

From: <hidden>
Date: 2021-11-12 12:56:25
Also in: lkml
Subsystem: performance events subsystem, the rest · Maintainers: Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo, Namhyung Kim, Linus Torvalds

From: Changcheng Deng <redacted>

Fix the following coccicheck review:
./tools/perf/util/perf_event_attr_fprintf.c: 97: 5-8: Unneeded variable

Remove unneeded variable used to store return value.

Reported-by: Zeal Robot <redacted>
Signed-off-by: Changcheng Deng <redacted>
---
 tools/perf/util/perf_event_attr_fprintf.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/tools/perf/util/perf_event_attr_fprintf.c b/tools/perf/util/perf_event_attr_fprintf.c
index 47b7531f51da..111180bcd466 100644
--- a/tools/perf/util/perf_event_attr_fprintf.c
+++ b/tools/perf/util/perf_event_attr_fprintf.c
@@ -94,7 +94,6 @@ int perf_event_attr__fprintf(FILE *fp, struct perf_event_attr *attr,
 			     attr__fprintf_f attr__fprintf, void *priv)
 {
 	char buf[BUF_SIZE];
-	int ret = 0;
 
 	PRINT_ATTRf(type, p_unsigned);
 	PRINT_ATTRf(size, p_unsigned);
@@ -155,5 +154,5 @@ int perf_event_attr__fprintf(FILE *fp, struct perf_event_attr *attr,
 	PRINT_ATTRf(aux_sample_size, p_unsigned);
 	PRINT_ATTRf(sig_data, p_unsigned);
 
-	return ret;
+	return 0;
 }
-- 
2.25.1
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help