From nobody Sun Dec 14 19:32:41 2025 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 3C93525522B; Fri, 18 Apr 2025 23:50:38 +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=1745020239; cv=none; b=nDqr1doG9CTfXzkpmI49FUput41YNz9YxrI3nN6T62TcRKVVIRIzAq35VqJLzJYW9Dh9IkgeT/T0cpe7nLIp+Q9e43lGDMh2fBHbSZmc4mN1JngyMNjFuAfmYyr2dIt+8J236T2dW2NV9ZBlDfSguaFaJScm3oTnvbpdnN7EVPQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1745020239; c=relaxed/simple; bh=IJzLGDXtTM+PrRhEz5In0Xb0/7YHoI2xCi4o5wcrZTw=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=uwiZb/DseMuGnR0VEw26bvcoDBXcxOr1GJGYugtVcf8A2hKn9HW+pyGN+tU7PEC7hRcAOFTgUFSVh838JFcVwWr/y8yMusu5cZ/RVpL7fhMZoxVg8HqsSTYt3/fUgskLTAV5nmTGLPk83HS0LG2PNHr/9YLCrmvvXnSJ9dk2gGI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=QyRQV5WC; 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="QyRQV5WC" Received: by smtp.kernel.org (Postfix) with ESMTPSA id A4259C4CEEB; Fri, 18 Apr 2025 23:50:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1745020238; bh=IJzLGDXtTM+PrRhEz5In0Xb0/7YHoI2xCi4o5wcrZTw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=QyRQV5WCNZ1XQBQWJi70yL4cpSNaEA5wGy4SKzFvMG1Dx9N1DEE7Vce3NLb3z9Hkz FimiCnRZxje2nNYI/vV1OXuSGwR4O+ps46Gy6xB1Eubw+k955Yo27397+ChsYCqlc0 GrLq2Jc8rOiLxy9FHwICAlxXDN0NS/VC7CpwmyEznMdZoUBjuFnFLOFlsHQr6fiIwL CM63uXPPFoJoRRRpJdXqUHjfpGZNbWX/LK3C0HFVCJl2fIspMbIXdukE0makvNJVyl LsYpSk1AbhlP2JWVY9q+KONlxESS5dRkwV/wl+RJCYwuwbhWp0htd0NjsiPksIkrIJ kkW1iv12aeETA== Received: from mchehab by mail.kernel.org with local (Exim 4.98.2) (envelope-from ) id 1u5vTL-00000003KFE-3NxD; Sat, 19 Apr 2025 07:50:15 +0800 From: Mauro Carvalho Chehab To: Linux Doc Mailing List Cc: Mauro Carvalho Chehab , "Jonathan Corbet" , 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, Andy Shevchenko Subject: [PATCH v3 3/4] scripts/kernel-doc.py: don't create *.pyc files Date: Sat, 19 Apr 2025 07:50:04 +0800 Message-ID: <28fcf7e44294fc4b5320d3c289f09cb5211ff8f3.1745019660.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