x86/quirks: Hide maybe-uninitialized warning
authorArnd Bergmann <arnd@arndb.de>
Mon, 24 Oct 2016 15:33:18 +0000 (17:33 +0200)
committerIngo Molnar <mingo@kernel.org>
Tue, 25 Oct 2016 09:45:13 +0000 (11:45 +0200)
commitd320b9a5bd85f6178cc3ed8b0a1a9960f2b5bc7b
tree845d20f6c0d638613688731a496a51ae9d6339f1
parenta2209b742e6cf978b85d4f31a25a269c3d3b062b
x86/quirks: Hide maybe-uninitialized warning

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 <arnd@arndb.de>
Cc: Bjorn Helgaas <bhelgaas@google.com>
Cc: Borislav Petkov <bp@suse.de>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Tony Luck <tony.luck@intel.com>
Cc: linux-pci@vger.kernel.org
Link: http://lkml.kernel.org/r/20161024153325.2752428-1-arnd@arndb.de
Signed-off-by: Ingo Molnar <mingo@kernel.org>
arch/x86/kernel/quirks.c