Skip to content

Commit a6a7946

Browse files
committed
kbuild: move warnings about linux/export.h from W=1 to W=2
This hides excessive warnings, as nobody builds with W=2. Fixes: a934a57 ("scripts/misc-check: check missing #include <linux/export.h> when W=1") Fixes: 7d95680 ("scripts/misc-check: check unnecessary #include <linux/export.h> when W=1") Signed-off-by: Masahiro Yamada <[email protected]> Acked-by: Arnd Bergmann <[email protected]> Reviewed-by: Nathan Chancellor <[email protected]> Acked-by: Heiko Carstens <[email protected]>
1 parent 19272b3 commit a6a7946

File tree

2 files changed

+12
-6
lines changed

2 files changed

+12
-6
lines changed

Makefile

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1832,12 +1832,9 @@ rustfmtcheck: rustfmt
18321832
# Misc
18331833
# ---------------------------------------------------------------------------
18341834

1835-
# Run misc checks when ${KBUILD_EXTRA_WARN} contains 1
18361835
PHONY += misc-check
1837-
ifneq ($(findstring 1,$(KBUILD_EXTRA_WARN)),)
18381836
misc-check:
18391837
$(Q)$(srctree)/scripts/misc-check
1840-
endif
18411838

18421839
all: misc-check
18431840

scripts/misc-check

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,15 @@ check_unnecessary_include_linux_export_h () {
6262
xargs -r printf "%s: warning: EXPORT_SYMBOL() is not used, but #include <linux/export.h> is present\n" >&2
6363
}
6464

65-
check_tracked_ignored_files
66-
check_missing_include_linux_export_h
67-
check_unnecessary_include_linux_export_h
65+
case "${KBUILD_EXTRA_WARN}" in
66+
*1*)
67+
check_tracked_ignored_files
68+
;;
69+
esac
70+
71+
case "${KBUILD_EXTRA_WARN}" in
72+
*2*)
73+
check_missing_include_linux_export_h
74+
check_unnecessary_include_linux_export_h
75+
;;
76+
esac

0 commit comments

Comments
 (0)