From patchwork Mon Oct 24 15:33:18 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 9392369 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.web.codeaurora.org (Postfix) with ESMTP id 22ED46077A for ; Mon, 24 Oct 2016 15:35:35 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 15C9429164 for ; Mon, 24 Oct 2016 15:35:35 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0A16D29178; Mon, 24 Oct 2016 15:35:35 +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=-6.9 required=2.0 tests=BAYES_00,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 D312229164 for ; Mon, 24 Oct 2016 15:35:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933767AbcJXPfc (ORCPT ); Mon, 24 Oct 2016 11:35:32 -0400 Received: from mout.kundenserver.de ([217.72.192.73]:55189 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932525AbcJXPfb (ORCPT ); Mon, 24 Oct 2016 11:35:31 -0400 Received: from wuerfel.lan. ([78.43.20.153]) by mrelayeu.kundenserver.de (mreue102) with ESMTPA (Nemesis) id 0MGzR4-1cBKa808bS-00Dlnx; Mon, 24 Oct 2016 17:33:30 +0200 From: Arnd Bergmann To: x86@kernel.org Cc: Arnd Bergmann , Bjorn Helgaas , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , Borislav Petkov , Tony Luck , linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] x86: quirks: hide maybe-uninitialized warning Date: Mon, 24 Oct 2016 17:33:18 +0200 Message-Id: <20161024153325.2752428-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 MIME-Version: 1.0 X-Provags-ID: V03:K0:Tgne+nBjDGHj6UCumAvdXJvHZsKS0bWDszpEEROEyzKqWI/5hyu 9721mrV1tyUBn7+njbTvMoW6p0RrOd81dL45qVsp0wDFFZ4QIFEaaKC/k3Ypf4ATDnTPiZ5 mDS1Oo1aqjxVUQJUjeGA1HVLnIn8WTTYqWlQ5MW86/C5q9nWEzuvveMp5acC/iOjJ9/O7qj 2C5jPiB0SrqNY7+YP2Pcg== X-UI-Out-Filterresults: notjunk:1; V01:K0:ia9Ylo2PcG0=:8A+izoXXtkv1HjogmyLcxL hlwqKTQC9i0uX+FaBT+90vIxkTiVHRBjOz1Xb+ryK+tuRalBGRpbq2YV3d6oi+F/0FtBIQPum Fo3tTXa3tSf1fDuOpXZtC0Yk7uZpJnCvQFQ+2xSaVVJLIch4whRMMF3es3DaVMr35rPsSRLLE YN44Z9VYCtPb1IDpVlXRPjoqfW6nM0ap057WZuCWGwiHsFdcNwKNz8M8349L1PWPKCUEsZv4q nJfAOoAu5v0s77hlRNwbVnU+BuGwpawmNwxogrL0wDzOx1yKQYq9lHHDLJkwAD3wUIDZDekOb cUz5DmW1yK4clr8sNCYdrQ18i2q7gmENwGtbvKcbnTI4cp+hfgEN54cBPzPbKTn2XznUjgq7T P0aaFUwwjZQGpj3gzTN04llTPTGvnI5TUyv9S6T+Towt8eDl7Kpk1VbGzpWNw/DxCy1dMNdEG 9bEPIddWhH1cpNgLecUf6SXQxYgFWe4kjFYC9rH6TVB8wVaLG0NkAdWKPvUh7HV9M/6g1NXKv wie3bUOb+tUJE1/BBt78LcyWrh+npTK0mh2nOjo6mo4v37Y6TUxRsTq/c5EDLirf7a2o4NXCH 4APo+jE1jnYJkmhtRQw6sER9uOfSGTG2ilxwwywENOe2UfMQ8AXYS/aoc7J1G0WMD3FdZKVaS wJWeihmcdnVzrv3jJyjGhNrgahifucpAdngO2EUMevvnSCgUUOz0OciTJm7a2ZNrdY5gLEQo7 K4IQlQqHhiMZizNS 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 gcc -Wmaybe-uninitialized detects that quirk_intel_brickland_xeon_ras_cap uses uninitialized data when CONFIG_PCI is not set: arch/x86/kernel/quirks.c: In function ‘quirk_intel_brickland_xeon_ras_cap’: arch/x86/kernel/quirks.c:641:13: error: ‘capid0’ is used uninitialized in this function [-Werror=uninitialized] However, the function is also not called in this configuration, so we can avoid the warning by moving the existing #ifdef to cover it as well. Signed-off-by: Arnd Bergmann Acked-by: Bjorn Helgaas --- arch/x86/kernel/quirks.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/arch/x86/kernel/quirks.c b/arch/x86/kernel/quirks.c index 51402a7e4ca6..0bee04d41bed 100644 --- a/arch/x86/kernel/quirks.c +++ b/arch/x86/kernel/quirks.c @@ -625,8 +625,6 @@ static void amd_disable_seq_and_redirect_scrub(struct pci_dev *dev) DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_16H_NB_F3, amd_disable_seq_and_redirect_scrub); -#endif - #if defined(CONFIG_X86_64) && defined(CONFIG_X86_MCE) #include #include @@ -657,3 +655,4 @@ DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, 0x2fc0, quirk_intel_brickland_xeon_ DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, 0x6fc0, quirk_intel_brickland_xeon_ras_cap); DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, 0x2083, quirk_intel_purley_xeon_ras_cap); #endif +#endif