From bb1a813d3c49e57814958d2d52b5bb299204032e Mon Sep 17 00:00:00 2001 From: Sam Ravnborg Date: Sat, 11 Mar 2006 19:22:53 +0100 Subject: [PATCH] cpufreq: fix section mismatch warnings cpufreq are the only remaining bit to be solved for me to have a modpost clean build for sparc64 - so I took one more look at it. changelog entry: Fix section mismatch warnings in cpufreq: WARNING: drivers/cpufreq/cpufreq_stats.o - Section mismatch: reference to .init.text: from .data between 'cpufreq_stat_cpu_notifier' (at offset 0xa8) and 'notifier_policy_block' WARNING: drivers/cpufreq/cpufreq_stats.o - Section mismatch: reference to .init.text: from .exit.text after 'cleanup_module' (at offset 0x30) The culprint is the function: cpufreq_stat_cpu_callback It is marked __cpuinit which get's redefined to __init in case HOTPLUG_CPU is not enabled as per. init.h: #ifdef CONFIG_HOTPLUG_CPU #define __cpuinit #else #define __cpuinit __init #endif $> grep HOTPLUG .config CONFIG_HOTPLUG=y But cpufreq_stat_cpu_callback() is used in: __exit cpufreq_stats_exit() static struct notifier_block cpufreq_stat_cpu_notifier cpufreq_stat_cpu_notifier is again used in: __init cpufreq_stats_init() __exit cpufreq_stats_exit() So in both cases used from both __init and __exit context. Only solution seems to drop __cpuinit tag. Signed-off-by: Sam Ravnborg Signed-off-by: Dave Jones --- drivers/cpufreq/cpufreq_stats.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/cpufreq') diff --git a/drivers/cpufreq/cpufreq_stats.c b/drivers/cpufreq/cpufreq_stats.c index c25bdb7aec5..9694b6ed326 100644 --- a/drivers/cpufreq/cpufreq_stats.c +++ b/drivers/cpufreq/cpufreq_stats.c @@ -303,7 +303,7 @@ cpufreq_stat_notifier_trans (struct notifier_block *nb, unsigned long val, return 0; } -static int __cpuinit cpufreq_stat_cpu_callback(struct notifier_block *nfb, +static int cpufreq_stat_cpu_callback(struct notifier_block *nfb, unsigned long action, void *hcpu) { unsigned int cpu = (unsigned long)hcpu; -- cgit v1.2.3-70-g09d2