Patchwork [RFC] powerpc, pci: fix MODPOST warning

login
register
mail settings
Submitter Heiko Schocher
Date Sept. 24, 2009, 12:45 p.m.
Message ID <4ABB69DA.7030306@denx.de>
Download mbox | patch
Permalink /patch/34221/
State Accepted
Commit 0f6023d5997bf1b5eeae39de42a7e1e26dbe6a90
Delegated to: Benjamin Herrenschmidt
Headers show

Comments

Heiko Schocher - Sept. 24, 2009, 12:45 p.m.
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.

Signed-off-by: Heiko Schocher <hs@denx.de>
---
 arch/powerpc/kernel/pci-common.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
Heiko Schocher - Oct. 5, 2009, 7:06 a.m.
Hello,

Heiko Schocher wrote:
> 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.

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

bye
Heiko
Benjamin Herrenschmidt - Oct. 14, 2009, 5:47 a.m.
On Mon, 2009-10-05 at 09:06 +0200, Heiko Schocher wrote:
> Hello,
> 
> Heiko Schocher wrote:
> > 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.
> 
> 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.

Patch

diff --git a/arch/powerpc/kernel/pci-common.c b/arch/powerpc/kernel/pci-common.c
index e9f4840..48acf63 100644
--- a/arch/powerpc/kernel/pci-common.c
+++ b/arch/powerpc/kernel/pci-common.c
@@ -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;