]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
arm64: cpuidle: fix #ifdef for acpi functions
authorArnd Bergmann <arnd@arndb.de>
Tue, 16 May 2023 16:06:34 +0000 (18:06 +0200)
committerCatalin Marinas <catalin.marinas@arm.com>
Thu, 25 May 2023 16:44:02 +0000 (17:44 +0100)
The acpi_processor_ffh_lpi_* functions are defined whenever CONFIG_ACPI
is enabled, but only called and declared when CONFIG_ACPI_PROCESSOR_IDLE
is also enabled. Without that, a W=1 build triggers missing-prototope
warnings, so the #ifdef needs to be adapted:

arch/arm64/kernel/cpuidle.c:60:5: error: no previous prototype for 'acpi_processor_ffh_lpi_probe' [-Werror=missing-prototypes]
arch/arm64/kernel/cpuidle.c:65:15: error: no previous prototype for 'acpi_processor_ffh_lpi_enter' [-Werror=missing-prototypes]

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Kees Cook <keescook@chromium.org>
Acked-by: Ard Biesheuvel <ardb@kernel.org>
Link: https://lore.kernel.org/r/20230516160642.523862-8-arnd@kernel.org
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
arch/arm64/kernel/cpuidle.c

index 42e19fff40ee6561bed424de57f00b0ecf46e01b..d1f68599c29fe2826d8caca15f0c85bfa703f3fd 100644 (file)
@@ -13,7 +13,7 @@
 #include <linux/of_device.h>
 #include <linux/psci.h>
 
-#ifdef CONFIG_ACPI
+#ifdef CONFIG_ACPI_PROCESSOR_IDLE
 
 #include <acpi/processor.h>