Commit 83d722f7 authored by Chandra Seetharaman's avatar Chandra Seetharaman Committed by Linus Torvalds

[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: default avatarChandra Seetharaman <sekharan@us.ibm.com>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 649bbaa4
...@@ -642,7 +642,7 @@ static void __cpuexit cache_remove_dev(struct sys_device * sys_dev) ...@@ -642,7 +642,7 @@ static void __cpuexit cache_remove_dev(struct sys_device * sys_dev)
return; 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 long action, void *hcpu)
{ {
unsigned int cpu = (unsigned long)hcpu; unsigned int cpu = (unsigned long)hcpu;
......
...@@ -959,7 +959,7 @@ remove_palinfo_proc_entries(unsigned int hcpu) ...@@ -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, unsigned long action,
void *hcpu) void *hcpu)
{ {
......
...@@ -572,7 +572,7 @@ static struct file_operations salinfo_data_fops = { ...@@ -572,7 +572,7 @@ static struct file_operations salinfo_data_fops = {
}; };
#ifdef CONFIG_HOTPLUG_CPU #ifdef CONFIG_HOTPLUG_CPU
static int __devinit static int
salinfo_cpu_callback(struct notifier_block *nb, unsigned long action, void *hcpu) salinfo_cpu_callback(struct notifier_block *nb, unsigned long action, void *hcpu)
{ {
unsigned int i, cpu = (unsigned long)hcpu; unsigned int i, cpu = (unsigned long)hcpu;
......
...@@ -429,7 +429,7 @@ static int __cpuinit cache_remove_dev(struct sys_device * sys_dev) ...@@ -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 * When a cpu is hot-plugged, do a check and initiate
* cache kobject if necessary * 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 long action, void *hcpu)
{ {
unsigned int cpu = (unsigned long)hcpu; unsigned int cpu = (unsigned long)hcpu;
......
...@@ -279,7 +279,7 @@ static void unregister_cpu_online(unsigned int cpu) ...@@ -279,7 +279,7 @@ static void unregister_cpu_online(unsigned int cpu)
} }
#endif /* CONFIG_HOTPLUG_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 long action, void *hcpu)
{ {
unsigned int cpu = (unsigned int)(long)hcpu; unsigned int cpu = (unsigned int)(long)hcpu;
......
...@@ -629,7 +629,7 @@ static __cpuinit void mce_remove_device(unsigned int cpu) ...@@ -629,7 +629,7 @@ static __cpuinit void mce_remove_device(unsigned int cpu)
#endif #endif
/* Get notified when a cpu comes on/off. Be hotplug friendly. */ /* 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) mce_cpu_callback(struct notifier_block *nfb, unsigned long action, void *hcpu)
{ {
unsigned int cpu = (unsigned long)hcpu; unsigned int cpu = (unsigned long)hcpu;
......
...@@ -482,7 +482,7 @@ static void threshold_remove_device(unsigned int cpu) ...@@ -482,7 +482,7 @@ static void threshold_remove_device(unsigned int cpu)
#endif #endif
/* get notified when a cpu comes on/off */ /* 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) unsigned long action, void *hcpu)
{ {
/* cpu was unsigned int to begin with */ /* cpu was unsigned int to begin with */
......
...@@ -107,7 +107,7 @@ static int __cpuinit topology_remove_dev(struct sys_device * sys_dev) ...@@ -107,7 +107,7 @@ static int __cpuinit topology_remove_dev(struct sys_device * sys_dev)
return 0; 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 long action, void *hcpu)
{ {
unsigned int cpu = (unsigned long)hcpu; unsigned int cpu = (unsigned long)hcpu;
......
...@@ -1497,7 +1497,7 @@ int cpufreq_update_policy(unsigned int cpu) ...@@ -1497,7 +1497,7 @@ int cpufreq_update_policy(unsigned int cpu)
} }
EXPORT_SYMBOL(cpufreq_update_policy); 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 long action, void *hcpu)
{ {
unsigned int cpu = (unsigned long)hcpu; unsigned int cpu = (unsigned long)hcpu;
......
...@@ -836,7 +836,7 @@ static void migrate_hrtimers(int cpu) ...@@ -836,7 +836,7 @@ static void migrate_hrtimers(int cpu)
} }
#endif /* CONFIG_HOTPLUG_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) unsigned long action, void *hcpu)
{ {
long cpu = (long)hcpu; long cpu = (long)hcpu;
......
...@@ -299,7 +299,7 @@ void profile_hit(int type, void *__pc) ...@@ -299,7 +299,7 @@ void profile_hit(int type, void *__pc)
} }
#ifdef CONFIG_HOTPLUG_CPU #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) unsigned long action, void *__cpu)
{ {
int node, cpu = (unsigned long)__cpu; int node, cpu = (unsigned long)__cpu;
......
...@@ -520,7 +520,7 @@ static void __devinit rcu_online_cpu(int cpu) ...@@ -520,7 +520,7 @@ static void __devinit rcu_online_cpu(int cpu)
tasklet_init(&per_cpu(rcu_tasklet, cpu), rcu_process_callbacks, 0UL); 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) unsigned long action, void *hcpu)
{ {
long cpu = (long)hcpu; long cpu = (long)hcpu;
......
...@@ -446,7 +446,7 @@ static void takeover_tasklets(unsigned int cpu) ...@@ -446,7 +446,7 @@ static void takeover_tasklets(unsigned int cpu)
} }
#endif /* CONFIG_HOTPLUG_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, unsigned long action,
void *hcpu) void *hcpu)
{ {
......
...@@ -104,7 +104,7 @@ static int watchdog(void * __bind_cpu) ...@@ -104,7 +104,7 @@ static int watchdog(void * __bind_cpu)
/* /*
* Create/destroy watchdog threads as CPUs come and go: * 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) cpu_callback(struct notifier_block *nfb, unsigned long action, void *hcpu)
{ {
int hotcpu = (unsigned long)hcpu; int hotcpu = (unsigned long)hcpu;
......
...@@ -1314,7 +1314,7 @@ static void __devinit migrate_timers(int cpu) ...@@ -1314,7 +1314,7 @@ static void __devinit migrate_timers(int cpu)
} }
#endif /* CONFIG_HOTPLUG_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) unsigned long action, void *hcpu)
{ {
long cpu = (long)hcpu; long cpu = (long)hcpu;
......
...@@ -547,7 +547,7 @@ static void take_over_work(struct workqueue_struct *wq, unsigned int cpu) ...@@ -547,7 +547,7 @@ static void take_over_work(struct workqueue_struct *wq, unsigned int cpu)
} }
/* We're holding the cpucontrol mutex here */ /* 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, unsigned long action,
void *hcpu) void *hcpu)
{ {
......
...@@ -1962,7 +1962,7 @@ static inline void free_zone_pagesets(int cpu) ...@@ -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, unsigned long action,
void *hcpu) void *hcpu)
{ {
......
...@@ -1036,7 +1036,7 @@ static inline void free_alien_cache(struct array_cache **ac_ptr) ...@@ -1036,7 +1036,7 @@ static inline void free_alien_cache(struct array_cache **ac_ptr)
#endif #endif
static int __devinit cpuup_callback(struct notifier_block *nfb, static int cpuup_callback(struct notifier_block *nfb,
unsigned long action, void *hcpu) unsigned long action, void *hcpu)
{ {
long cpu = (long)hcpu; long cpu = (long)hcpu;
......
...@@ -1328,7 +1328,7 @@ unsigned long shrink_all_memory(unsigned long nr_pages) ...@@ -1328,7 +1328,7 @@ unsigned long shrink_all_memory(unsigned long nr_pages)
not required for correctness. So if the last cpu in a node goes 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, away, we get changed to run anywhere: as the first one comes back,
restore their cpu bindings. */ 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) unsigned long action, void *hcpu)
{ {
pg_data_t *pgdat; pg_data_t *pgdat;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment