* [PATCH] x86: quirks: hide maybe-uninitialized warning
@ 2016-10-24 15:33 Arnd Bergmann
2016-10-25 10:31 ` [tip:x86/urgent] x86/quirks: Hide " tip-bot for Arnd Bergmann
2016-10-26 19:56 ` [PATCH] x86: quirks: hide " Bjorn Helgaas
0 siblings, 2 replies; 4+ messages in thread
From: Arnd Bergmann @ 2016-10-24 15:33 UTC (permalink / raw)
To: x86
Cc: Arnd Bergmann, Bjorn Helgaas, Thomas Gleixner, Ingo Molnar,
H. Peter Anvin, Borislav Petkov, Tony Luck, linux-pci,
linux-kernel
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>
---
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 <linux/jump_label.h>
#include <asm/string_64.h>
@@ -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
--
2.9.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [tip:x86/urgent] x86/quirks: Hide maybe-uninitialized warning
2016-10-24 15:33 [PATCH] x86: quirks: hide maybe-uninitialized warning Arnd Bergmann
@ 2016-10-25 10:31 ` tip-bot for Arnd Bergmann
2016-10-26 19:56 ` [PATCH] x86: quirks: hide " Bjorn Helgaas
1 sibling, 0 replies; 4+ messages in thread
From: tip-bot for Arnd Bergmann @ 2016-10-25 10:31 UTC (permalink / raw)
To: linux-tip-commits
Cc: linux-kernel, peterz, bhelgaas, tony.luck, arnd, tglx, hpa,
mingo, bp, torvalds
Commit-ID: d320b9a5bd85f6178cc3ed8b0a1a9960f2b5bc7b
Gitweb: http://git.kernel.org/tip/d320b9a5bd85f6178cc3ed8b0a1a9960f2b5bc7b
Author: Arnd Bergmann <arnd@arndb.de>
AuthorDate: Mon, 24 Oct 2016 17:33:18 +0200
Committer: Ingo Molnar <mingo@kernel.org>
CommitDate: Tue, 25 Oct 2016 11:45:13 +0200
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 | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/arch/x86/kernel/quirks.c b/arch/x86/kernel/quirks.c
index 51402a7..0bee04d 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 <linux/jump_label.h>
#include <asm/string_64.h>
@@ -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
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] x86: quirks: hide maybe-uninitialized warning
2016-10-24 15:33 [PATCH] x86: quirks: hide maybe-uninitialized warning Arnd Bergmann
2016-10-25 10:31 ` [tip:x86/urgent] x86/quirks: Hide " tip-bot for Arnd Bergmann
@ 2016-10-26 19:56 ` Bjorn Helgaas
2016-10-27 6:23 ` Ingo Molnar
1 sibling, 1 reply; 4+ messages in thread
From: Bjorn Helgaas @ 2016-10-26 19:56 UTC (permalink / raw)
To: Arnd Bergmann
Cc: x86, Bjorn Helgaas, Thomas Gleixner, Ingo Molnar, H. Peter Anvin,
Borislav Petkov, Tony Luck, linux-pci, linux-kernel
On Mon, Oct 24, 2016 at 05:33:18PM +0200, Arnd Bergmann wrote:
> 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>
This fixes 3637efb00864 ("x86/mce: Add PCI quirks to identify Xeons with
machine check recovery"), which appeared in v4.9-rc1. I assume it will be
merged for v4.9 via the x86 tree, as 3637efb00864 was.
Acked-by: Bjorn Helgaas <bhelgaas@google.com>
> ---
> 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 <linux/jump_label.h>
> #include <asm/string_64.h>
> @@ -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
> --
> 2.9.0
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-pci" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] x86: quirks: hide maybe-uninitialized warning
2016-10-26 19:56 ` [PATCH] x86: quirks: hide " Bjorn Helgaas
@ 2016-10-27 6:23 ` Ingo Molnar
0 siblings, 0 replies; 4+ messages in thread
From: Ingo Molnar @ 2016-10-27 6:23 UTC (permalink / raw)
To: Bjorn Helgaas
Cc: Arnd Bergmann, x86, Bjorn Helgaas, Thomas Gleixner, Ingo Molnar,
H. Peter Anvin, Borislav Petkov, Tony Luck, linux-pci,
linux-kernel
* Bjorn Helgaas <helgaas@kernel.org> wrote:
> On Mon, Oct 24, 2016 at 05:33:18PM +0200, Arnd Bergmann wrote:
> > 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>
>
> This fixes 3637efb00864 ("x86/mce: Add PCI quirks to identify Xeons with
> machine check recovery"), which appeared in v4.9-rc1. I assume it will be
> merged for v4.9 via the x86 tree, as 3637efb00864 was.
>
> Acked-by: Bjorn Helgaas <bhelgaas@google.com>
Yeah, that's the plan - thanks!
Ingo
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-10-27 6:23 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-24 15:33 [PATCH] x86: quirks: hide maybe-uninitialized warning Arnd Bergmann
2016-10-25 10:31 ` [tip:x86/urgent] x86/quirks: Hide " tip-bot for Arnd Bergmann
2016-10-26 19:56 ` [PATCH] x86: quirks: hide " Bjorn Helgaas
2016-10-27 6:23 ` Ingo Molnar
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.