From: Viresh Kumar Date: Mon, 30 Jan 2017 04:29:57 +0000 (+0530) Subject: ACPI: processor_perflib: Simplify code and stop using CPUFREQ_START X-Git-Tag: v4.14-rc1~1316^2~1^2~25^2~7 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=fa29ae5f221860e22a7346d89ae38a28ed104045;p=platform%2Fkernel%2Flinux-rpi3.git 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 Signed-off-by: Rafael J. Wysocki --- diff --git a/drivers/acpi/processor_perflib.c b/drivers/acpi/processor_perflib.c index f0b4a98..18b72ee 100644 --- a/drivers/acpi/processor_perflib.c +++ b/drivers/acpi/processor_perflib.c @@ -75,10 +75,8 @@ static int acpi_processor_ppc_notifier(struct notifier_block *nb, struct acpi_processor *pr; unsigned int ppc = 0; - if (event == CPUFREQ_START && ignore_ppc <= 0) { + if (ignore_ppc < 0) ignore_ppc = 0; - return 0; - } if (ignore_ppc) return 0;