[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250612160850.3007038-1-masahiroy@kernel.org>
Date: Fri, 13 Jun 2025 01:08:48 +0900
From: Masahiro Yamada <masahiroy@...nel.org>
To: linux-kbuild@...r.kernel.org
Cc: Arnd Bergmann <arnd@...db.de>,
Heiko Carstens <hca@...ux.ibm.com>,
Sean Christopherson <seanjc@...gle.com>,
Masahiro Yamada <masahiroy@...nel.org>,
Nathan Chancellor <nathan@...nel.org>,
Nicolas Schier <nicolas.schier@...ux.dev>,
linux-kernel@...r.kernel.org
Subject: [PATCH] kbuild: move warnings about linux/export.h from W=1 to W=2
This hides excessive warnings, as nobody builds with W=2.
Fixes: a934a57a42f6 ("scripts/misc-check: check missing #include <linux/export.h> when W=1")
Fixes: 7d95680d64ac ("scripts/misc-check: check unnecessary #include <linux/export.h> when W=1")
Signed-off-by: Masahiro Yamada <masahiroy@...nel.org>
---
Makefile | 3 ---
scripts/misc-check | 15 ++++++++++++---
2 files changed, 12 insertions(+), 6 deletions(-)
diff --git a/Makefile b/Makefile
index 35e6e5240c61..69c534982415 100644
--- a/Makefile
+++ b/Makefile
@@ -1832,12 +1832,9 @@ rustfmtcheck: rustfmt
# Misc
# ---------------------------------------------------------------------------
-# Run misc checks when ${KBUILD_EXTRA_WARN} contains 1
PHONY += misc-check
-ifneq ($(findstring 1,$(KBUILD_EXTRA_WARN)),)
misc-check:
$(Q)$(srctree)/scripts/misc-check
-endif
all: misc-check
diff --git a/scripts/misc-check b/scripts/misc-check
index a74450e799d1..84f08da17b2c 100755
--- a/scripts/misc-check
+++ b/scripts/misc-check
@@ -62,6 +62,15 @@ check_unnecessary_include_linux_export_h () {
xargs -r printf "%s: warning: EXPORT_SYMBOL() is not used, but #include <linux/export.h> is present\n" >&2
}
-check_tracked_ignored_files
-check_missing_include_linux_export_h
-check_unnecessary_include_linux_export_h
+case "${KBUILD_EXTRA_WARN}" in
+*1*)
+ check_tracked_ignored_files
+ ;;
+esac
+
+case "${KBUILD_EXTRA_WARN}" in
+*2*)
+ check_missing_include_linux_export_h
+ check_unnecessary_include_linux_export_h
+ ;;
+esac
--
2.43.0
Powered by blists - more mailing lists