From: Sachin Kamat Date: Wed, 28 May 2014 09:48:45 +0000 (+0530) Subject: PCI: exynos: Fix add_pcie_port() section mismatch warning X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=9e525a31843c0a0e983e83a2fbb5b595f550cf5d;p=karo-tx-linux.git PCI: exynos: Fix add_pcie_port() section mismatch warning add_pcie_port() is called only from exynos_pcie_probe(), which is annotated with __init. Thus it makes sense to annotate add_pcie_port() with __init to avoid the following section mismatch warning: WARNING: drivers/pci/built-in.o(.text.unlikely+0xf8): Section mismatch in reference from the function add_pcie_port() to the function .init.text:dw_pcie_host_init() The function add_pcie_port() references the function __init dw_pcie_host_init(). This is often because add_pcie_port lacks a __init annotation or the annotation of dw_pcie_host_init is wrong. [bhelgaas: changelog] Reported-by: kbuild test robot Signed-off-by: Sachin Kamat Signed-off-by: Bjorn Helgaas Acked-by: Jingoo Han (cherry picked from commit 17d7acc8e1c81f8125730aa900c67412a2ac69e2) --- diff --git a/drivers/pci/host/pci-exynos.c b/drivers/pci/host/pci-exynos.c index 2ccc44257645..3b5d4d78364a 100644 --- a/drivers/pci/host/pci-exynos.c +++ b/drivers/pci/host/pci-exynos.c @@ -511,7 +511,8 @@ static struct pcie_host_ops exynos_pcie_host_ops = { .host_init = exynos_pcie_host_init, }; -static int add_pcie_port(struct pcie_port *pp, struct platform_device *pdev) +static int __init add_pcie_port(struct pcie_port *pp, + struct platform_device *pdev) { int ret;