diff mbox series

[1/3] kbuild: Remove -Wno-format-invalid-specifier from clang block

Message ID 20210816202056.4586-1-nathan@kernel.org (mailing list archive)
State New, archived
Headers show
Series [1/3] kbuild: Remove -Wno-format-invalid-specifier from clang block | expand

Commit Message

Nathan Chancellor Aug. 16, 2021, 8:20 p.m. UTC
Turning on -Wformat does not reveal any instances of this warning across
several different builds so remove this line to keep the number of
disabled warnings as slim as possible.

This has been disabled since commit 61163efae020 ("kbuild: LLVMLinux:
Add Kbuild support for building kernel with Clang"), which does not
explain exactly why it was turned off but since it was so long ago in
terms of both the kernel and LLVM so it is possible that some bug got
fixed along the way.

Signed-off-by: Nathan Chancellor <nathan@kernel.org>
---
 Makefile | 1 -
 1 file changed, 1 deletion(-)


base-commit: f12b034afeb3a977bbb1c6584dedc0f3dc666f14

Comments

Nick Desaulniers Aug. 16, 2021, 9:39 p.m. UTC | #1
On Mon, Aug 16, 2021 at 1:21 PM Nathan Chancellor <nathan@kernel.org> wrote:
>
> Turning on -Wformat does not reveal any instances of this warning across
> several different builds so remove this line to keep the number of
> disabled warnings as slim as possible.
>
> This has been disabled since commit 61163efae020 ("kbuild: LLVMLinux:
> Add Kbuild support for building kernel with Clang"), which does not
> explain exactly why it was turned off but since it was so long ago in
> terms of both the kernel and LLVM so it is possible that some bug got
> fixed along the way.
>
> Signed-off-by: Nathan Chancellor <nathan@kernel.org>

I ran a few builds with this patch applied and didn't spot any
instances of this warning. We can always bring it back if necessary.
Thanks for the patch.
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>

> ---
>  Makefile | 1 -
>  1 file changed, 1 deletion(-)
>
> diff --git a/Makefile b/Makefile
> index 891866af0787..3900f5824721 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -777,7 +777,6 @@ KBUILD_CFLAGS += $(stackp-flags-y)
>
>  ifdef CONFIG_CC_IS_CLANG
>  KBUILD_CPPFLAGS += -Qunused-arguments
> -KBUILD_CFLAGS += -Wno-format-invalid-specifier
>  KBUILD_CFLAGS += -Wno-gnu
>  # CLANG uses a _MergedGlobals as optimization, but this breaks modpost, as the
>  # source of a reference will be _MergedGlobals and not on of the whitelisted names.
>
> base-commit: f12b034afeb3a977bbb1c6584dedc0f3dc666f14
> --
> 2.33.0.rc2
>
Masahiro Yamada Aug. 19, 2021, 12:16 a.m. UTC | #2
On Tue, Aug 17, 2021 at 5:21 AM Nathan Chancellor <nathan@kernel.org> wrote:
>
> Turning on -Wformat does not reveal any instances of this warning across
> several different builds so remove this line to keep the number of
> disabled warnings as slim as possible.
>
> This has been disabled since commit 61163efae020 ("kbuild: LLVMLinux:
> Add Kbuild support for building kernel with Clang"), which does not
> explain exactly why it was turned off but since it was so long ago in
> terms of both the kernel and LLVM so it is possible that some bug got
> fixed along the way.
>
> Signed-off-by: Nathan Chancellor <nathan@kernel.org>
> ---


All applied to linux-kbuild. Thanks.
diff mbox series

Patch

diff --git a/Makefile b/Makefile
index 891866af0787..3900f5824721 100644
--- a/Makefile
+++ b/Makefile
@@ -777,7 +777,6 @@  KBUILD_CFLAGS += $(stackp-flags-y)
 
 ifdef CONFIG_CC_IS_CLANG
 KBUILD_CPPFLAGS += -Qunused-arguments
-KBUILD_CFLAGS += -Wno-format-invalid-specifier
 KBUILD_CFLAGS += -Wno-gnu
 # CLANG uses a _MergedGlobals as optimization, but this breaks modpost, as the
 # source of a reference will be _MergedGlobals and not on of the whitelisted names.