[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAErSpo4wWZGgxWwjLjds7qh9UmMpas4G7jR8UK8AdL8gbfz-rA@mail.gmail.com>
Date: Tue, 24 Jul 2018 06:31:47 -0500
From: Bjorn Helgaas <bhelgaas@...gle.com>
To: Arnd Bergmann <arnd@...db.de>
Cc: "alex.williamson@...hat.com" <alex.williamson@...hat.com>,
james.puthukattukaran@...cle.com,
Mika Westerberg <mika.westerberg@...ux.intel.com>,
linux-pci@...r.kernel.org,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Anders Roxell <anders.roxell@...aro.org>
Subject: Re: [PATCH] PCI: fix unused variable warning
[+cc Anders]
On Tue, Jul 24, 2018 at 4:39 AM Arnd Bergmann <arnd@...db.de> wrote:
>
> The newly introduced function produces a warning without CONFIG_PCI_QUIRKS:
>
> drivers/pci/probe.c: In function 'pci_bus_read_dev_vendor_id':
> drivers/pci/probe.c:2221:18: error: unused variable 'bridge' [-Werror=unused-variable]
>
> Move the variable declaration into that #ifdef to avoid the warning.
>
> Fixes: ac5ea104a279 ("PCI: Workaround IDT switch ACS Source Validation erratum")
> Signed-off-by: Arnd Bergmann <arnd@...db.de>
Fixed already with a patch from Anders Roxell
<anders.roxell@...aro.org>, thanks!
> ---
> drivers/pci/probe.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c
> index 1c581346c5b9..7a5323798312 100644
> --- a/drivers/pci/probe.c
> +++ b/drivers/pci/probe.c
> @@ -2218,9 +2218,9 @@ bool pci_bus_generic_read_dev_vendor_id(struct pci_bus *bus, int devfn, u32 *l,
> bool pci_bus_read_dev_vendor_id(struct pci_bus *bus, int devfn, u32 *l,
> int timeout)
> {
> +#ifdef CONFIG_PCI_QUIRKS
> struct pci_dev *bridge = bus->self;
>
> -#ifdef CONFIG_PCI_QUIRKS
> /*
> * Certain IDT switches have an issue where they improperly trigger
> * ACS Source Validation errors on completions for config reads.
> --
> 2.18.0
>
Powered by blists - more mailing lists