[PATCH] Remove __devinit and __cpuinit from notifier_call definitions
authorChandra Seetharaman <sekharan@us.ibm.com>
Tue, 25 Apr 2006 02:35:21 +0000 (19:35 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Wed, 26 Apr 2006 15:30:03 +0000 (08:30 -0700)
Few of the notifier_chain_register() callers use __init in the definition
of notifier_call.  It is incorrect as the function definition should be
available after the initializations (they do not unregister them during
initializations).

This patch fixes all such usages to _not_ have the notifier_call __init
section.

Signed-off-by: Chandra Seetharaman <sekharan@us.ibm.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 files changed:
arch/i386/kernel/cpu/intel_cacheinfo.c
arch/ia64/kernel/palinfo.c
arch/ia64/kernel/salinfo.c
arch/ia64/kernel/topology.c
arch/powerpc/kernel/sysfs.c
arch/x86_64/kernel/mce.c
arch/x86_64/kernel/mce_amd.c
drivers/base/topology.c
drivers/cpufreq/cpufreq.c
kernel/hrtimer.c
kernel/profile.c
kernel/rcupdate.c
kernel/softirq.c
kernel/softlockup.c
kernel/timer.c
kernel/workqueue.c
mm/page_alloc.c
mm/slab.c
mm/vmscan.c

index 9df87b03612c5da8e980a8200bddeabc97117a0c..c8547a6fa7e6179f41d0c1be2771d34448b33711 100644 (file)
@@ -642,7 +642,7 @@ static void __cpuexit cache_remove_dev(struct sys_device * sys_dev)
        return;
 }
 
-static int __cpuinit cacheinfo_cpu_callback(struct notifier_block *nfb,
+static int cacheinfo_cpu_callback(struct notifier_block *nfb,
                                        unsigned long action, void *hcpu)
 {
        unsigned int cpu = (unsigned long)hcpu;
index 6386f63c413e60b82449d691cf2f1f17bf333aab..859fb37ff49b682799b65b1384b9d05cbc576b88 100644 (file)
@@ -959,7 +959,7 @@ remove_palinfo_proc_entries(unsigned int hcpu)
        }
 }
 
