Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp4273112imm; Sat, 21 Jul 2018 14:47:12 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfmiuLutQPj30FwvjACIyr5OmiAucdj8Vp5xzHTxDZDbJLv58De/NA1YSnto7RCI4ohYCPQ X-Received: by 2002:a17:902:8f96:: with SMTP id z22-v6mr7119777plo.190.1532209632382; Sat, 21 Jul 2018 14:47:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532209632; cv=none; d=google.com; s=arc-20160816; b=fV0C2piDAPbInRnB5u494Cs6UwWTg4E4WSk/RnaT1TvgAG4dqCznLJfb1hOuSUglCe heFfy3P9dvdvpfCcG7GDWONqixVR8JphS9of2vVPkPYWfPe9wmEFUx2ETwZWjQrkYguV kP3ehfA4Mr/Aflpl4ifxfSYPvTqiEWwSvv3QkoIuhzDLheCT06Gv4TckPtf2vWWmcLEs d7y6GAzu4wHAFqrGqLY5WEgGEp8KQ+rc2xL/yGfJZ/U+eQSuBR5SSQYG5yR+yTULMZgF wZ/ZyG2us+IdPx2jQaoQjwHtnuJiO2mBnvY6o6epC/OQO0Q4wYC/0QvjcccSMvKhr90x 0ZDg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=RhQTP/e/DcOTc3xFyu/54r0ruORcNYJLBtZlqSp+B8s=; b=dhXaH0jto0kZ0gTuJQlQOpJ5Uaf1cS07TuBIf+KUhMQrL+LJ9MP5S2rkJSDRoscDaG D3V8pOELtphDY+hJ7T62dzULhw5xZxkohdXEyJUl2Fp1t8b3oQlkczOsmai3Ge/ZJ0FD 93qkPSSST6KgV76PHmJvlmLJUZOMSvDJqvUiwvSIeuFKbG7yLjKcKh+rKz7vMffDqTh/ 789QzBgdJn1tfKPdFQMA7sC4btDtYb5EezPpBwuaMFL0Ii8wAv1GjSU1VDpTYVZ/Aksx Vp5yl7yOiSkJrLOY986ZZoLBqXDYY6pyGuGWRUxq7WgcK80ZKArKf/Q/zASw1E4V/omG gbYg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=BEJT5Hoh; 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=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j38-v6si4507233pgj.613.2018.07.21.14.46.55; Sat, 21 Jul 2018 14:47:12 -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=@linaro.org header.s=google header.b=BEJT5Hoh; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728267AbeGUWkQ (ORCPT + 99 others); Sat, 21 Jul 2018 18:40:16 -0400 Received: from mail-lf1-f67.google.com ([209.85.167.67]:33374 "EHLO mail-lf1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728229AbeGUWkQ (ORCPT ); Sat, 21 Jul 2018 18:40:16 -0400 Received: by mail-lf1-f67.google.com with SMTP id u14-v6so3985996lfu.0 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=uDeKZ+kuDYjZDmacHiGsjcNwiqpAlJp/xecwaumJRiI/7mnlIZy6PN2p/NIFjbCLqz gZyKQM+26kDpSizjKRHl/98CTnTHEfojk8ZquEMJYOUusCvEYjZE8v6y+vkGma7Q/3OF k9PPI6Pqml/b5AzGkvh1OwSf364VDWy//NrSfNf6m6exlO+MscIq/aBp4vB6NES15Fak RSmuY1EzAF5paHML31CThB7yLPWm6SrkoC/PJpNDcye2T3i5VwFPDtOu2Pu86sqYMYQA R72/KFILit4UdGp7HxfA03RyxW/6r6pg/wyyK3+Q5bmGnvnhUGFVC2tGKuV3KShQNxKl dPZw== X-Gm-Message-State: AOUpUlE5kDXcA1buir6I/8PLC+sz08w4CrDZUqZLxkqCvEPziy5QNsAF sWEi2a6EzlXJV74U9jkEGe2upg== 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 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. -- 2.18.0