From: Andrew Morton C functions are nicer - they do type checking. Cc: Gautham R Shenoy Signed-off-by: Andrew Morton --- include/linux/cpu.h | 12 ++++++++---- 1 files changed, 8 insertions(+), 4 deletions(-) diff -puN include/linux/cpu.h~handle-per-subsystem-mutexes-for-config_hotplug_cpu-not-set-tidy include/linux/cpu.h --- a/include/linux/cpu.h~handle-per-subsystem-mutexes-for-config_hotplug_cpu-not-set-tidy +++ a/include/linux/cpu.h @@ -97,9 +97,13 @@ extern void unlock_cpu_hotplug(void); #define unregister_hotcpu_notifier(nb) unregister_cpu_notifier(nb) int cpu_down(unsigned int cpu); #define cpu_is_offline(cpu) unlikely(!cpu_online(cpu)) -#else -#define cpuhotplug_mutex_lock(m) do { (void)(m); } while (0) -#define cpuhotplug_mutex_unlock(m) do { (void)(m); } while (0) + +#else /* CONFIG_HOTPLUG_CPU */ + +static inline void cpuhotplug_mutex_lock(struct mutex *cpu_hp_mutex) +{ } +static inline void cpuhotplug_mutex_unlock(struct mutex *cpu_hp_mutex) +{ } #define lock_cpu_hotplug() do { } while (0) #define unlock_cpu_hotplug() do { } while (0) @@ -110,7 +114,7 @@ int cpu_down(unsigned int cpu); /* CPUs don't go offline once they're online w/o CONFIG_HOTPLUG_CPU */ static inline int cpu_is_offline(int cpu) { return 0; } -#endif +#endif /* CONFIG_HOTPLUG_CPU */ #ifdef CONFIG_SUSPEND_SMP extern int disable_nonboot_cpus(void); _