x86/cpufreq: Clean up powernow registration
authorAndrew Cooper <andrew.cooper3@citrix.com>
Fri, 12 Nov 2021 15:13:36 +0000 (15:13 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Mon, 29 Nov 2021 13:53:05 +0000 (13:53 +0000)
commiteed4f94ddbf15e70da93a075a878c304f0a079cb
tree8c217bbaa5b46e150e9429337b80b0251a7623e1
parentee3407bb05dae8fa2bbd6476e36bd96d352fd19e
x86/cpufreq: Clean up powernow registration

powernow_register_driver() is currently written with a K&R type definition;
I'm surprised that compilers don't object to a mismatch with its declaration,
which is written in an ANSI-C compatible way.

Furthermore, its sole caller is cpufreq_driver_init() which is a pre-smp
initcall.  There are no other online CPUs, and even if there were, checking
the BSP's CPUID data $N times is pointless.  Simplify registration to only
look at the BSP.

While at it, drop obviously unused includes.  Also rewrite the expression in
cpufreq_driver_init() for clarity.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
xen/arch/x86/acpi/cpufreq/cpufreq.c
xen/arch/x86/acpi/cpufreq/powernow.c