From patchwork Sat Jul 21 21:45:56 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Anders Roxell X-Patchwork-Id: 10539011 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B06E8A68E for ; Sun, 22 Jul 2018 00:57:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B8D2C28CE3 for ; Sat, 21 Jul 2018 21:46:20 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AC72028D09; Sat, 21 Jul 2018 21:46:20 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5A72F28CE3 for ; Sat, 21 Jul 2018 21:46:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728229AbeGUWkV (ORCPT ); Sat, 21 Jul 2018 18:40:21 -0400 Received: from mail-lf1-f68.google.com ([209.85.167.68]:35995 "EHLO mail-lf1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728166AbeGUWkQ (ORCPT ); Sat, 21 Jul 2018 18:40:16 -0400 Received: by mail-lf1-f68.google.com with SMTP id b22-v6so3980885lfa.3 for ; Sat, 21 Jul 2018 14:46:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=RhQTP/e/DcOTc3xFyu/54r0ruORcNYJLBtZlqSp+B8s=; b=BEJT5Hohu9Z4Dn7idV2io0VwcjUeq5uz/uysvji6lnFycw1Uwz1U4/866AM3VG0M4K J6UFt/Rcejq0n9UcejjfC7Hr5kNtYO6aIAyzF7MlkbtXxGvWRFos907dObRzeuxTHQjP 2li/pK/IRMeW6kF8ppqYGjVNMKJir/n8kKno8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=RhQTP/e/DcOTc3xFyu/54r0ruORcNYJLBtZlqSp+B8s=; b=IyPUVZl/lO+CJZijag4Ix/n0FoVubSsxosrMRh3ysF5oQ8ZGm4tAzkMOVzne9DKBF3 lVDD1bs0EeAEOFGWMiLCXb8a/k8vU/PRZqDN1lirAUTxW0hCTP3F6u0edtjoGsnoUtyK ZVLFmAhFwjsTHUsO3RFn9ZQYKF4gp5clRI1NypGNiuLO5CaCqMlZWsGOG7CoSUsCu2oU POAVyiWoHk2JXKJVXwyb/Lf+M3KGBMRO/HKzYbVNJ8lglyw30MRfhZ80zz2YNZW3KZQb cp8GNBOFbjXNB6ru0QXmvevxLrFLr3UjFlAJOKA8bZ9amcoI9wjj/fWffDyyc02G7bPn OOpA== X-Gm-Message-State: AOUpUlGppABShJ5ED/Dq5w/NGpeRAjUXQE+siMtHmqvpnz4fGdPUqX0U KMGlC9h5h/R2fPOU0f8nrTXL6Q== X-Google-Smtp-Source: AAOMgpcd6Nkzou5rJnhtprKjqg0EzlkvX28/KS2Rk2rCDffyxC3HrdLyPkM84RlxjdGOc38g8tlqOA== X-Received: by 2002:a19:9cca:: with SMTP id f193-v6mr4005314lfe.60.1532209561945; Sat, 21 Jul 2018 14:46:01 -0700 (PDT) Received: from localhost (c-2c3d70d5.07-21-73746f28.bbcust.telenor.se. [213.112.61.44]) by smtp.gmail.com with ESMTPSA id i125-v6sm794432lfg.25.2018.07.21.14.46.01 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 21 Jul 2018 14:46:01 -0700 (PDT) From: Anders Roxell To: bhelgaas@google.com Cc: linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, Anders Roxell Subject: [PATCH] drivers/pci/probe: Move variable bridge inside ifdef Date: Sat, 21 Jul 2018 23:45:56 +0200 Message-Id: <20180721214556.25651-1-anders.roxell@linaro.org> X-Mailer: git-send-email 2.18.0 MIME-Version: 1.0 Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- 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.