diff options
| author | Chandra Seetharaman <sekharan@us.ibm.com> | 2006-04-24 22:35:21 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-04-26 11:30:03 -0400 |
| commit | 83d722f7e198b034699b1500d98729beff930efd (patch) | |
| tree | 7d790a2fd62165373ec7bacde704837288e0bec3 | |
| parent | 649bbaa484bcdce94f40a1b97a6a2ded0549e8a2 (diff) | |
[PATCH] Remove __devinit and __cpuinit from notifier_call definitions
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>
| -rw-r--r-- | arch/i386/kernel/cpu/intel_cacheinfo.c | 2 | ||||
| -rw-r--r-- | arch/ia64/kernel/palinfo.c | 2 | ||||
| -rw-r--r-- | arch/ia64/kernel/salinfo.c | 2 | ||||
| -rw-r--r-- | arch/ia64/kernel/topology.c | 2 | ||||
| -rw-r--r-- | arch/powerpc/kernel/sysfs.c | 2 | ||||
| -rw-r--r-- | arch/x86_64/kernel/mce.c | 2 | ||||
| -rw-r--r-- | arch/x86_64/kernel/mce_amd.c | 2 | ||||
| -rw-r--r-- | drivers/base/topology.c | 2 | ||||
| -rw-r--r-- | drivers/cpufreq/cpufreq.c | 2 | ||||
| -rw-r--r-- | kernel/hrtimer.c | 2 | ||||
| -rw-r--r-- | kernel/profile.c | 2 | ||||
| -rw-r--r-- | kernel/rcupdate.c | 2 | ||||
| -rw-r--r-- | kernel/softirq.c | 2 | ||||
| -rw-r--r-- | kernel/softlockup.c | 2 | ||||
| -rw-r--r-- | kernel/timer.c | 2 | ||||
| -rw-r--r-- | kernel/workqueue.c | 2 | ||||
| -rw-r--r-- | mm/page_alloc.c | 2 | ||||
| -rw-r--r-- | mm/slab.c | 2 | ||||
| -rw-r--r-- | mm/vmscan.c | 2 |
19 files changed, 19 insertions, 19 deletions
diff --git a/arch/i386/kernel/cpu/intel_cacheinfo.c b/arch/i386/kernel/cpu/intel_cacheinfo.c index 9df87b03612c..c8547a6fa7e6 100644 --- a/arch/i386/kernel/cpu/intel_cacheinfo.c +++ b/arch/i386/kernel/cpu/intel_cacheinfo.c | |||
| @@ -642,7 +642,7 @@ static void __cpuexit cache_remove_dev(struct sys_device * sys_dev) | |||
| 642 | return; | 642 | return; |
| 643 | } | 643 | } |
| 644 | 644 | ||
| 645 | static int __cpuinit cacheinfo_cpu_callback(struct notifier_block *nfb, | 645 | static int cacheinfo_cpu_callback(struct notifier_block *nfb, |
| 646 | unsigned long action, void *hcpu) | 646 | unsigned long action, void *hcpu) |
| 647 | { | 647 | { |
| 648 | unsigned int cpu = (unsigned long)hcpu; | 648 | unsigned int cpu = (unsigned long)hcpu; |
diff --git a/arch/ia64/kernel/palinfo.c b/arch/ia64/kernel/palinfo.c index 6386f63c413e..859fb37ff49b 100644 --- a/arch/ia64/kernel/palinfo.c +++ b/arch/ia64/kernel/palinfo.c | |||
| @@ -959,7 +959,7 @@ remove_palinfo_proc_entries(unsigned int hcpu) | |||
| 959 | } | 959 | } |
| 960 | } | 960 | } |
| 961 | 961 | ||
| 962 | static int __devinit palinfo_cpu_callback(struct notifier_block *nfb, | 962 | static int palinfo_cpu_callback(struct notifier_block *nfb, |
| 963 | unsigned long action, | 963 | unsigned long action, |
| 964 | void *hcpu) | 964 | void *hcpu) |
| 965 | { | 965 | { |
diff --git a/arch/ia64/kernel/salinfo.c b/arch/ia64/kernel/salinfo.c index 9d5a823479a3..663a186ad194 100644 --- a/arch/ia64/kernel/salinfo.c +++ b/arch/ia64/kernel/salinfo.c | |||
| @@ -572,7 +572,7 @@ static struct file_operations salinfo_data_fops = { | |||
| 572 | }; | 572 | }; |
| 573 | 573 | ||
| 574 | #ifdef CONFIG_HOTPLUG_CPU | 574 | #ifdef CONFIG_HOTPLUG_CPU |
| 575 | static int __devinit | 575 | static int |
| 576 | salinfo_cpu_callback(struct notifier_block *nb, unsigned long action, void *hcpu) | 576 | salinfo_cpu_callback(struct notifier_block *nb, unsigned long action, void *hcpu) |
| 577 | { | 577 | { |
| 578 | unsigned int i, cpu = (unsigned long)hcpu; | 578 | unsigned int i, cpu = (unsigned long)hcpu; |
diff --git a/arch/ia64/kernel/topology.c b/arch/ia64/kernel/topology.c index b47476d655f1..7da4739f536e 100644 --- a/arch/ia64/kernel/topology.c +++ b/arch/ia64/kernel/topology.c | |||
| @@ -429,7 +429,7 @@ static int __cpuinit cache_remove_dev(struct sys_device * sys_dev) | |||
| 429 | * When a cpu is hot-plugged, do a check and initiate | 429 | * When a cpu is hot-plugged, do a check and initiate |
| 430 | * cache kobject if necessary | 430 | * cache kobject if necessary |
| 431 | */ | 431 | */ |
| 432 | static int __cpuinit cache_cpu_callback(struct notifier_block *nfb, | 432 | static int cache_cpu_callback(struct notifier_block *nfb, |
| 433 | unsigned long action, void *hcpu) | 433 | unsigned long action, void *hcpu) |
| 434 | { | 434 | { |
| 435 | unsigned int cpu = (unsigned long)hcpu; | 435 | unsigned int cpu = (unsigned long)hcpu; |
diff --git a/arch/powerpc/kernel/sysfs.c b/arch/powerpc/kernel/sysfs.c index 0235eb7ecba6..ed737cacf92d 100644 --- a/arch/powerpc/kernel/sysfs.c +++ b/arch/powerpc/kernel/sysfs.c | |||
| @@ -279,7 +279,7 @@ static void unregister_cpu_online(unsigned int cpu) | |||
| 279 | } | 279 | } |
| 280 | #endif /* CONFIG_HOTPLUG_CPU */ | 280 | #endif /* CONFIG_HOTPLUG_CPU */ |
| 281 | 281 | ||
| 282 | static int __devinit sysfs_cpu_notify(struct notifier_block *self, | 282 | static int sysfs_cpu_notify(struct notifier_block *self, |
| 283 | unsigned long action, void *hcpu) | 283 | unsigned long action, void *hcpu) |
| 284 | { | 284 | { |
| 285 | unsigned int cpu = (unsigned int)(long)hcpu; | 285 | unsigned int cpu = (unsigned int)(long)hcpu; |
diff --git a/arch/x86_64/kernel/mce.c b/arch/x86_64/kernel/mce.c index 6f0790e8b6d3..c69fc43cee7b 100644 --- a/arch/x86_64/kernel/mce.c +++ b/arch/x86_64/kernel/mce.c | |||
| @@ -629,7 +629,7 @@ static __cpuinit void mce_remove_device(unsigned int cpu) | |||
| 629 | #endif | 629 | #endif |
| 630 | 630 | ||
| 631 | /* Get notified when a cpu comes on/off. Be hotplug friendly. */ | 631 | /* Get notified when a cpu comes on/off. Be hotplug friendly. */ |
| 632 | static __cpuinit int | 632 | static int |
| 633 | mce_cpu_callback(struct notifier_block *nfb, unsigned long action, void *hcpu) | 633 | mce_cpu_callback(struct notifier_block *nfb, unsigned long action, void *hcpu) |
| 634 | { | 634 | { |
| 635 | unsigned int cpu = (unsigned long)hcpu; | 635 | unsigned int cpu = (unsigned long)hcpu; |
diff --git a/arch/x86_64/kernel/mce_amd.c b/arch/x86_64/kernel/mce_amd.c index d3ad7d81266d..d13b241ad094 100644 --- a/arch/x86_64/kernel/mce_amd.c +++ b/arch/x86_64/kernel/mce_amd.c | |||
| @@ -482,7 +482,7 @@ static void threshold_remove_device(unsigned int cpu) | |||
| 482 | #endif | 482 | #endif |
| 483 | 483 | ||
| 484 | /* get notified when a cpu comes on/off */ | 484 | /* get notified when a cpu comes on/off */ |
| 485 | static __cpuinit int threshold_cpu_callback(struct notifier_block *nfb, | 485 | static int threshold_cpu_callback(struct notifier_block *nfb, |
| 486 | unsigned long action, void *hcpu) | 486 | unsigned long action, void *hcpu) |
| 487 | { | 487 | { |
| 488 | /* cpu was unsigned int to begin with */ | 488 | /* cpu was unsigned int to begin with */ |
diff --git a/drivers/base/topology.c b/drivers/base/topology.c index 915810f6237e..8c52421cbc54 100644 --- a/drivers/base/topology.c +++ b/drivers/base/topology.c | |||
| @@ -107,7 +107,7 @@ static int __cpuinit topology_remove_dev(struct sys_device * sys_dev) | |||
| 107 | return 0; | 107 | return 0; |
| 108 | } | 108 | } |
| 109 | 109 | ||
| 110 | static int __cpuinit topology_cpu_callback(struct notifier_block *nfb, | 110 | static int topology_cpu_callback(struct notifier_block *nfb, |
| 111 | unsigned long action, void *hcpu) | 111 | unsigned long action, void *hcpu) |
| 112 | { | 112 | { |
| 113 | unsigned int cpu = (unsigned long)hcpu; | 113 | unsigned int cpu = (unsigned long)hcpu; |
diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c index 9759d05b1972..29b2fa5534ae 100644 --- a/drivers/cpufreq/cpufreq.c +++ b/drivers/cpufreq/cpufreq.c | |||
| @@ -1497,7 +1497,7 @@ int cpufreq_update_policy(unsigned int cpu) | |||
| 1497 | } | 1497 | } |
| 1498 | EXPORT_SYMBOL(cpufreq_update_policy); | 1498 | EXPORT_SYMBOL(cpufreq_update_policy); |
| 1499 | 1499 | ||
| 1500 | static int __cpuinit cpufreq_cpu_callback(struct notifier_block *nfb, | 1500 | static int cpufreq_cpu_callback(struct notifier_block *nfb, |
| 1501 | unsigned long action, void *hcpu) | 1501 | unsigned long action, void *hcpu) |
| 1502 | { | 1502 | { |
| 1503 | unsigned int cpu = (unsigned long)hcpu; | 1503 | unsigned int cpu = (unsigned long)hcpu; |
diff --git a/kernel/hrtimer.c b/kernel/hrtimer.c index 4b63bb9797b2..b7f0388bd71c 100644 --- a/kernel/hrtimer.c +++ b/kernel/hrtimer.c | |||
| @@ -836,7 +836,7 @@ static void migrate_hrtimers(int cpu) | |||
| 836 | } | 836 | } |
| 837 | #endif /* CONFIG_HOTPLUG_CPU */ | 837 | #endif /* CONFIG_HOTPLUG_CPU */ |
| 838 | 838 | ||
| 839 | static int __devinit hrtimer_cpu_notify(struct notifier_block *self, | 839 | static int hrtimer_cpu_notify(struct notifier_block *self, |
| 840 | unsigned long action, void *hcpu) | 840 | unsigned long action, void *hcpu) |
| 841 | { | 841 | { |
| 842 | long cpu = (long)hcpu; | 842 | long cpu = (long)hcpu; |
diff --git a/kernel/profile.c b/kernel/profile.c index 5a730fdb1a2c..68afe121e507 100644 --- a/kernel/profile.c +++ b/kernel/profile.c | |||
| @@ -299,7 +299,7 @@ out: | |||
| 299 | } | 299 | } |
| 300 | 300 | ||
| 301 | #ifdef CONFIG_HOTPLUG_CPU | 301 | #ifdef CONFIG_HOTPLUG_CPU |
| 302 | static int __devinit profile_cpu_callback(struct notifier_block *info, | 302 | static int profile_cpu_callback(struct notifier_block *info, |
| 303 | unsigned long action, void *__cpu) | 303 | unsigned long action, void *__cpu) |
| 304 | { | 304 | { |
| 305 | int node, cpu = (unsigned long)__cpu; | 305 | int node, cpu = (unsigned long)__cpu; |
diff --git a/kernel/rcupdate.c b/kernel/rcupdate.c index 193e5a0df198..6d32ff26f948 100644 --- a/kernel/rcupdate.c +++ b/kernel/rcupdate.c | |||
| @@ -520,7 +520,7 @@ static void __devinit rcu_online_cpu(int cpu) | |||
| 520 | tasklet_init(&per_cpu(rcu_tasklet, cpu), rcu_process_callbacks, 0UL); | 520 | tasklet_init(&per_cpu(rcu_tasklet, cpu), rcu_process_callbacks, 0UL); |
| 521 | } | 521 | } |
| 522 | 522 | ||
| 523 | static int __devinit rcu_cpu_notify(struct notifier_block *self, | 523 | static int rcu_cpu_notify(struct notifier_block *self, |
| 524 | unsigned long action, void *hcpu) | 524 | unsigned long action, void *hcpu) |
| 525 | { | 525 | { |
| 526 | long cpu = (long)hcpu; | 526 | long cpu = (long)hcpu; |
diff --git a/kernel/softirq.c b/kernel/softirq.c index a13f2b342e4b..336f92d64e2e 100644 --- a/kernel/softirq.c +++ b/kernel/softirq.c | |||
| @@ -446,7 +446,7 @@ static void takeover_tasklets(unsigned int cpu) | |||
| 446 | } | 446 | } |
| 447 | #endif /* CONFIG_HOTPLUG_CPU */ | 447 | #endif /* CONFIG_HOTPLUG_CPU */ |
| 448 | 448 | ||
| 449 | static int __devinit cpu_callback(struct notifier_block *nfb, | 449 | static int cpu_callback(struct notifier_block *nfb, |
| 450 | unsigned long action, | 450 | unsigned long action, |
| 451 | void *hcpu) | 451 | void *hcpu) |
| 452 | { | 452 | { |
diff --git a/kernel/softlockup.c b/kernel/softlockup.c index dabebac50868..14c7faf02909 100644 --- a/kernel/softlockup.c +++ b/kernel/softlockup.c | |||
| @@ -104,7 +104,7 @@ static int watchdog(void * __bind_cpu) | |||
| 104 | /* | 104 | /* |
| 105 | * Create/destroy watchdog threads as CPUs come and go: | 105 | * Create/destroy watchdog threads as CPUs come and go: |
| 106 | */ | 106 | */ |
| 107 | static int __devinit | 107 | static int |
| 108 | cpu_callback(struct notifier_block *nfb, unsigned long action, void *hcpu) | 108 | cpu_callback(struct notifier_block *nfb, unsigned long action, void *hcpu) |
| 109 | { | 109 | { |
| 110 | int hotcpu = (unsigned long)hcpu; | 110 | int hotcpu = (unsigned long)hcpu; |
diff --git a/kernel/timer.c b/kernel/timer.c index d355d5a4d5ae..67eaf0f54096 100644 --- a/kernel/timer.c +++ b/kernel/timer.c | |||
| @@ -1314,7 +1314,7 @@ static void __devinit migrate_timers(int cpu) | |||
| 1314 | } | 1314 | } |
| 1315 | #endif /* CONFIG_HOTPLUG_CPU */ | 1315 | #endif /* CONFIG_HOTPLUG_CPU */ |
| 1316 | 1316 | ||
| 1317 | static int __devinit timer_cpu_notify(struct notifier_block *self, | 1317 | static int timer_cpu_notify(struct notifier_block *self, |
| 1318 | unsigned long action, void *hcpu) | 1318 | unsigned long action, void *hcpu) |
| 1319 | { | 1319 | { |
| 1320 | long cpu = (long)hcpu; | 1320 | long cpu = (long)hcpu; |
diff --git a/kernel/workqueue.c b/kernel/workqueue.c index e9e464a90376..880fb415a8f6 100644 --- a/kernel/workqueue.c +++ b/kernel/workqueue.c | |||
| @@ -547,7 +547,7 @@ static void take_over_work(struct workqueue_struct *wq, unsigned int cpu) | |||
| 547 | } | 547 | } |
| 548 | 548 | ||
| 549 | /* We're holding the cpucontrol mutex here */ | 549 | /* We're holding the cpucontrol mutex here */ |
| 550 | static int __devinit workqueue_cpu_callback(struct notifier_block *nfb, | 550 | static int workqueue_cpu_callback(struct notifier_block *nfb, |
| 551 | unsigned long action, | 551 | unsigned long action, |
| 552 | void *hcpu) | 552 | void *hcpu) |
| 553 | { | 553 | { |
diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 123c60586740..ea77c999047e 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c | |||
| @@ -1962,7 +1962,7 @@ static inline void free_zone_pagesets(int cpu) | |||
| 1962 | } | 1962 | } |
| 1963 | } | 1963 | } |
| 1964 | 1964 | ||
| 1965 | static int __cpuinit pageset_cpuup_callback(struct notifier_block *nfb, | 1965 | static int pageset_cpuup_callback(struct notifier_block *nfb, |
| 1966 | unsigned long action, | 1966 | unsigned long action, |
| 1967 | void *hcpu) | 1967 | void *hcpu) |
| 1968 | { | 1968 | { |
| @@ -1036,7 +1036,7 @@ static inline void free_alien_cache(struct array_cache **ac_ptr) | |||
| 1036 | 1036 | ||
| 1037 | #endif | 1037 | #endif |
| 1038 | 1038 | ||
| 1039 | static int __devinit cpuup_callback(struct notifier_block *nfb, | 1039 | static int cpuup_callback(struct notifier_block *nfb, |
| 1040 | unsigned long action, void *hcpu) | 1040 | unsigned long action, void *hcpu) |
| 1041 | { | 1041 | { |
| 1042 | long cpu = (long)hcpu; | 1042 | long cpu = (long)hcpu; |
diff --git a/mm/vmscan.c b/mm/vmscan.c index acdf001d6941..4649a63a8cb6 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c | |||
| @@ -1328,7 +1328,7 @@ repeat: | |||
| 1328 | not required for correctness. So if the last cpu in a node goes | 1328 | not required for correctness. So if the last cpu in a node goes |
| 1329 | away, we get changed to run anywhere: as the first one comes back, | 1329 | away, we get changed to run anywhere: as the first one comes back, |
| 1330 | restore their cpu bindings. */ | 1330 | restore their cpu bindings. */ |
| 1331 | static int __devinit cpu_callback(struct notifier_block *nfb, | 1331 | static int cpu_callback(struct notifier_block *nfb, |
| 1332 | unsigned long action, void *hcpu) | 1332 | unsigned long action, void *hcpu) |
| 1333 | { | 1333 | { |
| 1334 | pg_data_t *pgdat; | 1334 | pg_data_t *pgdat; |
