aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/Makefile.extrawarn
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2022-09-10 16:39:51 +0100
committerMark Brown <broonie@kernel.org>2022-09-10 16:39:51 +0100
commit824723ccf53fc53ecf896753c562b00a5d6307eb (patch)
treec0ec150c4510eb161ba57a7fd39a1393f3b77cdd /scripts/Makefile.extrawarn
parentspi: Group cs_change and cs_off flags together in struct spi_transfer (diff)
parentLinux 6.0-rc4 (diff)
downloadlinux-dev-824723ccf53fc53ecf896753c562b00a5d6307eb.tar.xz
linux-dev-824723ccf53fc53ecf896753c562b00a5d6307eb.zip
spi: Merge tag 'v6.0-rc4' into spi-6.1
Linux 6.0-rc4 so we can test on BeagleBone again.
Diffstat (limited to 'scripts/Makefile.extrawarn')
-rw-r--r--scripts/Makefile.extrawarn12
1 files changed, 12 insertions, 0 deletions
diff --git a/scripts/Makefile.extrawarn b/scripts/Makefile.extrawarn
index 0621c39a3955..6ae482158bc4 100644
--- a/scripts/Makefile.extrawarn
+++ b/scripts/Makefile.extrawarn
@@ -47,7 +47,19 @@ else
ifdef CONFIG_CC_IS_CLANG
KBUILD_CFLAGS += -Wno-initializer-overrides
+# Clang before clang-16 would warn on default argument promotions.
+ifeq ($(shell [ $(CONFIG_CLANG_VERSION) -lt 160000 ] && echo y),y)
+# Disable -Wformat
KBUILD_CFLAGS += -Wno-format
+# Then re-enable flags that were part of the -Wformat group that aren't
+# problematic.
+KBUILD_CFLAGS += -Wformat-extra-args -Wformat-invalid-specifier
+KBUILD_CFLAGS += -Wformat-zero-length -Wnonnull
+# Requires clang-12+.
+ifeq ($(shell [ $(CONFIG_CLANG_VERSION) -ge 120000 ] && echo y),y)
+KBUILD_CFLAGS += -Wformat-insufficient-args
+endif
+endif
KBUILD_CFLAGS += -Wno-sign-compare
KBUILD_CFLAGS += $(call cc-disable-warning, pointer-to-enum-cast)
KBUILD_CFLAGS += -Wno-tautological-constant-out-of-range-compare