From nobody Tue Feb 10 04:23:36 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AD19D22DF96; Wed, 16 Apr 2025 07:51:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1744789899; cv=none; b=ZAE2Fh1EtTBxdtgf/kEIRitsu2RlL8RE4V4RtCW+9MgVsmgBc62vBaF+GAE4cR5lZsdERTzMoW2slQEQ05jawX+YRYjfF5gkLcZK6Czurjt2nr8Qag6cROTmd74sHmhR0o2YsvUw+ltS0p+Ix8kECUjI2XenHbi9EkX9r9/eqyU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1744789899; c=relaxed/simple; bh=IJzLGDXtTM+PrRhEz5In0Xb0/7YHoI2xCi4o5wcrZTw=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=TtgfDr2Q24+yzeFjgOfLZW4ckAqB4njYFtD655Vxh4ef+GDejj+3qZ11RDalbPHD2yHOUgMptr/Peqnn5H1Jpi2jYsclRp3q09/qifUXwaR1QV8vZSwgShE/Ghcx/57nrLyNCH2C6pwCcgdldzsUV1Lj0xxjBUJYhUaLGZv1ZP4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=cyLvQTm+; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="cyLvQTm+" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2CD74C4CEED; Wed, 16 Apr 2025 07:51:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1744789899; bh=IJzLGDXtTM+PrRhEz5In0Xb0/7YHoI2xCi4o5wcrZTw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=cyLvQTm+pzsnxbY35S6JaKKSaR2UPJgvZv/dKbFXV3igOqejN5Q8+3gtTtzLk6GMD x2Q5XamQNNlwugvHCUCo6erSaBtUBFu+x8rlo8izrRoVxdQoLrtZYB49gHqYiwo8LE j1TFyNPhhCaqac0bvh9JlHwtR2jLZ6bPR3z4EqEj8xVTgX92gC/qHWxPhb8017qb+X EcsWwa9MY6kB1aWJoWgh+EabpLbn6cfDirGaUg7OuR+SSx61wUqRNTxw5OkV52AiVo +g7vO+BXEemZQGacc2wEEVvhu7rNRfzWN7OuIZij6FPyVIHnSY+PB31N/j3hhECHvH aKEsibRbLN8dw== Received: from mchehab by mail.kernel.org with local (Exim 4.98.2) (envelope-from ) id 1u4xY7-00000002m3F-0mef; Wed, 16 Apr 2025 15:51:11 +0800 From: Mauro Carvalho Chehab To: Linux Doc Mailing List , Jonathan Corbet Cc: Mauro Carvalho Chehab , "Andy Shevchenko" , David Airlie , Jani Nikula , Joonas Lahtinen , Maarten Lankhorst , Masahiro Yamada , Maxime Ripard , Nathan Chancellor , Nicolas Schier , Rodrigo Vivi , Simona Vetter , Thomas Zimmermann , Tvrtko Ursulin , dri-devel@lists.freedesktop.org, intel-gfx@lists.freedesktop.org, linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 1/2] scripts/kernel-doc.py: don't create *.pyc files Date: Wed, 16 Apr 2025 15:51:04 +0800 Message-ID: <4ad5eb8d4b819997c1615d2401581c22a32bb2c1.1744789777.git.mchehab+huawei@kernel.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: Mauro Carvalho Chehab Content-Type: text/plain; charset="utf-8" As reported by Andy, kernel-doc.py is creating a __pycache__ directory at build time. Disable creation of __pycache__ for the libraries used by kernel-doc.py, when excecuted via the build system or via scripts/find-unused-docs.sh. Reported-by: Andy Shevchenko Closes: https://lore.kernel.org/linux-doc/Z_zYXAJcTD-c3xTe@black.fi.intel.c= om/ Signed-off-by: Mauro Carvalho Chehab --- drivers/gpu/drm/Makefile | 2 +- drivers/gpu/drm/i915/Makefile | 2 +- include/drm/Makefile | 2 +- scripts/Makefile.build | 2 +- scripts/find-unused-docs.sh | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/Makefile b/drivers/gpu/drm/Makefile index ed54a546bbe2..d21d0cd2c752 100644 --- a/drivers/gpu/drm/Makefile +++ b/drivers/gpu/drm/Makefile @@ -236,7 +236,7 @@ always-$(CONFIG_DRM_HEADER_TEST) +=3D \ quiet_cmd_hdrtest =3D HDRTEST $(patsubst %.hdrtest,%.h,$@) cmd_hdrtest =3D \ $(CC) $(c_flags) -fsyntax-only -x c /dev/null -include $< -include $<; \ - $(srctree)/scripts/kernel-doc -none $(if $(CONFIG_WERROR)$(CONFIG_DRM_WE= RROR),-Werror) $<; \ + PYTHONDONTWRITEBYTECODE=3D1 $(KERNELDOC) -none $(if $(CONFIG_WERROR)$(C= ONFIG_DRM_WERROR),-Werror) $<; \ touch $@ =20 $(obj)/%.hdrtest: $(src)/%.h FORCE diff --git a/drivers/gpu/drm/i915/Makefile b/drivers/gpu/drm/i915/Makefile index ed05b131ed3a..ab6b89a163e7 100644 --- a/drivers/gpu/drm/i915/Makefile +++ b/drivers/gpu/drm/i915/Makefile @@ -408,7 +408,7 @@ obj-$(CONFIG_DRM_I915_GVT_KVMGT) +=3D kvmgt.o # # Enable locally for CONFIG_DRM_I915_WERROR=3Dy. See also scripts/Makefile= .build ifdef CONFIG_DRM_I915_WERROR - cmd_checkdoc =3D $(srctree)/scripts/kernel-doc -none -Werror $< + cmd_checkdoc =3D PYTHONDONTWRITEBYTECODE=3D1 $(KERNELDOC) -none -Werro= r $< endif =20 # header test diff --git a/include/drm/Makefile b/include/drm/Makefile index a7bd15d2803e..1df6962556ef 100644 --- a/include/drm/Makefile +++ b/include/drm/Makefile @@ -11,7 +11,7 @@ always-$(CONFIG_DRM_HEADER_TEST) +=3D \ quiet_cmd_hdrtest =3D HDRTEST $(patsubst %.hdrtest,%.h,$@) cmd_hdrtest =3D \ $(CC) $(c_flags) -fsyntax-only -x c /dev/null -include $< -include $<; \ - $(srctree)/scripts/kernel-doc -none $(if $(CONFIG_WERROR)$(CONFIG_DRM_WE= RROR),-Werror) $<; \ + PYTHONDONTWRITEBYTECODE=3D1 $(KERNELDOC) -none $(if $(CONFIG_WERROR)$(CO= NFIG_DRM_WERROR),-Werror) $<; \ touch $@ =20 $(obj)/%.hdrtest: $(src)/%.h FORCE diff --git a/scripts/Makefile.build b/scripts/Makefile.build index 13dcd86e74ca..884dc86ce04e 100644 --- a/scripts/Makefile.build +++ b/scripts/Makefile.build @@ -83,7 +83,7 @@ else ifeq ($(KBUILD_CHECKSRC),2) endif =20 ifneq ($(KBUILD_EXTRA_WARN),) - cmd_checkdoc =3D $(srctree)/scripts/kernel-doc -none $(KDOCFLAGS) \ + cmd_checkdoc =3D PYTHONDONTWRITEBYTECODE=3D1 $(KERNELDOC) -none $(KDOCFL= AGS) \ $(if $(findstring 2, $(KBUILD_EXTRA_WARN)), -Wall) \ $< endif diff --git a/scripts/find-unused-docs.sh b/scripts/find-unused-docs.sh index ee6a50e33aba..d6d397fbf917 100755 --- a/scripts/find-unused-docs.sh +++ b/scripts/find-unused-docs.sh @@ -54,7 +54,7 @@ for file in `find $1 -name '*.c'`; do if [[ ${FILES_INCLUDED[$file]+_} ]]; then continue; fi - str=3D$(scripts/kernel-doc -export "$file" 2>/dev/null) + str=3D$(PYTHONDONTWRITEBYTECODE=3D1 scripts/kernel-doc -export "$file" 2>= /dev/null) if [[ -n "$str" ]]; then echo "$file" fi --=20 2.49.0 From nobody Tue Feb 10 04:23:36 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BA266227E8A; Wed, 16 Apr 2025 07:51:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1744789893; cv=none; b=ROTp/QDk2vzMlE7wA3paoiHjA2GsycG8I3Cve7Q2E5u/4SH9yQhpYgk5SJlfQ5nc5xFDMABLADKjp51Rrqj5sgRX+RTxpNoOUsDV7/AHdmqIn2Ly77pBBu7pWTPCdjbGYcWvs5YzrqyPge5APYIx9UNvngA2evvn1EBvpvz/0pw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1744789893; c=relaxed/simple; bh=TLP2FSFMoyG9Y7Er0eXeMEKJSa/MXE0h9kNS8YrZeK8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=dMyz9k8rosxT1eaWSuTr4H9azatkTpa0bIXF3XbevZyJgxNg9Oo51N5dNWBjag+JZrrPrRx3TOx0PwuwtiVnhtTqsqx3tjC4iLgEDgR+eQjK3rjviZEF3j3nBlPrw3owTTEhPooBpUl+ijjrQVSjDNKRoyNAMBhpjbuHEk77aP8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=BQTDzeGN; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="BQTDzeGN" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 223D8C4CEE9; Wed, 16 Apr 2025 07:51:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1744789893; bh=TLP2FSFMoyG9Y7Er0eXeMEKJSa/MXE0h9kNS8YrZeK8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=BQTDzeGNB0iXQPSfl4wqv+aZTwuaXyWW6D7atCdzEEgcbMUbdcGMDfGC9pZtZoIGk iktdsuF4ao6fH60H/4flvtX/aASJIhHLKgQmpLEyQGvc9we9xNG+EtDUNc/e2TL56L NMHPEqNTG3uc0YUJNQkmrw32IwZ/sRMP+Qjy4exn0/5IL8zQqXglO1XkJG3iFJtvMe ut5KhlekAQ3dvuW095oq1YCfMx1xLRVdwHQ3QInQ99o/bElvfdowUsoC+onbAJS/2/ jkaeoWFdcLi6bLboV3OdwUENcV4kughZ4J4CAfarumo2o4NcqcHUa9Ha3t0krxYMiR Xmi1y4rF1hpYw== Received: from mchehab by mail.kernel.org with local (Exim 4.98.2) (envelope-from ) id 1u4xY7-00000002m3I-0s2X; Wed, 16 Apr 2025 15:51:11 +0800 From: Mauro Carvalho Chehab To: Linux Doc Mailing List , Jonathan Corbet Cc: Mauro Carvalho Chehab , "Andy Shevchenko" , =?UTF-8?q?Thomas=20Wei=C3=9Fschuh?= , Ard Biesheuvel , Kris Van Hees , Laurent Pinchart , Li Zhijian , Masahiro Yamada , Miguel Ojeda , Nathan Chancellor , Tamir Duberstein , Vegard Nossum , linux-kernel@vger.kernel.org Subject: [PATCH v3 2/2] .gitignore: ignore Python compiled bytecode Date: Wed, 16 Apr 2025 15:51:05 +0800 Message-ID: <6f597205d5b2ec0e4d07c47f4b66c9df5da8203d.1744789777.git.mchehab+huawei@kernel.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: Mauro Carvalho Chehab Content-Type: text/plain; charset="utf-8" While the building system doesn't create any Python JIT bytecode, if one manually runs kernel-doc.py or get_abi.py, Python will, by default, create a bytecode and store it under scripts/lib/*. This is normal, and not controlled by the Kernel itself. So, add *.pyc as an extension to be ignored. Signed-off-by: Mauro Carvalho Chehab --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index f2f63e47fb88..2e01bc0b2d2a 100644 --- a/.gitignore +++ b/.gitignore @@ -39,6 +39,7 @@ *.mod.c *.o *.o.* +*.pyc *.patch *.rmeta *.rpm --=20 2.49.0