From: Len Brown Date: Fri, 20 Jul 2018 18:47:03 +0000 (-0400) Subject: tools/power turbostat: fix -S on UP systems X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=a10170d94ed4954f62e2cf73ce7cf5c531790163;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git tools/power turbostat: fix -S on UP systems [ Upstream commit 9d83601a9cc1884d1b5706ee2acc661d558c6838 ] The -S (system summary) option failed to print any data on a 1-processor system. Reported-by: Artem Bityutskiy Signed-off-by: Len Brown Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- diff --git a/tools/power/x86/turbostat/turbostat.c b/tools/power/x86/turbostat/turbostat.c index bd9c6b31a504..b28de3ad3907 100644 --- a/tools/power/x86/turbostat/turbostat.c +++ b/tools/power/x86/turbostat/turbostat.c @@ -1038,9 +1038,7 @@ void format_all_counters(struct thread_data *t, struct core_data *c, struct pkg_ if (!printed || !summary_only) print_header("\t"); - if (topo.num_cpus > 1) - format_counters(&average.threads, &average.cores, - &average.packages); + format_counters(&average.threads, &average.cores, &average.packages); printed = 1;