lkml.org 
[lkml]   [2004]   [Jun]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] use c99 struct initializer in hotcpu_notifier
Hi-

The hotcpu_notifier macro does not properly record the given priority in
the notifier block. This causes trouble only for callers which specify
a non-zero priority, of which there are none (yet).

Patch is against 2.6.7-rc2; please apply.

Signed-off-by: Nathan Lynch <nathanl@austin.ibm.com>
--- linux-2.6.5-7.21/include/linux/cpu.h 2004-05-05 12:40:27.000000000 -0500
+++ linux-2.6.5-7.21.new/include/linux/cpu.h 2004-05-06 17:45:55.000000000 -0500
@@ -60,7 +60,8 @@ extern struct semaphore cpucontrol;
#define unlock_cpu_hotplug() up(&cpucontrol)
#define lock_cpu_hotplug_interruptible() down_interruptible(&cpucontrol)
#define hotcpu_notifier(fn, pri) { \
- static struct notifier_block fn##_nb = { fn, pri }; \
+ static struct notifier_block fn##_nb = \
+ { .notifier_call = fn, .priority = pri }; \
register_cpu_notifier(&fn##_nb); \
}
int cpu_down(unsigned int cpu);
\
 
 \ /
  Last update: 2005-03-22 14:03    [W:0.980 / U:0.000 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site