diff options
author | Richard Zhu <hongxing.zhu@nxp.com> | 2018-07-18 10:56:54 +0800 |
---|---|---|
committer | Jason Liu <jason.hui.liu@nxp.com> | 2019-02-12 10:32:43 +0800 |
commit | 0efe4e02da4052d2f1a4bce6822deedca6a249d3 (patch) | |
tree | e2ebcf5f24af1946c0920c3ac92507b62c40a54e /drivers/pci/dwc | |
parent | 49798506ccffa4823e174d3ab1308645d6623e11 (diff) |
MLK-18953 PCI: imx: fix the building warning
- warning: ‘retries’ may be used uninitialized in this function
- WARNING: vmlinux.o(.data+0x5d2d8): Section mismatch in reference from the
variable imx_pcie_driver to the function .init.text:imx_pcie_probe()
The variable imx_pcie_driver references the function __init imx_pcie_probe()
If the reference is valid then annotate the variable with
__init* or __refdata (see linux/init.h) or name the variable:
*_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console
Signed-off-by: Jason Liu <jason.hui.liu@nxp.com>
Signed-off-by: Richard Zhu <hongxing.zhu@nxp.com>
Diffstat (limited to 'drivers/pci/dwc')
-rw-r--r-- | drivers/pci/dwc/pci-imx6.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/pci/dwc/pci-imx6.c b/drivers/pci/dwc/pci-imx6.c index 488f5b79ee08..996c4e25a307 100644 --- a/drivers/pci/dwc/pci-imx6.c +++ b/drivers/pci/dwc/pci-imx6.c @@ -644,7 +644,7 @@ static int imx7d_pcie_wait_for_phy_pll_lock(struct imx_pcie *imx_pcie) static int imx8_pcie_wait_for_phy_pll_lock(struct imx_pcie *imx_pcie) { u32 val, tmp, orig; - unsigned int retries; + unsigned int retries = 0; struct dw_pcie *pci = imx_pcie->pci; struct device *dev = pci->dev; @@ -2179,7 +2179,7 @@ static int imx_pcie_local_dma_start(struct pcie_port *pp, bool dir, return 0; } -static int __init imx_pcie_probe(struct platform_device *pdev) +static int imx_pcie_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; struct dw_pcie *pci; |