Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ACPI: processor_perflib: Simplify code and stop using CPUFREQ_START

acpi_processor_ppc_notifier() can live without using CPUFREQ_START
(which is gonna be removed soon), as it is only used while setting
ignore_ppc to 0. This can be done with the help of "ignore_ppc < 0"
check alone. The notifier function anyway ignores all events except
CPUFREQ_ADJUST and dropping CPUFREQ_START wouldn't harm at all.

Once CPUFREQ_START event is removed from the cpufreq core,
acpi_processor_ppc_notifier() will get called only for CPUFREQ_NOTIFY or
CPUFREQ_ADJUST event. Drop the return statement from the first if block
to make sure we don't ignore any such events.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

authored by

Viresh Kumar and committed by
Rafael J. Wysocki
fa29ae5f b12f7a2b

+1 -3
+1 -3
drivers/acpi/processor_perflib.c
··· 75 75 struct acpi_processor *pr; 76 76 unsigned int ppc = 0; 77 77 78 - if (event == CPUFREQ_START && ignore_ppc <= 0) { 78 + if (ignore_ppc < 0) 79 79 ignore_ppc = 0; 80 - return 0; 81 - } 82 80 83 81 if (ignore_ppc) 84 82 return 0;