Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

[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>

authored by

Chandra Seetharaman and committed by
Linus Torvalds
83d722f7 649bbaa4

+19 -19
+1 -1
arch/i386/kernel/cpu/intel_cacheinfo.c
··· 642 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 646 unsigned long action, void *hcpu) 647 647 { 648 648 unsigned int cpu = (unsigned long)hcpu;
+1 -1
arch/ia64/kernel/palinfo.c
··· 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 963 unsigned long action, 964 964 void *hcpu) 965 965 {
+1 -1
arch/ia64/kernel/salinfo.c
··· 572 572 }; 573 573 574 574 #ifdef CONFIG_HOTPLUG_CPU 575 - static int __devinit 575 + static int 576 576 salinfo_cpu_callback(struct notifier_block *nb, unsigned long action, void *hcpu) 577 577 { 578 578 unsigned int i, cpu = (unsigned long)hcpu;
+1 -1
arch/ia64/kernel/topology.c
··· 429 429 * When a cpu is hot-plugged, do a check and initiate 430 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 433 unsigned long action, void *hcpu) 434 434 { 435 435 unsigned int cpu = (unsigned long)hcpu;
+1 -1
arch/powerpc/kernel/sysfs.c
··· 279 279 } 280 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 283 unsigned long action, void *hcpu) 284 284 { 285 285 unsigned int cpu = (unsigned int)(long)hcpu;
+1 -1
arch/x86_64/kernel/mce.c
··· 629 629 #endif 630 630 631 631 /* Get notified when a cpu comes on/off. Be hotplug friendly. */ 632 - static __cpuinit int 632 + static int 633 633 mce_cpu_callback(struct notifier_block *nfb, unsigned long action, void *hcpu) 634 634 { 635 635 unsigned int cpu = (unsigned long)hcpu;
+1 -1
arch/x86_64/kernel/mce_amd.c
··· 482 482 #endif 483 483 484 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 486 unsigned long action, void *hcpu) 487 487 { 488 488 /* cpu was unsigned int to begin with */
+1 -1
drivers/base/topology.c
··· 107 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 111 unsigned long action, void *hcpu) 112 112 { 113 113 unsigned int cpu = (unsigned long)hcpu;
+1 -1
drivers/cpufreq/cpufreq.c
··· 1497 1497 } 1498 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 1501 unsigned long action, void *hcpu) 1502 1502 { 1503 1503 unsigned int cpu = (unsigned long)hcpu;
+1 -1
kernel/hrtimer.c
··· 836 836 } 837 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 840 unsigned long action, void *hcpu) 841 841 { 842 842 long cpu = (long)hcpu;
+1 -1
kernel/profile.c
··· 299 299 } 300 300 301 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 303 unsigned long action, void *__cpu) 304 304 { 305 305 int node, cpu = (unsigned long)__cpu;
+1 -1
kernel/rcupdate.c
··· 520 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 524 unsigned long action, void *hcpu) 525 525 { 526 526 long cpu = (long)hcpu;
+1 -1
kernel/softirq.c
··· 446 446 } 447 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 450 unsigned long action, 451 451 void *hcpu) 452 452 {
+1 -1
kernel/softlockup.c
··· 104 104 /* 105 105 * Create/destroy watchdog threads as CPUs come and go: 106 106 */ 107 - static int __devinit 107 + static int 108 108 cpu_callback(struct notifier_block *nfb, unsigned long action, void *hcpu) 109 109 { 110 110 int hotcpu = (unsigned long)hcpu;
+1 -1
kernel/timer.c
··· 1314 1314 } 1315 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 1318 unsigned long action, void *hcpu) 1319 1319 { 1320 1320 long cpu = (long)hcpu;
+1 -1
kernel/workqueue.c
··· 547 547 } 548 548 549 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 551 unsigned long action, 552 552 void *hcpu) 553 553 {
+1 -1
mm/page_alloc.c
··· 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 1966 unsigned long action, 1967 1967 void *hcpu) 1968 1968 {
+1 -1
mm/slab.c
··· 1036 1036 1037 1037 #endif 1038 1038 1039 - static int __devinit cpuup_callback(struct notifier_block *nfb, 1039 + static int cpuup_callback(struct notifier_block *nfb, 1040 1040 unsigned long action, void *hcpu) 1041 1041 { 1042 1042 long cpu = (long)hcpu;
+1 -1
mm/vmscan.c
··· 1328 1328 not required for correctness. So if the last cpu in a node goes 1329 1329 away, we get changed to run anywhere: as the first one comes back, 1330 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 1332 unsigned long action, void *hcpu) 1333 1333 { 1334 1334 pg_data_t *pgdat;