[PATCH] x86/defconfig: Enable WERROR

Borislav Petkov posted 1 patch 4 years, 3 months ago
There is a newer version of this series
arch/x86/configs/i386_defconfig   | 1 +
arch/x86/configs/x86_64_defconfig | 1 +
2 files changed, 2 insertions(+)
[PATCH] x86/defconfig: Enable WERROR
Posted by Borislav Petkov 4 years, 3 months ago
From: Borislav Petkov <bp@suse.de>

To quote Linus:

"EVERYBODY should have CONFIG_WERROR=y on at least x86-64 and other
serious architectures, unless you have some completely random
experimental (and broken) compiler.

New compiler warnings are not acceptable."

So this should make at least the most obvious and common ones not go
unnoticed.

Signed-off-by: Borislav Petkov <bp@suse.de>
---
 arch/x86/configs/i386_defconfig   | 1 +
 arch/x86/configs/x86_64_defconfig | 1 +
 2 files changed, 2 insertions(+)

diff --git a/arch/x86/configs/i386_defconfig b/arch/x86/configs/i386_defconfig
index 71124cf8630c..4b2085243aa3 100644
--- a/arch/x86/configs/i386_defconfig
+++ b/arch/x86/configs/i386_defconfig
@@ -262,3 +262,4 @@ CONFIG_PROVIDE_OHCI1394_DMA_INIT=y
 CONFIG_EARLY_PRINTK_DBGP=y
 CONFIG_DEBUG_BOOT_PARAMS=y
 CONFIG_KALLSYMS_ALL=y
+CONFIG_WERROR=y
diff --git a/arch/x86/configs/x86_64_defconfig b/arch/x86/configs/x86_64_defconfig
index 92b1169ec90b..38c52e4eb30b 100644
--- a/arch/x86/configs/x86_64_defconfig
+++ b/arch/x86/configs/x86_64_defconfig
@@ -258,3 +258,4 @@ CONFIG_PROVIDE_OHCI1394_DMA_INIT=y
 CONFIG_EARLY_PRINTK_DBGP=y
 CONFIG_DEBUG_BOOT_PARAMS=y
 CONFIG_KALLSYMS_ALL=y
+CONFIG_WERROR=y
-- 
2.29.2


-- 
Regards/Gruss,
    Boris.

https://people.kernel.org/tglx/notes-about-netiquette
Re: [PATCH] x86/defconfig: Enable WERROR
Posted by Linus Torvalds 4 years, 3 months ago
On Wed, Mar 23, 2022 at 4:21 AM Borislav Petkov <bp@alien8.de> wrote:
>
> So this should make at least the most obvious and common ones not go
> unnoticed.

Ack. I'm actually surprised people use "defconfig". It's kind of
pointless and unreal on x86 where there is no realistic "default". I'm
sorry it exists at all.

But since people clearly use it - presumably for testing - I very much
think it should have WERROR on.

                Linus
Re: [PATCH] x86/defconfig: Enable WERROR
Posted by Borislav Petkov 4 years, 3 months ago
On Wed, Mar 23, 2022 at 10:19:39AM -0700, Linus Torvalds wrote:
> Ack. I'm actually surprised people use "defconfig". It's kind of
> pointless and unreal on x86 where there is no realistic "default". I'm
> sorry it exists at all.

Yeah, it has been there since forever and peterz and mingo use it from
time to time, AFAIK. Also, I know people start from a defconfig and add
additional stuff they need.

Oh, and it is part of the smoke build-tests we're doing so...

> But since people clearly use it - presumably for testing - I very much
> think it should have WERROR on.

Yeah, I am aiming for a "this should be always enabled in your config
so you could use this defconfig as a start"-thing, in the hope that
WERROR=y would proliferate then.

Thx.

-- 
Regards/Gruss,
    Boris.

https://people.kernel.org/tglx/notes-about-netiquette
[tip: x86/urgent] x86/defconfig: Enable WERROR
Posted by tip-bot2 for Borislav Petkov 4 years, 3 months ago
The following commit has been merged into the x86/urgent branch of tip:

Commit-ID:     b9080ba4a6ec56447f263082825a4fddb873316b
Gitweb:        https://git.kernel.org/tip/b9080ba4a6ec56447f263082825a4fddb873316b
Author:        Borislav Petkov <bp@suse.de>
AuthorDate:    Wed, 23 Mar 2022 12:21:10 +01:00
Committer:     Ingo Molnar <mingo@kernel.org>
CommitterDate: Thu, 24 Mar 2022 09:10:56 +01:00

x86/defconfig: Enable WERROR

To quote Linus:

  "EVERYBODY should have CONFIG_WERROR=y on at least x86-64 and other
   serious architectures, unless you have some completely random
   experimental (and broken) compiler.

New compiler warnings are not acceptable."

So this should make at least the most obvious and common ones not go
unnoticed.

Acked-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Borislav Petkov <bp@suse.de>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Link: https://lore.kernel.org/r/YjsCpoRK7W4l6tSh@zn.tnic
---
 arch/x86/configs/i386_defconfig   | 1 +
 arch/x86/configs/x86_64_defconfig | 1 +
 2 files changed, 2 insertions(+)

diff --git a/arch/x86/configs/i386_defconfig b/arch/x86/configs/i386_defconfig
index 71124cf..4b20852 100644
--- a/arch/x86/configs/i386_defconfig
+++ b/arch/x86/configs/i386_defconfig
@@ -262,3 +262,4 @@ CONFIG_PROVIDE_OHCI1394_DMA_INIT=y
 CONFIG_EARLY_PRINTK_DBGP=y
 CONFIG_DEBUG_BOOT_PARAMS=y
 CONFIG_KALLSYMS_ALL=y
+CONFIG_WERROR=y
diff --git a/arch/x86/configs/x86_64_defconfig b/arch/x86/configs/x86_64_defconfig
index 92b1169..38c52e4 100644
--- a/arch/x86/configs/x86_64_defconfig
+++ b/arch/x86/configs/x86_64_defconfig
@@ -258,3 +258,4 @@ CONFIG_PROVIDE_OHCI1394_DMA_INIT=y
 CONFIG_EARLY_PRINTK_DBGP=y
 CONFIG_DEBUG_BOOT_PARAMS=y
 CONFIG_KALLSYMS_ALL=y
+CONFIG_WERROR=y