Skip to content

Commit

Permalink
[CPUFREQ] fix section mismatch warnings
Browse files Browse the repository at this point in the history
Fix the following warnings:
WARNING: vmlinux.o(.text+0xfe6711): Section mismatch in reference from the function cpufreq_unregister_driver() to the variable .cpuinit.data:cpufreq_cpu_notifier
WARNING: vmlinux.o(.text+0xfe68af): Section mismatch in reference from the function cpufreq_register_driver() to the variable .cpuinit.data:cpufreq_cpu_notifier
WARNING: vmlinux.o(.exit.text+0xc4fa): Section mismatch in reference from the function cpufreq_stats_exit() to the variable .cpuinit.data:cpufreq_stat_cpu_notifier

The warnings were casued by references to unregister_hotcpu_notifier()
from normal functions or exit functions.
This is flagged by modpost as a potential error because
it does not know that for the non HOTPLUG_CPU
scenario the unregister_hotcpu_notifier() is a nop.
Silence the warning by replacing the __initdata
annotation with a __refdata annotation.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Dave Jones <davej@codemonkey.org.uk>
  • Loading branch information
Sam Ravnborg authored and Dave Jones committed Mar 5, 2008
1 parent 0e5aa8d commit f6ebef3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion drivers/cpufreq/cpufreq.c
Original file line number Diff line number Diff line change
Expand Up @@ -1777,7 +1777,7 @@ static int __cpuinit cpufreq_cpu_callback(struct notifier_block *nfb,
return NOTIFY_OK;
}

static struct notifier_block __cpuinitdata cpufreq_cpu_notifier =
static struct notifier_block __refdata cpufreq_cpu_notifier =
{
.notifier_call = cpufreq_cpu_callback,
};
Expand Down
2 changes: 1 addition & 1 deletion drivers/cpufreq/cpufreq_stats.c
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ static int __cpuinit cpufreq_stat_cpu_callback(struct notifier_block *nfb,
return NOTIFY_OK;
}

static struct notifier_block cpufreq_stat_cpu_notifier __cpuinitdata =
static struct notifier_block cpufreq_stat_cpu_notifier __refdata =
{
.notifier_call = cpufreq_stat_cpu_callback,
};
Expand Down

0 comments on commit f6ebef3

Please sign in to comment.