Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1585766pxb; Mon, 8 Mar 2021 00:57:01 -0800 (PST) X-Google-Smtp-Source: ABdhPJxeaT3doRmRw2wCaUta+bHwWFQljl090m1VKIAAsJ3a3FO3Cv2fuVd58knPHPmBnsViW1tI X-Received: by 2002:a17:906:68c5:: with SMTP id y5mr14212674ejr.371.1615193821103; Mon, 08 Mar 2021 00:57:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615193821; cv=none; d=google.com; s=arc-20160816; b=Wlk5tUUXxjOAqhcJbX+BVGqCZ0FGf1TJ3XxBDGUUotgfqcNjA0EqNfr23DtMEWX02M ZaT1u+U1K8sAs0g/aBZon/czVPpQQRIy3yjbj0/pSy4ceytUmhMvvpTWPxSFJ95cZLZj HgogUORD/245m+oal4WSr1iZBq55zowM+YBaHou2ElMn9RtFFgynVCINZA4D3qTRk0kt SzELWHe33jsFrqVyyKQZzxqRVbVgJf6JghwCxWOWJ6qUEoCPzZ1cEiUViyKOlrESwpYz Sajoq/fKBK5PF37KiLJAV9fTospP5pTcI7hE9Mae+TcOLeoMp1IagerqPSKj13mNoqNh +CkQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from; bh=O9PLeSzLp9SqNKO+ow6IHO0b10OS0pRDJmdO6HulumM=; b=DAky1bri4KtQk4wRq5v95cLszwh80WylWVOE/0Xcxmnze19ENMFOnBEG6WLjz+PIl0 UXg0FDiV95AxEP33nFfz+9Yc9cJM5zle+qoM8ZhtuseH6gs1xFJVS9drzvdA5K7ugYd3 QeZF396yIRd7RYQFXNO/Ei/SU8XeWmlScDTRn1BRcgxE7+lbQvOrOPA7LXAqZrXw8n/h d2IceqsOvA3AvxpCvQHEtTBzgv8wlcYp3rj5bJxWndoIZtnoRV5JKHLXiyinq+6bC+pX JZGV8sCvawnfcN1LfKlXRDHtgQBb1qlwnvXIXpFbTG37d2lYi180wSFtUhuCy2mMfjFH bu0A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r18si6426121edw.69.2021.03.08.00.56.38; Mon, 08 Mar 2021 00:57:01 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229608AbhCHIzg (ORCPT + 99 others); Mon, 8 Mar 2021 03:55:36 -0500 Received: from out30-56.freemail.mail.aliyun.com ([115.124.30.56]:35441 "EHLO out30-56.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229494AbhCHIzI (ORCPT ); Mon, 8 Mar 2021 03:55:08 -0500 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R751e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e04426;MF=yang.lee@linux.alibaba.com;NM=1;PH=DS;RN=9;SR=0;TI=SMTPD_---0UQtN008_1615193706; Received: from j63c13417.sqa.eu95.tbsite.net(mailfrom:yang.lee@linux.alibaba.com fp:SMTPD_---0UQtN008_1615193706) by smtp.aliyun-inc.com(127.0.0.1); Mon, 08 Mar 2021 16:55:06 +0800 From: Yang Li To: peterz@infradead.org Cc: mingo@redhat.com, acme@kernel.org, mark.rutland@arm.com, alexander.shishkin@linux.intel.com, jolsa@redhat.com, namhyung@kernel.org, linux-kernel@vger.kernel.org, Yang Li Subject: [PATCH] perf symbols: turn dso__fprintf_symbols_by_name into void function Date: Mon, 8 Mar 2021 16:55:04 +0800 Message-Id: <1615193704-19876-1-git-send-email-yang.lee@linux.alibaba.com> X-Mailer: git-send-email 1.8.3.1 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This function always return '0' and no callers use the return value. So make it a void function. Reported-by: Abaci Robot Signed-off-by: Yang Li --- 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