Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753379AbbKMH3d (ORCPT ); Fri, 13 Nov 2015 02:29:33 -0500 Received: from szxga02-in.huawei.com ([119.145.14.65]:32457 "EHLO szxga02-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751341AbbKMH3b (ORCPT ); Fri, 13 Nov 2015 02:29:31 -0500 Message-ID: <56459149.8090709@hisilicon.com> Date: Fri, 13 Nov 2015 15:29:13 +0800 From: Zhou Wang User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:17.0) Gecko/20130509 Thunderbird/17.0.6 MIME-Version: 1.0 To: Arnd Bergmann CC: , Jisheng Zhang , , , Subject: Re: [PATCH] PCI: hisi: fix deferred probing References: <1447329728-1589-1-git-send-email-jszhang@marvell.com> <4417267.EzK5DAjM5p@wuerfel> In-Reply-To: <4417267.EzK5DAjM5p@wuerfel> Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.66.65.131] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A020201.56459154.0190,ss=1,re=0.000,fgs=0, ip=0.0.0.0, so=2013-06-18 04:22:30, dmn=2011-05-27 18:58:46 X-Mirapoint-Loop-Id: 39573860212f83b3b85bfcd0f1d43e91 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1757 Lines: 60 On 2015/11/12 20:21, Arnd Bergmann wrote: > The hisi_pcie_probe function is incorrectly marked as __init, as Kconfig > tells us: > > WARNING: drivers/pci/host/built-in.o(.data+0x7780): Section mismatch in reference from the variable hisi_pcie_driver to the function .init.text:hisi_pcie_probe() > > If the probe for this device gets deferred past the point where __init > functions are removed, or the device is unbound and then reattached to > the driver, we branch into uninitialized memory, which is bad. > > This removes the __init annotation. > > Signed-off-by: Arnd Bergmann > Hi Arnd, Many thanks, it looks good to me. so Acked-by: Zhou Wang Regards, Zhou > diff --git a/drivers/pci/host/pcie-hisi.c b/drivers/pci/host/pcie-hisi.c > index 35457ecd8e70..163671a4f798 100644 > --- a/drivers/pci/host/pcie-hisi.c > +++ b/drivers/pci/host/pcie-hisi.c > @@ -111,7 +111,7 @@ static struct pcie_host_ops hisi_pcie_host_ops = { > .link_up = hisi_pcie_link_up, > }; > > -static int __init hisi_add_pcie_port(struct pcie_port *pp, > +static int hisi_add_pcie_port(struct pcie_port *pp, > struct platform_device *pdev) > { > int ret; > @@ -139,7 +139,7 @@ static int __init hisi_add_pcie_port(struct pcie_port *pp, > return 0; > } > > -static int __init hisi_pcie_probe(struct platform_device *pdev) > +static int hisi_pcie_probe(struct platform_device *pdev) > { > struct hisi_pcie *hisi_pcie; > struct pcie_port *pp; > > > . > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/