Linux kbuild/kconfig development
 help / color / mirror / Atom feed
From: Nicolas Schier <nsc@kernel.org>
To: Nathan Chancellor <nathan@kernel.org>, Jonathan Corbet <corbet@lwn.net>
Cc: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>,
	Rong Zhang <i@rong.moe>,
	linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] kbuild: Run kernel-doc only for in-tree builds
Date: Sat, 31 Jan 2026 16:11:30 +0100	[thread overview]
Message-ID: <aX4bonSINSuju-OO@levanger> (raw)
In-Reply-To: <20260131-run-kernel-doc-only-in-tree-v1-1-93a9c695dfb1@kernel.org>

On Sat, Jan 31, 2026 at 04:02:32PM +0100, Nicolas Schier wrote:
> Stop running kernel-doc when building out-of-tree kernel modules.
> 
> Rong Zhang reported that building external modules with W set fails
> since v6.19-rc1 as the kernel-doc Python modules are no more available
> when building against a kernel module build tree exported by
> scripts/package/install-extmod-build.
> 
> As there is no good reason for checking documentation when building
> out-of-tree kernel modules, stop it.
> 
> Fixes: 778b8ebe5192 ("docs: Move the python libraries to tools/lib/python")
> Reported-by: Rong Zhang <i@rong.moe>
> Closes: https://lore.kernel.org/linux-kbuild/20260129175321.415295-1-i@rong.moe
> Suggested-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
> Reviewed-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
> Tested-by: Nicolas Schier <nsc@kernel.org>
> Signed-off-by: Nicolas Schier <nsc@kernel.org>
> ---
> I left out a 'Cc: stable@kernel.org' as the problem exists just since
> v6.19-rc1; please intervene ASAP if you think it should be added.
> ---
> 
> ---
> Thanks for the report (Rong) and the patch suggestion (Mauro)!
> I left out a 'Cc: stable@kernel.org' as the problem exists just since
> 6.19-rc1; please intervene ASAP if you think it should be added.
> ---
>  scripts/Makefile.build | 10 ++++++----
>  1 file changed, 6 insertions(+), 4 deletions(-)
> 
> diff --git a/scripts/Makefile.build b/scripts/Makefile.build
> index 5037f4715d7491761b75d086441367c6c08c099e..05674bae3c637b4476a11b5e6af630d8daa3b613 100644
> --- a/scripts/Makefile.build
> +++ b/scripts/Makefile.build
> @@ -166,10 +166,12 @@ else ifeq ($(KBUILD_CHECKSRC),2)
>          cmd_force_checksrc = $(CHECK) $(CHECKFLAGS) $(c_flags) $<
>  endif
>  
> -ifneq ($(KBUILD_EXTRA_WARN),)
> -  cmd_checkdoc = PYTHONDONTWRITEBYTECODE=1 $(PYTHON3) $(KERNELDOC) -none $(KDOCFLAGS) \
> -        $(if $(findstring 2, $(KBUILD_EXTRA_WARN)), -Wall) \
> -        $<
> +ifeq ($(KBUILD_EXTMOD),)
> +    ifneq ($(KBUILD_EXTRA_WARN),)
> +      cmd_checkdoc = PYTHONDONTWRITEBYTECODE=1 $(PYTHON3) $(KERNELDOC) -none $(KDOCFLAGS) \
> +            $(if $(findstring 2, $(KBUILD_EXTRA_WARN)), -Wall) \
> +            $<
> +    endif
>  endif
>  
>  # Compile C sources (.c)
> 
> ---
> base-commit: 6d60354ea2f90352b22039ed8371c4f4321df90e
> change-id: 20260131-run-kernel-doc-only-in-tree-18be87e88208
> 
> Best regards,
> -- 
> Nicolas
> 

Oh, sorry. I overlooked Nathan's patch.  Sorry for the noise.

      reply	other threads:[~2026-01-31 15:11 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-31 15:02 [PATCH] kbuild: Run kernel-doc only for in-tree builds Nicolas Schier
2026-01-31 15:11 ` Nicolas Schier [this message]

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=aX4bonSINSuju-OO@levanger \
    --to=nsc@kernel.org \
    --cc=corbet@lwn.net \
    --cc=i@rong.moe \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mchehab+huawei@kernel.org \
    --cc=nathan@kernel.org \
    /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