lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Wed, 23 Nov 2022 17:00:50 +0800 (CST) From: <zhang.songyi@....com.cn> To: <peterz@...radead.org>, <zhengjun.xing@...ux.intel.com> Cc: <mingo@...hat.com>, <acme@...nel.org>, <mark.rutland@....com>, <alexander.shishkin@...ux.intel.com>, <jolsa@...nel.org>, <namhyung@...nel.org>, <kan.liang@...ux.intel.com>, <irogers@...gle.com>, <zhang.songyi@....com.cn>, <adrian.hunter@...el.com>, <linux-perf-users@...r.kernel.org>, <linux-kernel@...r.kernel.org> Subject: [PATCH linux-next] perf stat: remove redundant variable in arch_get_topdown_pmu_name From: zhang songyi <zhang.songyi@....com.cn> Return value from arch_get_topdown_pmu_name directly instead of taking this in another redundant variable. Signed-off-by: zhang songyi <zhang.songyi@....com.cn> --- tools/perf/arch/x86/util/topdown.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/tools/perf/arch/x86/util/topdown.c b/tools/perf/arch/x86/util/topdown.c index 54810f9acd6f..5a5cdd6efe4d 100644 --- a/tools/perf/arch/x86/util/topdown.c +++ b/tools/perf/arch/x86/util/topdown.c @@ -84,8 +84,6 @@ bool arch_topdown_sample_read(struct evsel *leader) const char *arch_get_topdown_pmu_name(struct evlist *evlist, bool warn) { - const char *pmu_name; - if (!perf_pmu__has_hybrid()) return "cpu"; @@ -95,9 +93,7 @@ const char *arch_get_topdown_pmu_name(struct evlist *evlist, bool warn) evlist->hybrid_pmu_name = perf_pmu__hybrid_type_to_pmu("core"); } - pmu_name = evlist->hybrid_pmu_name; - - return pmu_name; + return evlist->hybrid_pmu_name; } int topdown_parse_events(struct evlist *evlist) -- 2.15.2
Powered by blists - more mailing lists