[ Eeks, please replace previous patch with this, and change the patch
name and changelog as per that indicated in this mail -- apologies
for the inconvenience caused! ]
[PATCH] Redefine {un}register_hotcpu_notifier() !HOTPLUG_CPU stubs as static inline functions
The return of the present "do {} while" based stub definition of
register_hotcpu_notifier() cannot be checked, but the real HOTPLUG_CPU=y
implementation of register_hotcpu_notifier() is int-returning. So let us
make this stub consistent with the full version. Redefining this as such
will also help us remove some #ifdef-ery elsewhere in kernel code, as
shown in forthcoming patch. Also do the same for unregister_xxx case.
Signed-off-by: Satyam Sharma <satyam@infradead.org>
---
include/linux/cpu.h | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/include/linux/cpu.h b/include/linux/cpu.h
index 1d5ded0..6a3697f 100644
--- a/include/linux/cpu.h
+++ b/include/linux/cpu.h
@@ -119,8 +119,13 @@ 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)
#define hotcpu_notifier(fn, pri) do { (void)(fn); } while (0)
-#define register_hotcpu_notifier(nb) do { (void)(nb); } while (0)
-#define unregister_hotcpu_notifier(nb) do { (void)(nb); } while (0)
+static inline int register_hotcpu_notifier(struct notifier_block *nb)
+{
+ return 0;
+}
+static inline void unregister_hotcpu_notifier(struct notifier_block *nb)
+{
+}
/* CPUs don't go offline once they're online w/o CONFIG_HOTPLUG_CPU */
static inline int cpu_is_offline(int cpu) { return 0; }
-
| Greg Kroah-Hartman | [PATCH 004/196] Chinese: add translation of SubmittingPatches |
| David Chinner | Re: [RFD] BIO_RW_BARRIER - what it means for devices, filesystems, and dm/md. |
| Andrew Morton | -mm merge plans for 2.6.23 |
| Trent Piepho | Re: [PATCH] [POWERPC] Improve (in|out)_beXX() asm code |
git: | |
| David Miller | Re: iptables very slow after commit784544739a25c30637397ace5489eeb6e15d7d49 |
| Jarek Poplawski | [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| Gerrit Renker | [PATCH 27/37] dccp: Integration of dynamic feature activation - part 2 (server side) |
| David Miller | [GIT]: Networking |
