• Arnd Bergmann's avatar
    x86/quirks: Hide maybe-uninitialized warning · d320b9a5
    Arnd Bergmann authored
    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: default avatarArnd 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.deSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
    d320b9a5
quirks.c 17.4 KB