Patchwork powerpc/powernv: Mark pnv_pci_init_ioda2_phb() as __init

login
register
mail settings
Submitter Bjorn Helgaas
Date July 2, 2013, 6:20 p.m.
Message ID <20130702182003.28238.61942.stgit@bhelgaas-glaptop>
Download mbox | patch
Permalink /patch/256472/
State Accepted
Headers show

Comments

Bjorn Helgaas - July 2, 2013, 6:20 p.m.
Mark pnv_pci_init_ioda2_phb() as __init.  It is called only from an
init function (pnv_pci_init()), and it calls an init function
(pnv_pci_init_ioda_phb()):

    pnv_pci_init                # init
      pnv_pci_init_ioda2_phb    # non-init
	pnv_pci_init_ioda_phb   # init

This should fix a section mismatch warning.

Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
---
 arch/powerpc/platforms/powernv/pci-ioda.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Benjamin Herrenschmidt - July 2, 2013, 10:01 p.m.
On Tue, 2013-07-02 at 12:20 -0600, Bjorn Helgaas wrote:
> Mark pnv_pci_init_ioda2_phb() as __init.  It is called only from an
> init function (pnv_pci_init()), and it calls an init function
> (pnv_pci_init_ioda_phb()):
> 
>     pnv_pci_init                # init
>       pnv_pci_init_ioda2_phb    # non-init
> 	pnv_pci_init_ioda_phb   # init
> 
> This should fix a section mismatch warning.

Thanks. I should look at those warnings more often...

Cheers,
Ben.

> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
> ---
>  arch/powerpc/platforms/powernv/pci-ioda.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/powerpc/platforms/powernv/pci-ioda.c b/arch/powerpc/platforms/powernv/pci-ioda.c
> index 9c9d15e..dfbb03d 100644
> --- a/arch/powerpc/platforms/powernv/pci-ioda.c
> +++ b/arch/powerpc/platforms/powernv/pci-ioda.c
> @@ -1210,7 +1210,7 @@ void __init pnv_pci_init_ioda_phb(struct device_node *np, int ioda_type)
>  		opal_pci_set_pe(phb_id, 0, 0, 7, 1, 1 , OPAL_MAP_PE);
>  }
>  
> -void pnv_pci_init_ioda2_phb(struct device_node *np)
> +void __init pnv_pci_init_ioda2_phb(struct device_node *np)
>  {
>  	pnv_pci_init_ioda_phb(np, PNV_PHB_IODA2);
>  }

Patch

diff --git a/arch/powerpc/platforms/powernv/pci-ioda.c b/arch/powerpc/platforms/powernv/pci-ioda.c
index 9c9d15e..dfbb03d 100644
--- a/arch/powerpc/platforms/powernv/pci-ioda.c
+++ b/arch/powerpc/platforms/powernv/pci-ioda.c
@@ -1210,7 +1210,7 @@  void __init pnv_pci_init_ioda_phb(struct device_node *np, int ioda_type)
 		opal_pci_set_pe(phb_id, 0, 0, 7, 1, 1 , OPAL_MAP_PE);
 }
 
-void pnv_pci_init_ioda2_phb(struct device_node *np)
+void __init pnv_pci_init_ioda2_phb(struct device_node *np)
 {
 	pnv_pci_init_ioda_phb(np, PNV_PHB_IODA2);
 }