]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/sysfs: Move #ifdef CONFIG_HOTPLUG_CPU out of the function body
authorMichael Ellerman <mpe@ellerman.id.au>
Mon, 24 Apr 2017 10:46:59 +0000 (20:46 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Wed, 3 May 2017 04:45:38 +0000 (14:45 +1000)
commitae1c2f53346995a5fb4fd4ca603d108a467bdee4
treed789e4a7958fcde2c25d55d7e436452f461bcc8f
parent4e8c7f06b15ae5ea6ae600ad5d2cf21012840d33
powerpc/sysfs: Move #ifdef CONFIG_HOTPLUG_CPU out of the function body

The entire body of unregister_cpu_online() is inside an #ifdef
CONFIG_HOTPLUG_CPU block. This is ugly and means we create an empty function
when hotplug is disabled for no reason.

Instead move the #ifdef out of the function body and define the function to be
NULL in the else case. This means we'll pass NULL to cpuhp_setup_state(), but
that's fine because it accepts NULL to mean there is no teardown callback, which
is exactly what we want.

Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/kernel/sysfs.c