-static int __devinit palinfo_cpu_callback(struct notifier_block *nfb,
+static int palinfo_cpu_callback(struct notifier_block *nfb,
                                                                unsigned long action,
                                                                void *hcpu)
 {
index 9d5a823479a3f2dd8d6aef4e56edee4a1d309743..663a186ad194a1abfaa7b00b72a7b93afbcbe107 100644 (file)
@@ -572,7 +572,7 @@ static struct file_operations salinfo_data_fops = {
 };
 
 #ifdef CONFIG_HOTPLUG_CPU
-static int __devinit
+static int
 salinfo_cpu_callback(struct notifier_block *nb, unsigned long action, void *hcpu)
 {
        unsigned int i, cpu = (unsigned long)hcpu;
index b47476d655f131122ec1092e5ba6d25827b9c999..7da4739f536e897aaa69d1a244988a25ff47e239 100644 (file)
@@ -429,7 +429,7 @@ static int __cpuinit cache_remove_dev(struct sys_device * sys_dev)
  * When a cpu is hot-plugged, do a check and initiate
  * cache kobject if necessary
  */
-static int __cpuinit cache_cpu_callback(struct notifier_block *nfb,
+static int cache_cpu_callback(struct notifier_block *nfb,
                unsigned long action, void *hcpu)
 {
        unsigned int cpu = (unsigned long)hcpu;
index 0235eb7ecba68acf7d2628839749674e2cbc6b0d..ed737cacf92dd26f1db48c86a9cecd51aa243e6a 100644 (file)
@@ -279,7 +279,7 @@ static void unregister_cpu_online(unsigned int cpu)
 }
 #endif /* CONFIG_HOTPLUG_CPU */
 
-static int __devinit sysfs_cpu_notify(struct notifier_block *self,
+static int sysfs_cpu_notify(struct notifier_block *self,
                                      unsigned long action, void *hcpu)
 {
        unsigned int cpu = (unsigned int)(long)hcpu;
index 6f0790e8b6d3b50af3d6774ed4e127f00632076d..c69fc43cee7b0e83870c13769a273e5b0a607413 100644 (file)
@@ -629,7 +629,7 @@ static __cpuinit void mce_remove_device(unsigned int cpu)
 #endif
 
 /* Get notified when a cpu comes on/off. Be hotplug friendly. */
-static __cpuinit int
+static int
 mce_cpu_callback(struct notifier_block *nfb, unsigned long action, void *hcpu)
 {
        unsigned int cpu = (unsigned long)hcpu;
index d3ad7d81266d6e0b55e1ff8d70c7555d122bb27e..d13b241ad094952985adf3f83f6a07e3343fad50 100644 (file)
@@ -482,7 +482,7 @@ static void threshold_remove_device(unsigned int cpu)
 #endif
 
 /* get notified when a cpu comes on/off */
-static __cpuinit int threshold_cpu_callback(struct notifier_block *nfb,
+static int threshold_cpu_callback(struct notifier_block *nfb,
                                            unsigned long action, void *hcpu)
 {
        /* cpu was unsigned int to begin with */
index 915810f6237eeca929235e1502983080989a3376..8c52421cbc545b54a6ce1c84c0cf1bf3f734c751 100644 (file)
@@ -107,7 +107,7 @@ static int __cpuinit topology_remove_dev(struct sys_device * sys_dev)
        return 0;
 }
 
-static int __cpuinit topology_cpu_callback(struct notifier_block *nfb,
+static int topology_cpu_callback(struct notifier_block *nfb,
                unsigned long action, void *hcpu)
 {
        unsigned int cpu = (unsigned long)hcpu;
index 9759d05b1972742b839b4188d0f8fcaf039859a9..29b2fa5534ae3221017a49517a5017e56c328b4b 100644 (file)
@@ -1497,7 +1497,7 @@ int cpufreq_update_policy(unsigned int cpu)
 }
 EXPORT_SYMBOL(cpufreq_update_policy);
 
-static int __cpuinit cpufreq_cpu_callback(struct notifier_block *nfb,
+static int cpufreq_cpu_callback(struct notifier_block *nfb,
                                        unsigned long action, void *hcpu)
 {
        unsigned int cpu = (unsigned long)hcpu;
index 4b63bb9797b235e25c07a20e96b6becf442008a3..b7f0388bd71c80d32eb29f79b0c0319705a8bd7c 100644 (file)
@@ -836,7 +836,7 @@ static void migrate_hrtimers(int cpu)
 }
 #endif /* CONFIG_HOTPLUG_CPU */
 
-static int __devinit hrtimer_cpu_notify(struct notifier_block *self,
+static int hrtimer_cpu_notify(struct notifier_block *self,
                                        unsigned long action, void *hcpu)
 {
        long cpu = (long)hcpu;
index 5a730fdb1a2cecf6b10c2112ba777fbb5fb7c794..68afe121e5071f0574e37e7b9e20f1d66bd4c290 100644 (file)
@@ -299,7 +299,7 @@ out:
 }
 
 #ifdef CONFIG_HOTPLUG_CPU
-static int __devinit profile_cpu_callback(struct notifier_block *info,
+static int profile_cpu_callback(struct notifier_block *info,
                                        unsigned long action, void *__cpu)
 {
        int node, cpu = (unsigned long)__cpu;
index 193e5a0df1983267c99b1bc5a4ab831680d9610f..6d32ff26f9484190f4588107277d08f7dee40909 100644 (file)
@@ -520,7 +520,7 @@ static void __devinit rcu_online_cpu(int cpu)
        tasklet_init(&per_cpu(rcu_tasklet, cpu), rcu_process_callbacks, 0UL);
 }
 
-static int __devinit rcu_cpu_notify(struct notifier_block *self, 
+static int rcu_cpu_notify(struct notifier_block *self,
                                unsigned long action, void *hcpu)
 {
        long cpu = (long)hcpu;
index a13f2b342e4b110d046570c00963b3ac29c0fc61..336f92d64e2ec04bb56d7146a4fc1e1eeb1141f5 100644 (file)
@@ -446,7 +446,7 @@ static void takeover_tasklets(unsigned int cpu)
 }
 #endif /* CONFIG_HOTPLUG_CPU */
 
-static int __devinit cpu_callback(struct notifier_block *nfb,
+static int cpu_callback(struct notifier_block *nfb,
                                  unsigned long action,
                                  void *hcpu)
 {
index dabebac50868fb7aab936cbfe3378654f78ad7a3..14c7faf02909e8e4879a057406416a43a34b3fdf 100644 (file)
@@ -104,7 +104,7 @@ static int watchdog(void * __bind_cpu)
 /*
  * Create/destroy watchdog threads as CPUs come and go:
  */
-static int __devinit
+static int
 cpu_callback(struct notifier_block *nfb, unsigned long action, void *hcpu)
 {
        int hotcpu = (unsigned long)hcpu;
index d355d5a4d5ae608d2572c8f08b018952c7e52050..67eaf0f54096f87162a96daad0b50df11fe5653f 100644 (file)
@@ -1314,7 +1314,7 @@ static void __devinit migrate_timers(int cpu)
 }
 #endif /* CONFIG_HOTPLUG_CPU */
 
-static int __devinit timer_cpu_notify(struct notifier_block *self, 
+static int timer_cpu_notify(struct notifier_block *self,
                                unsigned long action, void *hcpu)
 {
        long cpu = (long)hcpu;
index e9e464a903761b8dd5134bfa2ce20a68995da0e7..880fb415a8f601ebb5fff636fee20b958fe71149 100644 (file)
@@ -547,7 +547,7 @@ static void take_over_work(struct workqueue_struct *wq, unsigned int cpu)
 }
 
 /* We're holding the cpucontrol mutex here */
-static int __devinit workqueue_cpu_callback(struct notifier_block *nfb,
+static int workqueue_cpu_callback(struct notifier_block *nfb,
                                  unsigned long action,
                                  void *hcpu)
 {
index 123c605867404ecfc00ef0d19a8a65d852ed0be0..ea77c999047ec634746d3b6457724bcb7c5eac5c 100644 (file)
@@ -1962,7 +1962,7 @@ static inline void free_zone_pagesets(int cpu)
        }
 }
 
-static int __cpuinit pageset_cpuup_callback(struct notifier_block *nfb,
+static int pageset_cpuup_callback(struct notifier_block *nfb,
                unsigned long action,
                void *hcpu)
 {
index e6ef9bd52335bac10026972cb177f5de97eee817..af5c5237e11a0df9d2f384383a2e8cd3b846a792 100644 (file)
--- a/mm/slab.c
+++ b/mm/slab.c
@@ -1036,7 +1036,7 @@ static inline void free_alien_cache(struct array_cache **ac_ptr)
 
 #endif
 
-static int __devinit cpuup_callback(struct notifier_block *nfb,
+static int cpuup_callback(struct notifier_block *nfb,
                                    unsigned long action, void *hcpu)
 {
        long cpu = (long)hcpu;
index acdf001d6941fae7bf35f4bbbce9b0bcc15aa1ee..4649a63a8cb6f9c3892e92538b394f754295a90e 100644 (file)
@@ -1328,7 +1328,7 @@ repeat:
    not required for correctness.  So if the last cpu in a node goes
    away, we get changed to run anywhere: as the first one comes back,
    restore their cpu bindings. */
-static int __devinit cpu_callback(struct notifier_block *nfb,
+static int cpu_callback(struct notifier_block *nfb,
                                  unsigned long action, void *hcpu)
 {
        pg_data_t *pgdat;