* [PATCH] drivers/pci/probe: Move variable bridge inside ifdef
@ 2018-07-21 21:45 Anders Roxell
2018-07-23 22:11 ` Bjorn Helgaas
0 siblings, 1 reply; 2+ messages in thread
From: Anders Roxell @ 2018-07-21 21:45 UTC (permalink / raw)
To: bhelgaas; +Cc: linux-pci, linux-kernel, Anders Roxell
When CONFIG_PCI_QUIRKS isn't enabled we get the warning below:
drivers/pci/probe.c: In function ‘pci_bus_read_dev_vendor_id’:
drivers/pci/probe.c:2221:18: warning: unused variable ‘bridge’ [-Wunused-variable]
struct pci_dev *bridge = bus->self;
^~~~~~
Move the declaration of variable bridge to inside the ifdef
CONFIG_PCI_QUIRKS.
Fixes: ac5ea104a279 ("PCI: Workaround IDT switch ACS Source Validation erratum")
Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
---
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] drivers/pci/probe: Move variable bridge inside ifdef
2018-07-21 21:45 [PATCH] drivers/pci/probe: Move variable bridge inside ifdef Anders Roxell
@ 2018-07-23 22:11 ` Bjorn Helgaas
0 siblings, 0 replies; 2+ messages in thread
From: Bjorn Helgaas @ 2018-07-23 22:11 UTC (permalink / raw)
To: Anders Roxell; +Cc: bhelgaas, linux-pci, linux-kernel
On Sat, Jul 21, 2018 at 11:45:56PM +0200, Anders Roxell wrote:
> When CONFIG_PCI_QUIRKS isn't enabled we get the warning below:
> drivers/pci/probe.c: In function ‘pci_bus_read_dev_vendor_id’:
> drivers/pci/probe.c:2221:18: warning: unused variable ‘bridge’ [-Wunused-variable]
> struct pci_dev *bridge = bus->self;
> ^~~~~~
>
> Move the declaration of variable bridge to inside the ifdef
> CONFIG_PCI_QUIRKS.
>
> Fixes: ac5ea104a279 ("PCI: Workaround IDT switch ACS Source Validation erratum")
> Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
I folded this into the original commit on pci/enumeration, 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
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-07-23 22:11 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-21 21:45 [PATCH] drivers/pci/probe: Move variable bridge inside ifdef Anders Roxell
2018-07-23 22:11 ` Bjorn Helgaas
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).