projects/linux·commit 9647155f

cpu: fix section mismatch warning in unregister_cpu_notifier

9647155f · Sam Ravnborg <[email protected]> · 2008-04-29 00:58:48 -07:00

Fix following warning:
WARNING: vmlinux.o(.text+0x75f4e): Section mismatch in reference from the function unregister_cpu_notifier() to the variable .cpuinit.data:cpu_chain

We know that unregister_cpu_notifier is using HOTPLUG_CPU
stuff - so ignore these references.
Annotating unregister_cpu_notifier had been another option
but this caused far more warnings since not all callers were
annotated __cpuinit.

Signed-off-by: Sam Ravnborg <[email protected]>
Cc: Gautham R Shenoy <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Commit
9647155ffbce9dffed8a9a4768c8994334b609db
Parents
f718e318

Changes

1 files changed · +1 −1

FileStatusAddDelContent
kernel/cpu.cmodified+1−1View file

kernel/cpu.c

View file
diff --git a/kernel/cpu.c b/kernel/cpu.c
index 2011ad8..da31165 100644
--- a/kernel/cpu.c
+++ b/kernel/cpu.c
@@ -149,7 +149,7 @@ int __cpuinit register_cpu_notifier(struct notifier_block *nb)
EXPORT_SYMBOL(register_cpu_notifier);
-void unregister_cpu_notifier(struct notifier_block *nb)
+void __ref unregister_cpu_notifier(struct notifier_block *nb)
{
cpu_maps_update_begin();
raw_notifier_chain_unregister(&cpu_chain, nb);