PCI: spear: Add __init annotation to spear13xx_add_pcie_port()
PATCH 1/1 PCI: spear: Add __init annotation to spear13xx_add_pcie_port()
Add __init annotation to spear13xx_add_pcie_port(), because the spear13xx_add_pcie_port() is called only by spear13xx_pcie_probe() that was already marked as __init. Also, this patch fixes section mismatch warning.
WARNING: drivers/pci/host/built-in.o(.text.unlikely+0x94): Section mismatch in reference from the function spear13xx_add_pcie_port() to the function .init.text:dw_pcie_host_init()
The function spear13xx_add_pcie_port() references
the function __init dw_pcie_host_init().
This is often because spear13xx_add_pcie_port lacks a __init
annotation or the annotation of dw_pcie_host_init is wrong.
---
This patch is based on the submitted patch "[PATCH V2] PCI:
spear: Add spear13xx before add_pcie_port/pcie_initt".
drivers/pci/host/pcie-spear13xx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/pci/host/pcie-spear13xx.c +2 -2
@@ -269,8 +269,8 @@ static struct pcie_host_ops spear13xx_pcie_host_ops = { .host_init = spear13xx_pcie_host_init, }; -static int spear13xx_add_pcie_port (struct pcie_port *pp, -struct platform_device *pdev) +static int __init spear13xx_add_pcie_port (struct pcie_port *pp, +struct platform_device *pdev) {struct device *dev = &pdev->dev;int ret;
Signature · 1 line
1.7.9.5
Quoted 25 lines · Jingoo Han
Add
__initannotation tospear13xx_add_pcie_port(), because thespear13xx_add_pcie_port()is called only byspear13xx_pcie_probe()that was already marked as__init. Also, this patch fixes section mismatch warning.WARNING: drivers/pci/host/built-in.o(.text.unlikely+0x94): Section mismatch in reference from the function
spear13xx_add_pcie_port()to the function .init.text:dw_pcie_host_init()
The functionspear13xx_add_pcie_port()references
the function__initdw_pcie_host_init().
This is often becausespear13xx_add_pcie_portlacks a__init
annotation or the annotation ofdw_pcie_host_initis wrong.Signed-off-by Jingoo Han <[email protected]>---
This patch is based on the submitted patch "[PATCH V2] PCI:
spear: Add spear13xx before add_pcie_port/pcie_initt".drivers/pci/host/pcie-spear13xx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/pci/host/pcie-spear13xx.c +0
-0
drivers/pci/host/pcie-spear13xx.c static struct pcie_host_ops spear13xx_pcie_host_ops = { · line 276
Quoted 10 lines
drivers/pci/host/pcie-spear13xx.c +2
-2@@ -269,8 +269,8 @@ static struct pcie_host_ops spear13xx_pcie_host_ops = { .host_init = spear13xx_pcie_host_init, }; -static int spear13xx_add_pcie_port (struct pcie_port *pp, -struct platform_device *pdev) +static int __init spear13xx_add_pcie_port (struct pcie_port *pp, +struct platform_device *pdev) {struct device *dev = &pdev->dev;int ret;
Bjorn Helgaas
maintainerQuoted 5 lines · Jingoo Han
Add
__initannotation tospear13xx_add_pcie_port(), because thespear13xx_add_pcie_port()is called only byspear13xx_pcie_probe()that was already marked as__init. Also, this patch fixes section mismatch warning.
Quoted 8 lines
WARNING: drivers/pci/host/built-in.o(.text.unlikely+0x94): Section mismatch in reference from the function
spear13xx_add_pcie_port()to the function .init.text:dw_pcie_host_init()
The functionspear13xx_add_pcie_port()references
the function__initdw_pcie_host_init().
This is often becausespear13xx_add_pcie_portlacks a__init
annotation or the annotation ofdw_pcie_host_initis wrong.Signed-off-by Jingoo Han <[email protected]>
Applied with Viresh's ack to pci/host-spear for v3.19, thanks!
Quoted 26 lines
---
This patch is based on the submitted patch "[PATCH V2] PCI:
spear: Add spear13xx before add_pcie_port/pcie_initt".drivers/pci/host/pcie-spear13xx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/pci/host/pcie-spear13xx.c +2
-2@@ -269,8 +269,8 @@ static struct pcie_host_ops spear13xx_pcie_host_ops = { .host_init = spear13xx_pcie_host_init, }; -static int spear13xx_add_pcie_port (struct pcie_port *pp, -struct platform_device *pdev) +static int __init spear13xx_add_pcie_port (struct pcie_port *pp, +struct platform_device *pdev) {struct device *dev = &pdev->dev;int ret;Signature · 1 line
1.7.9.5