powerpc/sysfs: Move #ifdef CONFIG_HOTPLUG_CPU out of the function body

Michael Ellerman patch-notifications at ellerman.id.au
Thu May 4 08:18:59 AEST 2017


On Mon, 2017-04-24 at 10:46:59 UTC, Michael Ellerman wrote:
> 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 at ellerman.id.au>

Applied to powerpc next.

https://git.kernel.org/powerpc/c/3f2290e1b5192fdfa74f012220a8d9

cheers


More information about the Linuxppc-dev mailing list