From nobody Fri Dec 19 20:39:27 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 A021A22E3E1; Wed, 16 Apr 2025 06:58:10 +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=1744786690; cv=none; b=BTaHIESXCProQrGDmF6AjKHkbg7IysIvxE0oNikhh6ADuZm1A+Wu2V6evmIf+nVDTC/w8UVdt6fB1vdkvc64ofvJfYcSsuC4lTMT7n61DM2wcPDuGkFdtfBHg0/G7xCadkN3hz7b7LtGlJ+JvYrBJr+H7qYIZzy6OaPBTXtvWLE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1744786690; c=relaxed/simple; bh=3fxTh2/IW45q1FIh85eFha6W/n2T/3ziJzmCR16YX+c=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=pUGZDt+b20CdBwtGmxbQpUtd7HJZ//v4Gs5YqABLedEASYBbK2t2NKL7q+3G2tgKeBZrT1hGikmUEoJkUzUPHe/b4G/Kxh7ZQyQNI1+J5LXiHbDnHSZi1Zkl7bXV191WQYD15lk6mkLlLfK8TLjamNPvL4A56Wi97jVapwqHui0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=KR5iz3Ok; 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="KR5iz3Ok" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 09C7BC4CEE2; Wed, 16 Apr 2025 06:58:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1744786690; bh=3fxTh2/IW45q1FIh85eFha6W/n2T/3ziJzmCR16YX+c=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=KR5iz3OkRj/HF/0CV0eegpRC/1qTNO+x7CEi1U5oBIwZEhvtcxRbpBGeEVUxzdyX7 avbsVLc+WxYrzalTV+s06o52ZenJ0NW77eajiIik0Nxr5WRS14lcJPmvtadkjagmug Ndw3U0Sa9hKx3D9/GAwwPIPUVXztZfJYjbxSxbTN+4sKQlgw5yrAF4kl6HDVqi85aW f9T0Y45LZeSGntLpVcHiz3ELTd6RXCClrs9lpBPUi5tPwTgq694MNsp2CexlsVRpHB dIhed6nCR/wu6Wk2ryEcSpjKJ0RDOsTOZtTFEYYlMaQ/86clcoxvLNF5l5HTtsdD6C Lxm8MypBz5Aow== Received: from mchehab by mail.kernel.org with local (Exim 4.98.2) (envelope-from ) id 1u4wiN-00000002kO6-41Ns; Wed, 16 Apr 2025 14:57:43 +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 , Maxime Ripard , Rodrigo Vivi , Simona Vetter , Thomas Zimmermann , Tvrtko Ursulin , dri-devel@lists.freedesktop.org, intel-gfx@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 1/2] scripts/kernel-doc.py: don't create *.pyc files Date: Wed, 16 Apr 2025 14:57:38 +0800 Message-ID: <432f17b785d35122753d4b210874d78ee84e1bb5.1744786420.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/find-unused-docs.sh | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/Makefile b/drivers/gpu/drm/Makefile index ed54a546bbe2..1469d64f8783 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) $<; \ + $(KERNELDOC) PYTHONDONTWRITEBYTECODE=3D1 -none $(if $(CONFIG_WERROR)$(CO= NFIG_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..bb873f9cc2aa 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 $(KERNELDOC) PYTHONDONTWRITEBYTECODE=3D1 -none -Werro= r $< endif =20 # header test diff --git a/include/drm/Makefile b/include/drm/Makefile index a7bd15d2803e..6088ea458f44 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) $<; \ + $(KERNELDOC) PYTHONDONTWRITEBYTECODE=3D1 -none $(if $(CONFIG_WERROR)$(CO= NFIG_DRM_WERROR),-Werror) $<; \ touch $@ =20 $(obj)/%.hdrtest: $(src)/%.h FORCE 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