* [PATCH] ARM: shmobile: r8a7779: hide unused r8a7779_platform_cpu_kill
@ 2018-07-06 15:15 Arnd Bergmann
2018-07-06 15:26 ` Geert Uytterhoeven
0 siblings, 1 reply; 3+ messages in thread
From: Arnd Bergmann @ 2018-07-06 15:15 UTC (permalink / raw)
To: Simon Horman, Magnus Damm
Cc: Arnd Bergmann, Geert Uytterhoeven, Wolfram Sang,
Yoshihiro Shimoda, linux-renesas-soc, linux-arm-kernel,
linux-kernel
After the cleanup in r8a7779_smp_prepare_cpus(), the only remaining caller of
r8a7779_platform_cpu_kill() is in an ifdef, which leads to a build warning
without CONFIG_HOTPLUG_CPU:
arch/arm/mach-shmobile/smp-r8a7779.c:26:12: error: 'r8a7779_platform_cpu_kill' defined but not used [-Werror=unused-function]
This moves the function inside of that #ifdef to avoid the warning.
Fixes: 62f55ce683e3 ("ARM: shmobile: r8a7779: Stop powering down secondary CPUs during early boot")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
arch/arm/mach-shmobile/smp-r8a7779.c | 22 +++++++++++-----------
1 file changed, 11 insertions(+), 11 deletions(-)
diff --git a/arch/arm/mach-shmobile/smp-r8a7779.c b/arch/arm/mach-shmobile/smp-r8a7779.c
index b7fe1f489b08..0ed73b650c14 100644
--- a/arch/arm/mach-shmobile/smp-r8a7779.c
+++ b/arch/arm/mach-shmobile/smp-r8a7779.c
@@ -23,17 +23,6 @@
#define AVECR IOMEM(0xfe700040)
#define R8A7779_SCU_BASE 0xf0000000
-static int r8a7779_platform_cpu_kill(unsigned int cpu)
-{
- int ret = -EIO;
-
- cpu = cpu_logical_map(cpu);
- if (cpu)
- ret = rcar_sysc_power_down_cpu(cpu);
-
- return ret ? ret : 1;
-}
-
static int r8a7779_boot_secondary(unsigned int cpu, struct task_struct *idle)
{
int ret = -EIO;
@@ -55,6 +44,17 @@ static void __init r8a7779_smp_prepare_cpus(unsigned int max_cpus)
}
#ifdef CONFIG_HOTPLUG_CPU
+static int r8a7779_platform_cpu_kill(unsigned int cpu)
+{
+ int ret = -EIO;
+
+ cpu = cpu_logical_map(cpu);
+ if (cpu)
+ ret = rcar_sysc_power_down_cpu(cpu);
+
+ return ret ? ret : 1;
+}
+
static int r8a7779_cpu_kill(unsigned int cpu)
{
if (shmobile_smp_scu_cpu_kill(cpu))
--
2.9.0
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] ARM: shmobile: r8a7779: hide unused r8a7779_platform_cpu_kill
2018-07-06 15:15 [PATCH] ARM: shmobile: r8a7779: hide unused r8a7779_platform_cpu_kill Arnd Bergmann
@ 2018-07-06 15:26 ` Geert Uytterhoeven
2018-07-09 12:58 ` Simon Horman
0 siblings, 1 reply; 3+ messages in thread
From: Geert Uytterhoeven @ 2018-07-06 15:26 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Simon Horman, Magnus Damm, Geert Uytterhoeven, Wolfram Sang,
Yoshihiro Shimoda, Linux-Renesas, Linux ARM,
Linux Kernel Mailing List
Hi Arnd,
On Fri, Jul 6, 2018 at 5:15 PM Arnd Bergmann <arnd@arndb.de> wrote:
> After the cleanup in r8a7779_smp_prepare_cpus(), the only remaining caller of
> r8a7779_platform_cpu_kill() is in an ifdef, which leads to a build warning
> without CONFIG_HOTPLUG_CPU:
>
> arch/arm/mach-shmobile/smp-r8a7779.c:26:12: error: 'r8a7779_platform_cpu_kill' defined but not used [-Werror=unused-function]
>
> This moves the function inside of that #ifdef to avoid the warning.
>
> Fixes: 62f55ce683e3 ("ARM: shmobile: r8a7779: Stop powering down secondary CPUs during early boot")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Thanks, seems like I only built the R-Car Gen2 code without
CONFIG_HOTPLUG_CPU...
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] ARM: shmobile: r8a7779: hide unused r8a7779_platform_cpu_kill
2018-07-06 15:26 ` Geert Uytterhoeven
@ 2018-07-09 12:58 ` Simon Horman
0 siblings, 0 replies; 3+ messages in thread
From: Simon Horman @ 2018-07-09 12:58 UTC (permalink / raw)
To: Geert Uytterhoeven
Cc: Arnd Bergmann, Magnus Damm, Geert Uytterhoeven, Wolfram Sang,
Yoshihiro Shimoda, Linux-Renesas, Linux ARM,
Linux Kernel Mailing List
On Fri, Jul 06, 2018 at 05:26:40PM +0200, Geert Uytterhoeven wrote:
> Hi Arnd,
>
> On Fri, Jul 6, 2018 at 5:15 PM Arnd Bergmann <arnd@arndb.de> wrote:
> > After the cleanup in r8a7779_smp_prepare_cpus(), the only remaining caller of
> > r8a7779_platform_cpu_kill() is in an ifdef, which leads to a build warning
> > without CONFIG_HOTPLUG_CPU:
> >
> > arch/arm/mach-shmobile/smp-r8a7779.c:26:12: error: 'r8a7779_platform_cpu_kill' defined but not used [-Werror=unused-function]
> >
> > This moves the function inside of that #ifdef to avoid the warning.
> >
> > Fixes: 62f55ce683e3 ("ARM: shmobile: r8a7779: Stop powering down secondary CPUs during early boot")
> > Signed-off-by: Arnd Bergmann <arnd@arndb.de>
>
> Thanks, seems like I only built the R-Car Gen2 code without
> CONFIG_HOTPLUG_CPU...
>
> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Thanks, applied.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-07-09 12:58 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-06 15:15 [PATCH] ARM: shmobile: r8a7779: hide unused r8a7779_platform_cpu_kill Arnd Bergmann
2018-07-06 15:26 ` Geert Uytterhoeven
2018-07-09 12:58 ` Simon Horman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®