Commit e4565362c7adc31201135c4b6d649fc1bdc3bf20

Authored by Alistair Popple
Committed by Benjamin Herrenschmidt
1 parent 582b910eda

powerpc/4xx: Fix section mismatch in ppc4xx_pci.c

This patch fixes this section mismatch:

WARNING: vmlinux.o(.text+0x1efc4): Section mismatch in reference from
the function apm821xx_pciex_init_port_hw() to the function
.init.text:ppc4xx_pciex_wait_on_sdr.isra.9()

The function apm821xx_pciex_init_port_hw() references the function
__init ppc4xx_pciex_wait_on_sdr.isra.9().  This is often because
apm821xx_pciex_init_port_hw lacks a __init annotation or the
annotation of ppc4xx_pciex_wait_on_sdr.isra.9 is wrong.

apm821xx_pciex_init_port_hw is only referenced by a struct in
__initdata, so it should be safe to add __init to
apm821xx_pciex_init_port_hw.

Signed-off-by: Alistair Popple <alistair@popple.id.au>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>

Showing 1 changed file with 1 additions and 1 deletions Side-by-side Diff

arch/powerpc/sysdev/ppc4xx_pci.c
... ... @@ -1058,7 +1058,7 @@
1058 1058 return 1;
1059 1059 }
1060 1060  
1061   -static int apm821xx_pciex_init_port_hw(struct ppc4xx_pciex_port *port)
  1061 +static int __init apm821xx_pciex_init_port_hw(struct ppc4xx_pciex_port *port)
1062 1062 {
1063 1063 u32 val;
1064 1064