Skip to contentSkip to conversation

PCI: dra7xx: Add __init annotation to dra7xx_add_pcie_port()

PATCH Applied Jingoo Han 3 participants 3 messages Nov 6, 2014 – Nov 14, 2014 PCI

lore
Share & tools
lore

Jingoo Han

author
#0 lore raw

PATCH 1/1 PCI: dra7xx: Add __init annotation to dra7xx_add_pcie_port()

Add __init annotation to dra7xx_add_pcie_port(), because the dra7xx_add_pcie_port() is called only by dra7xx_pcie_probe() that was already marked as __init. Also, this patch fixes section mismatch warning.

WARNING: drivers/pci/host/built-in.o(.text.unlikely+0xcc): Section mismatch in reference from the function dra7xx_add_pcie_port() to the function .init.text:dw_pcie_host_init()
The function dra7xx_add_pcie_port() references
the function __init dw_pcie_host_init().
This is often because dra7xx_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:
dra7xx: Add dra7xx prefix before add_pcie_port".

 drivers/pci/host/pci-dra7xx.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/pci/host/pci-dra7xx.c +2 -2
index 5b4a644..8c69697 100644
@@ -270,8 +270,8 @@ static irqreturn_t dra7xx_pcie_irq_handler(int irq, void *arg)
 	return IRQ_HANDLED;
 }
 
-static int dra7xx_add_pcie_port(struct dra7xx_pcie *dra7xx,
-				struct platform_device *pdev)
+static int __init dra7xx_add_pcie_port(struct dra7xx_pcie *dra7xx,
+				       struct platform_device *pdev)
 {
 	int ret;
 	struct pcie_port *pp;
Signature · 1 line
1.7.9.5
maintainer Applied
#1 lore raw
Quoted 5 lines · Jingoo Han

Add __init annotation to dra7xx_add_pcie_port(), because the dra7xx_add_pcie_port() is called only by dra7xx_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+0xcc): Section mismatch in reference from the function dra7xx_add_pcie_port() to the function .init.text:dw_pcie_host_init()
The function dra7xx_add_pcie_port() references
the function __init dw_pcie_host_init().
This is often because dra7xx_add_pcie_port lacks a __init
annotation or the annotation of dw_pcie_host_init is wrong.

Applied to pci/host-dra7xx for v3.19, thanks!

Kishon, let me know if there's any issue with this. It looks like a pretty obvious fix.

Quoted 26 lines

---
This patch is based on the submitted patch "[PATCH V2] PCI:
dra7xx: Add dra7xx prefix before add_pcie_port".

 drivers/pci/host/pci-dra7xx.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/pci/host/pci-dra7xx.c +2 -2
index 5b4a644..8c69697 100644
@@ -270,8 +270,8 @@ static irqreturn_t dra7xx_pcie_irq_handler(int irq, void *arg)
 	return IRQ_HANDLED;
 }
 
-static int dra7xx_add_pcie_port(struct dra7xx_pcie *dra7xx,
-				struct platform_device *pdev)
+static int __init dra7xx_add_pcie_port(struct dra7xx_pcie *dra7xx,
+				       struct platform_device *pdev)
 {
 	int ret;
 	struct pcie_port *pp;
Signature · 1 line
1.7.9.5
#2 lore raw

Hi,

Quoted 13 lines · Bjorn Helgaas
Quoted 12 lines · Jingoo Han

Add __init annotation to dra7xx_add_pcie_port(), because the dra7xx_add_pcie_port() is called only by dra7xx_pcie_probe() that was already marked as __init. Also, this patch fixes section mismatch warning.

WARNING: drivers/pci/host/built-in.o(.text.unlikely+0xcc): Section mismatch in reference from the function dra7xx_add_pcie_port() to the function .init.text:dw_pcie_host_init()
The function dra7xx_add_pcie_port() references
the function __init dw_pcie_host_init().
This is often because dra7xx_add_pcie_port lacks a __init
annotation or the annotation of dw_pcie_host_init is wrong.

Quoted 6 lines
Quoted 1 line

Applied to pci/host-dra7xx for v3.19, thanks!

Kishon, let me know if there's any issue with this. It looks like a pretty obvious fix.

Indeed. Don't see a problem with it.

Thanks
Kishon

Quoted 27 lines
Quoted 27 lines

---
This patch is based on the submitted patch "[PATCH V2] PCI:
dra7xx: Add dra7xx prefix before add_pcie_port".

 drivers/pci/host/pci-dra7xx.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/pci/host/pci-dra7xx.c +2 -2
index 5b4a644..8c69697 100644
@@ -270,8 +270,8 @@ static irqreturn_t dra7xx_pcie_irq_handler(int irq, void *arg)
 	return IRQ_HANDLED;
 }
 
-static int dra7xx_add_pcie_port(struct dra7xx_pcie *dra7xx,
-				struct platform_device *pdev)
+static int __init dra7xx_add_pcie_port(struct dra7xx_pcie *dra7xx,
+				       struct platform_device *pdev)
 {
 	int ret;
 	struct pcie_port *pp;
Signature · 1 line
1.7.9.5