Skip to content

Commit

Permalink
arm64: psci: fix !CONFIG_HOTPLUG_CPU build warning
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Will Deacon authored and Catalin Marinas committed Jun 11, 2015
1 parent 32365e6 commit 73bf841
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions arch/arm64/kernel/psci.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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 */
Expand Down

0 comments on commit 73bf841

Please sign in to comment.