Skip to content

Commit 8264dde

Browse files
arndbolofj
authored andcommitted
ARM: tango: fix CONFIG_HOTPLUG_CPU=n build
Building with CONFIG_HOTPLUG_CPU disabled fails for mach-tango: include/linux/stddef.h:7:14: error: excess elements in struct initializer [-Werror] #define NULL ((void *)0) arch/arm/mach-tango/platsmp.c:48:15: note: in expansion of macro 'tango_cpu_kill' .cpu_kill = tango_cpu_kill, the problem as that the .cpu_kill and .cpu_die struct members are unavailable and we must not try to assign them in this configuration. Hiding the two (as all other platforms do too) lets us get rid of the #else clause as well. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Olof Johansson <olof@lixom.net>
1 parent 7c2d780 commit 8264dde

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

arch/arm/mach-tango/platsmp.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,15 +38,14 @@ static void tango_cpu_die(unsigned int cpu)
3838

3939
panic("cpu %d failed to die\n", cpu);
4040
}
41-
#else
42-
#define tango_cpu_kill NULL
43-
#define tango_cpu_die NULL
4441
#endif
4542

4643
static const struct smp_operations tango_smp_ops __initconst = {
4744
.smp_boot_secondary = tango_boot_secondary,
45+
#ifdef CONFIG_HOTPLUG_CPU
4846
.cpu_kill = tango_cpu_kill,
4947
.cpu_die = tango_cpu_die,
48+
#endif
5049
};
5150

5251
CPU_METHOD_OF_DECLARE(tango4_smp, "sigma,tango4-smp", &tango_smp_ops);

0 commit comments

Comments
 (0)