Skip to content

Commit

Permalink
PCI: exynos: Fix add_pcie_port() section mismatch warning
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Sachin Kamat <[email protected]>
Signed-off-by: Bjorn Helgaas <[email protected]>
Acked-by: Jingoo Han <[email protected]>
  • Loading branch information
Sachin Kamat authored and bjorn-helgaas committed May 29, 2014
1 parent 755ba5e commit 17d7acc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/pci/host/pci-exynos.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 17d7acc

Please sign in to comment.