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: 142507 Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp4445134ljj; Sat, 21 Jul 2018 14:46:07 -0700 (PDT) X-Google-Smtp-Source: AAOMgpeNBooT8nEf7tMIdk8EQSDVF4Z6Xa1H2xmlCGw/c1QMzAWv3Cl0e0oMwgxTrnNY82Y7HS7u X-Received: by 2002:a62:a05:: with SMTP id s5-v6mr7265148pfi.147.1532209567451; Sat, 21 Jul 2018 14:46:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532209567; cv=none; d=google.com; s=arc-20160816; b=m+rKNRfXhLdqf4HMuBKMAIlOXBuia+bYmCEHosMcAqt+3wPcam+0xtiEXQZXUwB+rP Gcubt+4PEshy1Jxs02dVljfGvggt0gH6YqHHgrs6PswzwexKDaOnoARPTpclqHbMX93U WeIz6g4UpKbd3PYfr10XJbSj6IyTSZV/4cOuy+jHrqjoCSRt1hF+MYrpoDy2xQhSTBov qfISDCXKuGzFxJBtd0U+2Q8gCLv13DXjjzlBdQBlHI5MMNDr1HCMy48CtMrX07wq2u/E /lRtpOEEi6+78l929P/iXnqQbexKQL6iPuJEh04+TfVOo972x0RYnrFb0ralX50yupc0 b16Q== 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 i13-v6si4808785pgi.277.2018.07.21.14.46.07; Sat, 21 Jul 2018 14:46:07 -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 S1728274AbeGUWkQ (ORCPT + 31 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 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(-) -- 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.