Skip to contentSkip to conversation

powerpc, pci: fix MODPOST warning

RFC PATCH In review Heiko Schocher 2 participants 3 messages Sep 24, 2009 – Oct 14, 2009 PowerPC

lore
Share & tools
lore
#0 lore raw

RFC PATCH 1/1 powerpc, pci: fix MODPOST warning

making a powerpc target with PCI support, shows the following warning:

MODPOST vmlinux.o
WARNING: vmlinux.o(.text+0x10430): Section mismatch in reference from the function pcibios_allocate_bus_resources() to the function .init.text:reparent_resources() The function pcibios_allocate_bus_resources() references
the function __init reparent_resources().
This is often because pcibios_allocate_bus_resources lacks a __init
annotation or the annotation of reparent_resources is wrong.

This patch fix this warning by removing the __init annotation before reparent_resources.

---
 arch/powerpc/kernel/pci-common.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arch/powerpc/kernel/pci-common.c +1 -1
index e9f4840..48acf63 100644
@@ -1190,7 +1190,7 @@ EXPORT_SYMBOL(pcibios_align_resource);
  * Reparent resource children of pr that conflict with res
  * under res, and make res replace those children.
  */
-static int __init reparent_resources(struct resource *parent,
+static int reparent_resources(struct resource *parent,
 				     struct resource *res)
 {
 	struct resource *p, **pp;
Signature · 5 lines
1.6.0.6

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
#1 lore raw

Hello,

Quoted 10 lines · Heiko Schocher

making a powerpc target with PCI support, shows the following warning:

MODPOST vmlinux.o
WARNING: vmlinux.o(.text+0x10430): Section mismatch in reference from the function pcibios_allocate_bus_resources() to the function .init.text:reparent_resources() The function pcibios_allocate_bus_resources() references
the function __init reparent_resources().
This is often because pcibios_allocate_bus_resources lacks a __init
annotation or the annotation of reparent_resources is wrong.

Quoted 2 lines

This patch fix this warning by removing the __init annotation before reparent_resources.

No comments? So, is this fix OK, or unusable?

bye
Heiko

Signature · 2 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
#2 lore raw
Quoted 13 lines · Heiko Schocher

Hello,

Quoted 10 lines · Heiko Schocher

making a powerpc target with PCI support, shows the following warning:

MODPOST vmlinux.o
WARNING: vmlinux.o(.text+0x10430): Section mismatch in reference from the function pcibios_allocate_bus_resources() to the function .init.text:reparent_resources() The function pcibios_allocate_bus_resources() references
the function __init reparent_resources().
This is often because pcibios_allocate_bus_resources lacks a __init
annotation or the annotation of reparent_resources is wrong.

Quoted 4 lines
Quoted 2 lines

This patch fix this warning by removing the __init annotation before reparent_resources.

No comments? So, is this fix OK, or unusable?

Nah, just me missing it but it's reference on patchwork. I'll pick the patch up. We can probably make some of that __devinit instead of __init though but we can look at it later.

Cheers
Ben.