Browse Source

powerpc/4xx/pci: Add __init annotations for *init_port_hw() functions.

The various port_init_hw methods of ppc4xx_pciex_hwops should have been
marked __init and when I added ppc4xx_pciex_port_reset_sdr(), which is
__init.  This added many section mismatch warnings like:

WARNING: arch/powerpc/sysdev/built-in.o(.text+0x5c68): Section mismatch in reference from the function ppc440spe_pciex_init_port_hw() to the function .init.text:ppc4xx_pciex_port_reset_sdr()
The function ppc440spe_pciex_init_port_hw() references
the function __init ppc4xx_pciex_port_reset_sdr().
This is often because ppc440spe_pciex_init_port_hw lacks a __init
annotation or the annotation of ppc4xx_pciex_port_reset_sdr is wrong.

Trivial patch to silence those warnings.

Reported-By: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>

Yours Tony
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Tony Breeds 14 years ago
parent
commit
9c57a32b2f
1 changed files with 6 additions and 6 deletions
  1. 6 6
      arch/powerpc/sysdev/ppc4xx_pci.c

+ 6 - 6
arch/powerpc/sysdev/ppc4xx_pci.c

@@ -834,7 +834,7 @@ static int __init ppc440spe_pciex_core_init(struct device_node *np)
 	return 3;
 	return 3;
 }
 }
 
 
-static int ppc440spe_pciex_init_port_hw(struct ppc4xx_pciex_port *port)
+static int __init ppc440spe_pciex_init_port_hw(struct ppc4xx_pciex_port *port)
 {
 {
 	u32 val = 1 << 24;
 	u32 val = 1 << 24;
 
 
@@ -872,12 +872,12 @@ static int ppc440spe_pciex_init_port_hw(struct ppc4xx_pciex_port *port)
 	return ppc4xx_pciex_port_reset_sdr(port);
 	return ppc4xx_pciex_port_reset_sdr(port);
 }
 }
 
 
-static int ppc440speA_pciex_init_port_hw(struct ppc4xx_pciex_port *port)
+static int __init ppc440speA_pciex_init_port_hw(struct ppc4xx_pciex_port *port)
 {
 {
 	return ppc440spe_pciex_init_port_hw(port);
 	return ppc440spe_pciex_init_port_hw(port);
 }
 }
 
 
-static int ppc440speB_pciex_init_port_hw(struct ppc4xx_pciex_port *port)
+static int __init ppc440speB_pciex_init_port_hw(struct ppc4xx_pciex_port *port)
 {
 {
 	int rc = ppc440spe_pciex_init_port_hw(port);
 	int rc = ppc440spe_pciex_init_port_hw(port);
 
 
@@ -936,7 +936,7 @@ static int __init ppc460ex_pciex_core_init(struct device_node *np)
 	return 2;
 	return 2;
 }
 }
 
 
-static int ppc460ex_pciex_init_port_hw(struct ppc4xx_pciex_port *port)
+static int __init ppc460ex_pciex_init_port_hw(struct ppc4xx_pciex_port *port)
 {
 {
 	u32 val;
 	u32 val;
 	u32 utlset1;
 	u32 utlset1;
@@ -1126,7 +1126,7 @@ static int __init ppc460sx_pciex_core_init(struct device_node *np)
 	return 2;
 	return 2;
 }
 }
 
 
-static int ppc460sx_pciex_init_port_hw(struct ppc4xx_pciex_port *port)
+static int __init ppc460sx_pciex_init_port_hw(struct ppc4xx_pciex_port *port)
 {
 {
 
 
 	if (port->endpoint)
 	if (port->endpoint)
@@ -1218,7 +1218,7 @@ static void ppc405ex_pcie_phy_reset(struct ppc4xx_pciex_port *port)
 	mtdcri(SDR0, port->sdr_base + PESDRn_RCSSET, 0x00101000);
 	mtdcri(SDR0, port->sdr_base + PESDRn_RCSSET, 0x00101000);
 }
 }
 
 
-static int ppc405ex_pciex_init_port_hw(struct ppc4xx_pciex_port *port)
+static int __init ppc405ex_pciex_init_port_hw(struct ppc4xx_pciex_port *port)
 {
 {
 	u32 val;
 	u32 val;