Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp6290696imm; Mon, 23 Jul 2018 15:12:34 -0700 (PDT) X-Google-Smtp-Source: AAOMgpcbVeJWUUrMv+bwwS/imviOqnOHTuf0k//Ev3016lI8E9Iw2ICDHeWZ3EtItygtp39ktZC6 X-Received: by 2002:a62:c0c4:: with SMTP id g65-v6mr14877532pfk.72.1532383954859; Mon, 23 Jul 2018 15:12:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532383954; cv=none; d=google.com; s=arc-20160816; b=eQnEPwetP+Me0+ivq0OafmW87ebZlH80nkjnOe8/sckkCMhmf8CHzCJ1hgogPsRz40 RdgVhmk288nxD1+ZLK0+f9zjnxqOZPd4CeuDq819ag/Vd1K6ZXQ/FUmeVwlHvyHwHzg0 FueWbSZyCLt3a2tL1qlQmJweVLuSZm3dALpuiu1ETHYu0QXNF+FQ3ogQfrhQfWeP/Uhd q7CQSVY4o0OuAzfG/ivfa2zWGZi+GgcSQWfowM2DAjojuZ3+AxDYevnCZlvq6Rk24moZ 2JJ2lp/orpzW/Nyk9GR92+uRNzyXRttHMqnYbHbMdcM+/ZmnOoL7yomCeCn1zmY7n7b4 LDcQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature :arc-authentication-results; bh=uAz+2d3daIb30aPP4xBKRjCcXfA51ABAnh1hBWWaGlE=; b=yCqRUecGmjqkfWZO6shgapsMIvQh+7vMREQFn8bx4E+/VIMuf3rBAlWAhlUSfPFt4t xEAggZjPKcw7ItGYF+vFK5iGDxhEM5Pl6TngsbZveBVkKMZIpIvf/dTjqnF64NBXi6Vl me8P7stcobKxmOYwIv+iC27CNcX/MXZF7/8vMNBx9REt+P0uUxUL9BsTabKg4AtvsJka Zr+kRAgjkg6eMnUcRAy+4E4c6fmbiliXRvox7cGhUuPmnjNHVt2P76+v7YAM0f9yL3fE jBx5sqfva8gmMUOQj3jMcCOm5G7j1GojWZns4s6fd4rYXQSIk7r4A32d1f8h4ehrV+xs ZgcQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=zmtorP9N; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 186-v6si10112288pff.270.2018.07.23.15.12.19; Mon, 23 Jul 2018 15:12:34 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=zmtorP9N; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388177AbeGWXOs (ORCPT + 99 others); Mon, 23 Jul 2018 19:14:48 -0400 Received: from mail.kernel.org ([198.145.29.99]:56320 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388105AbeGWXOs (ORCPT ); Mon, 23 Jul 2018 19:14:48 -0400 Received: from localhost (unknown [69.71.4.100]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 7F26420852; Mon, 23 Jul 2018 22:11:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1532383890; bh=Wdm50P1xvTxdjHlqcjGYz8EGxsFDLpIJI8lhSnJjQcw=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=zmtorP9NwRgwKiQHO1K8lvFWwBr5adEq2HGunDAuPwTB19Rjieo+BYDOy7NQnux6f H0JkR+TIs8PJtY+3bsAToxfIXnGQFFb7omkEmj50KLbEglCbvJBIM7wC8FFCSN0c8v 5kk75VlBx752u6hSXxRfcojiwFRxXA2qarW/4VwI= Date: Mon, 23 Jul 2018 17:11:29 -0500 From: Bjorn Helgaas To: Anders Roxell Cc: bhelgaas@google.com, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] drivers/pci/probe: Move variable bridge inside ifdef Message-ID: <20180723221129.GW128988@bhelgaas-glaptop.roam.corp.google.com> References: <20180721214556.25651-1-anders.roxell@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20180721214556.25651-1-anders.roxell@linaro.org> User-Agent: Mutt/1.9.2 (2017-12-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 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 >