[PATCH] perf tools: remove unneeded variable

From: cgel . zte
Date: Fri Nov 12 2021 - 07:56:25 EST


From: Changcheng Deng <deng.changcheng@xxxxxxxxxx>

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 <zealci@xxxxxxxxxx>
Signed-off-by: Changcheng Deng <deng.changcheng@xxxxxxxxxx>
---
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