[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v1 4/5] PCI: Adapt all code locations to not use struct pci_dev::driver directly
- To: Uwe Kleine-König <u.kleine-koenig@xxxxxxxxxxxxxx>, Bjorn Helgaas <bhelgaas@xxxxxxxxxx>
- From: Boris Ostrovsky <boris.ostrovsky@xxxxxxxxxx>
- Date: Fri, 30 Jul 2021 16:37:31 -0400
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=WQqZO2vXgRMAEHOwfeKW9pvCxNym6y/aItCMeaAsAXU=; b=AJ+Ura8vH5oA34c9wvlKyuwRSyqVVWtOGQQfdzmIHlCYhj7iqVjksaXML8VSA91MwqJy10MEfQnxGE2ROrsBl51npCcCV/Ik26uRDGpJqXevx16Sd1ze5T6hpVugyVA34NAwsuj48fXHGJJUPAYGK+g6qNvAKPVYHTJmKd0Hj/RAMP3ViE64IeicB7vVx5h8xfJF5HXcBeqgzkww+aQO9Tp7wQHJ3GxxytRdUWqErKnWoRgzjLx4I16AIrA0/Kxp4JnKOPGlGrHx1unlaJnwXUfH7Fj7muWT5mXcErxqmUuPeFKwsJdl/F8LizQuDSI2dfNKVmtY+PngEYA7QrXdjQ==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=OwwTLA62HnA7D6mAwuAHj/MSfi+6JM6uBib2mZgfGOBl4fJfVuVGnL97TUyi+zVoZUYlmC+m99q/W3FyydP2mnWkEIeF5SOsfW+hwPeUgG2FLzJiH1qMjD3pOTP2Q6dtIvHLNS/3pDhYo7TK+MlmjgKHF5UVll/FhjP9j6G+VWcsaagoxhFSY/KRWVuZAKfwuOAb+UB5OIfT7eCCcI9ljc3w2u1HwSz7Lmk+/8hAS9srVCrEas0u0Q+SUMp5kpjr6+bK27vRLBK9LFW6tyOAPiIRwFuPbs7ptA63ttyNWsdETPPZFQqKCX7CDH3NQvs9akHd+gUqxuQyDO01sGCMmg==
- Authentication-results: vger.kernel.org; dkim=none (message not signed) header.d=none;vger.kernel.org; dmarc=none action=none header.from=oracle.com;
- Cc: Geert Uytterhoeven <geert@xxxxxxxxxxxxxx>, kernel@xxxxxxxxxxxxxx, Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>, linux-pci@xxxxxxxxxxxxxxx, Michael Ellerman <mpe@xxxxxxxxxxxxxx>, Benjamin Herrenschmidt <benh@xxxxxxxxxxxxxxxxxxx>, Paul Mackerras <paulus@xxxxxxxxx>, Russell Currey <ruscur@xxxxxxxxxx>, Oliver O'Halloran <oohall@xxxxxxxxx>, Peter Zijlstra <peterz@xxxxxxxxxxxxx>, Ingo Molnar <mingo@xxxxxxxxxx>, Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>, Mark Rutland <mark.rutland@xxxxxxx>, Alexander Shishkin <alexander.shishkin@xxxxxxxxxxxxxxx>, Jiri Olsa <jolsa@xxxxxxxxxx>, Namhyung Kim <namhyung@xxxxxxxxxx>, Thomas Gleixner <tglx@xxxxxxxxxxxxx>, Borislav Petkov <bp@xxxxxxxxx>, x86@xxxxxxxxxx, "H. Peter Anvin" <hpa@xxxxxxxxx>, Rafał Miłecki <zajec5@xxxxxxxxx>, Zhou Wang <wangzhou1@xxxxxxxxxxxxx>, Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>, "David S. Miller" <davem@xxxxxxxxxxxxx>, Giovanni Cabiddu <giovanni.cabiddu@xxxxxxxxx>, Sathya Prakash <sathya.prakash@xxxxxxxxxxxx>, Sreekanth Reddy <sreekanth.reddy@xxxxxxxxxxxx>, Suganath Prabu Subramani <suganath-prabu.subramani@xxxxxxxxxxxx>, Frederic Barrat <fbarrat@xxxxxxxxxxxxx>, Andrew Donnellan <ajd@xxxxxxxxxxxxx>, Arnd Bergmann <arnd@xxxxxxxx>, Yisen Zhuang <yisen.zhuang@xxxxxxxxxx>, Salil Mehta <salil.mehta@xxxxxxxxxx>, Jakub Kicinski <kuba@xxxxxxxxxx>, Vadym Kochan <vkochan@xxxxxxxxxxx>, Taras Chornyi <tchornyi@xxxxxxxxxxx>, Jiri Pirko <jiri@xxxxxxxxxx>, Ido Schimmel <idosch@xxxxxxxxxx>, Simon Horman <simon.horman@xxxxxxxxxxxx>, Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>, Juergen Gross <jgross@xxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Michael Buesch <m@xxxxxxx>, Mathias Nyman <mathias.nyman@xxxxxxxxx>, Fiona Trahe <fiona.trahe@xxxxxxxxx>, Andy Shevchenko <andriy.shevchenko@xxxxxxxxx>, Wojciech Ziemba <wojciech.ziemba@xxxxxxxxx>, Alexander Duyck <alexanderduyck@xxxxxx>, linuxppc-dev@xxxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx, linux-perf-users@xxxxxxxxxxxxxxx, linux-wireless@xxxxxxxxxxxxxxx, linux-crypto@xxxxxxxxxxxxxxx, qat-linux@xxxxxxxxx, MPT-FusionLinux.pdl@xxxxxxxxxxxx, linux-scsi@xxxxxxxxxxxxxxx, netdev@xxxxxxxxxxxxxxx, oss-drivers@xxxxxxxxxxxx, xen-devel@xxxxxxxxxxxxxxxxxxxx, linux-usb@xxxxxxxxxxxxxxx
- Delivery-date: Fri, 30 Jul 2021 20:39:11 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On 7/29/21 4:37 PM, Uwe Kleine-König wrote:
> --- a/drivers/pci/xen-pcifront.c
> +++ b/drivers/pci/xen-pcifront.c
> @@ -599,12 +599,12 @@ static pci_ers_result_t pcifront_common_process(int cmd,
> result = PCI_ERS_RESULT_NONE;
>
> pcidev = pci_get_domain_bus_and_slot(domain, bus, devfn);
> - if (!pcidev || !pcidev->driver) {
> + pdrv = pci_driver_of_dev(pcidev);
> + if (!pcidev || !pdrv) {
If pcidev is NULL we are dead by the time we reach 'if' statement.
-boris
> dev_err(&pdev->xdev->dev, "device or AER driver is NULL\n");
> pci_dev_put(pcidev);
> return result;
> }
> - pdrv = pcidev->driver;
>
|