All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] perf symbols: turn dso__fprintf_symbols_by_name into void function
@ 2021-03-08  8:55 Yang Li
  2021-03-08 14:20 ` Arnaldo Carvalho de Melo
  0 siblings, 1 reply; 2+ messages in thread
From: Yang Li @ 2021-03-08  8:55 UTC (permalink / raw)
  To: peterz
  Cc: mingo, acme, mark.rutland, alexander.shishkin, jolsa, namhyung,
	linux-kernel, Yang Li

This function always return '0' and no callers use the return value.
So make it a void function.

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
---
 tools/perf/util/dso.h            | 2 +-
 tools/perf/util/symbol_fprintf.c | 5 +----
 2 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/tools/perf/util/dso.h b/tools/perf/util/dso.h
index cd2fe64..d7ebf21 100644
--- a/tools/perf/util/dso.h
+++ b/tools/perf/util/dso.h
@@ -364,7 +364,7 @@ struct dso *machine__findnew_kernel(struct machine *machine, const char *name,
 
 void dso__reset_find_symbol_cache(struct dso *dso);
 
-size_t dso__fprintf_symbols_by_name(struct dso *dso, FILE *fp);
+void dso__fprintf_symbols_by_name(struct dso *dso, FILE *fp);
 size_t dso__fprintf(struct dso *dso, FILE *fp);
 
 static inline bool dso__is_vmlinux(struct dso *dso)
diff --git a/tools/perf/util/symbol_fprintf.c b/tools/perf/util/symbol_fprintf.c
index 35c936c..031584e 100644
--- a/tools/perf/util/symbol_fprintf.c
+++ b/tools/perf/util/symbol_fprintf.c
@@ -59,10 +59,9 @@ size_t symbol__fprintf_symname(const struct symbol *sym, FILE *fp)
 	return __symbol__fprintf_symname_offs(sym, NULL, false, false, fp);
 }
 
-size_t dso__fprintf_symbols_by_name(struct dso *dso,
+void dso__fprintf_symbols_by_name(struct dso *dso,
 				    FILE *fp)
 {
-	size_t ret = 0;
 	struct rb_node *nd;
 	struct symbol_name_rb_node *pos;
 
@@ -70,6 +69,4 @@ size_t dso__fprintf_symbols_by_name(struct dso *dso,
 		pos = rb_entry(nd, struct symbol_name_rb_node, rb_node);
 		fprintf(fp, "%s\n", pos->sym.name);
 	}
-
-	return ret;
 }
-- 
1.8.3.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-03-08 14:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-03-08  8:55 [PATCH] perf symbols: turn dso__fprintf_symbols_by_name into void function Yang Li
2021-03-08 14:20 ` Arnaldo Carvalho de Melo

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.