Linux kbuild/kconfig development
 help / color / mirror / Atom feed
From: Nathan Chancellor <nathan@kernel.org>
To: Masahiro Yamada <masahiroy@kernel.org>
Cc: linux-kbuild@vger.kernel.org, Arnd Bergmann <arnd@arndb.de>,
	Heiko Carstens <hca@linux.ibm.com>,
	Sean Christopherson <seanjc@google.com>,
	Nicolas Schier <nicolas.schier@linux.dev>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] kbuild: move warnings about linux/export.h from W=1 to W=2
Date: Thu, 12 Jun 2025 11:15:51 -0700	[thread overview]
Message-ID: <20250612181551.GA815757@ax162> (raw)
In-Reply-To: <20250612160850.3007038-1-masahiroy@kernel.org>

On Fri, Jun 13, 2025 at 01:08:48AM +0900, Masahiro Yamada wrote:
> 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@kernel.org>

Reviewed-by: Nathan Chancellor <nathan@kernel.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
> 

  parent reply	other threads:[~2025-06-12 18:15 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-12 16:08 [PATCH] kbuild: move warnings about linux/export.h from W=1 to W=2 Masahiro Yamada
2025-06-12 16:16 ` Arnd Bergmann
2025-06-12 18:15 ` Nathan Chancellor [this message]
2025-06-13  7:34 ` Heiko Carstens

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250612181551.GA815757@ax162 \
    --to=nathan@kernel.org \
    --cc=arnd@arndb.de \
    --cc=hca@linux.ibm.com \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=masahiroy@kernel.org \
    --cc=nicolas.schier@linux.dev \
    --cc=seanjc@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox