Skip to content

Commit

Permalink
[PATCH] Remove __devinit and __cpuinit from notifier_call definitions
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
chandra2 authored and Linus Torvalds committed Apr 26, 2006
1 parent 649bbaa commit 83d722f
Show file tree
Hide file tree
Showing 19 changed files with 19 additions and 19 deletions.
2 changes: 1 addition & 1 deletion arch/i386/kernel/cpu/intel_cacheinfo.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion arch/ia64/kernel/palinfo.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down
2 changes: 1 addition & 1 deletion arch/ia64/kernel/salinfo.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion arch/ia64/kernel/topology.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion arch/powerpc/kernel/sysfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion arch/x86_64/kernel/mce.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion arch/x86_64/kernel/mce_amd.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down
2 changes: 1 addition & 1 deletion drivers/base/topology.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion drivers/cpufreq/cpufreq.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion kernel/hrtimer.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion kernel/profile.c
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ void profile_hit(int type, void *__pc)
}

#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;
Expand Down
2 changes: 1 addition & 1 deletion kernel/rcupdate.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion kernel/softirq.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down
2 changes: 1 addition & 1 deletion kernel/softlockup.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion kernel/timer.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion kernel/workqueue.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down
2 changes: 1 addition & 1 deletion mm/page_alloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down
2 changes: 1 addition & 1 deletion mm/slab.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion mm/vmscan.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
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;
Expand Down

0 comments on commit 83d722f

Please sign in to comment.