diff options
author | Will Deacon <will.deacon@arm.com> | 2015-06-11 13:16:47 -0400 |
---|---|---|
committer | Catalin Marinas <catalin.marinas@arm.com> | 2015-06-11 13:20:27 -0400 |
commit | 73bf8412e4f24b114c853012663fff4d3cde06a2 (patch) | |
tree | 4767d8781c76a718bfa6949dc1090463e76b1c16 | |
parent | 32365e64a20edcc783137ad17fdd951ab814a2fe (diff) |
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 <will.deacon@arm.com>
[Mark: write commit message]
Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
-rw-r--r-- | arch/arm64/kernel/psci.c | 10 |
1 files changed, 5 insertions, 5 deletions
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) | |||
58 | */ | 58 | */ |
59 | static int resident_cpu = -1; | 59 | static int resident_cpu = -1; |
60 | 60 | ||
61 | static bool psci_tos_resident_on(int cpu) | ||
62 | { | ||
63 | return cpu == resident_cpu; | ||
64 | } | ||
65 | |||
66 | struct psci_operations { | 61 | struct psci_operations { |
67 | int (*cpu_suspend)(u32 state, unsigned long entry_point); | 62 | int (*cpu_suspend)(u32 state, unsigned long entry_point); |
68 | int (*cpu_off)(u32 state); | 63 | int (*cpu_off)(u32 state); |
@@ -494,6 +489,11 @@ static int cpu_psci_cpu_boot(unsigned int cpu) | |||
494 | } | 489 | } |
495 | 490 | ||
496 | #ifdef CONFIG_HOTPLUG_CPU | 491 | #ifdef CONFIG_HOTPLUG_CPU |
492 | static bool psci_tos_resident_on(int cpu) | ||
493 | { | ||
494 | return cpu == resident_cpu; | ||
495 | } | ||
496 | |||
497 | static int cpu_psci_cpu_disable(unsigned int cpu) | 497 | static int cpu_psci_cpu_disable(unsigned int cpu) |
498 | { | 498 | { |
499 | /* Fail early if we don't have CPU_OFF support */ | 499 | /* Fail early if we don't have CPU_OFF support */ |