From patchwork Tue Jul 24 09:39:03 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 142747 Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp7054032ljj; Tue, 24 Jul 2018 02:39:45 -0700 (PDT) X-Google-Smtp-Source: AAOMgpezktJXIFPzitDgmrm89S1l7QMZf0H+qRRqCMtYTjgJtxzQFSkL8lt3MqG/rBBUmiM2akd9 X-Received: by 2002:a63:d155:: with SMTP id c21-v6mr3925700pgj.188.1532425185099; Tue, 24 Jul 2018 02:39:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532425185; cv=none; d=google.com; s=arc-20160816; b=YULTH0eR4iFB93UefDM4bjQDvubWiUGLA0q3yGJw8eSw8lPUmzcUjFehwvWy9kkChI Gxs9WpYE0JiN3jGvLMKyvlcsIckfNoWWnsQ8P35ZXUt61KOshbwDpOrZyLJAuI0BYuVL FSDkF5abWzvKVvMzkGfzM0usRy3dmpOyD4mwGdfwyc3MjqpUzgUm9hEFeVwx10qRZcml /pb61lOdppFJF1Sf1JnHaW8NoeewxSDPK6mYnC779WqUGy8reE0dy9UVMCtveJ3OFt7R ML+ELCRriLRm1bHUgPtTAf3ZA5HEd1KdG0ShypKWkJODAtL6umfUEZiE4TUIEsktqPV2 xj0Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=7S3Km5Z7sPXNZDHNTc3K2Zc+GZotfX+uDybDH7MFPJo=; b=RY0XgsuLYOP03Tm2Xmc0Uq2+teKJmI7SCUU1eaYcO2GPZVUJmILT/EXRLHMAbiaW54 hyNL/EEaO4xeFnkVrau50JQHeiRRTQQvUmoCqDZS+REVvisyWiZH+rXIMSVRiNVduJ2A XudojtcSUxWdZ4VXbCbJ4Gmp9vG4ktDp0Y8UfDDWBNyRt+XTdDmHyf9KcD04AOQYMJQ/ Nm2cQuy7q2TK+p/2xhc9uvspUoE+MjsWspMdlyr3K70RrHdSQppy59pDOsfmJsA6dxBv U/BVfO6uSsIpGcIOH6LJ+hm3hNRcG7EpJhkqW4rlImdM2weypT+hX51EGvPpO4ojCNgO acdw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i4-v6si11160305pgd.657.2018.07.24.02.39.44; Tue, 24 Jul 2018 02:39:45 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388332AbeGXKpR (ORCPT + 31 others); Tue, 24 Jul 2018 06:45:17 -0400 Received: from mout.kundenserver.de ([212.227.17.10]:40801 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388223AbeGXKpR (ORCPT ); Tue, 24 Jul 2018 06:45:17 -0400 Received: from wuerfel.lan ([109.193.40.16]) by mrelayeu.kundenserver.de (mreue104 [212.227.15.145]) with ESMTPA (Nemesis) id 0Ma2zH-1fR4870eqN-00Loxu; Tue, 24 Jul 2018 11:39:28 +0200 From: Arnd Bergmann To: Bjorn Helgaas Cc: Alex Williamson , James Puthukattukaran , Arnd Bergmann , Mika Westerberg , linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] PCI: fix unused variable warning Date: Tue, 24 Jul 2018 11:39:03 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jFt+exSBhAe67T21B/oF1cQ= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- drivers/pci/probe.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.18.0 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.