From: Will Deacon Date: Thu, 11 Jun 2015 17:16:47 +0000 (+0100) Subject: arm64: psci: fix !CONFIG_HOTPLUG_CPU build warning X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=73bf8412e4f24b114c853012663fff4d3cde06a2;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git arm64: psci: fix !CONFIG_HOTPLUG_CPU build warning When building without CONFIG_HOTPLUG_CPU, GCC complains (rightly) that psci_tos_resident_on is unused: arch/arm64/kernel/psci.c:61:13: warning: ‘psci_tos_resident_on’ defined but not used [-Wunused-function] static bool psci_tos_resident_on(int cpu) As it's only ever used when CONFIG_HOTPLUG_CPU is selected, let's move it into the existing ifdef. Signed-off-by: Will Deacon [Mark: write commit message] Signed-off-by: Mark Rutland Signed-off-by: Catalin Marinas --- diff --git a/arch/arm64/kernel/psci.c b/arch/arm64/kernel/psci.c index cba05d9bcbc6..20521377c4b3 100644 --- a/arch/arm64/kernel/psci.c +++ b/arch/arm64/kernel/psci.c @@ -58,11 +58,6 @@ static bool psci_power_state_is_valid(u32 state) */ static int resident_cpu = -1; -static bool psci_tos_resident_on(int cpu) -{ - return cpu == resident_cpu; -} - struct psci_operations { int (*cpu_suspend)(u32 state, unsigned long entry_point); int (*cpu_off)(u32 state); @@ -494,6 +489,11 @@ static int cpu_psci_cpu_boot(unsigned int cpu) } #ifdef CONFIG_HOTPLUG_CPU +static bool psci_tos_resident_on(int cpu) +{ + return cpu == resident_cpu; +} + static int cpu_psci_cpu_disable(unsigned int cpu) { /* Fail early if we don't have CPU_OFF support */