From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=84.16.66.169 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796217369; b=0jaGDJQhcUnjKWvSbTkwwPSQWr25AxiINUkRIPkc4VYvRCNxfEnN6WvN189R9v3REuEk gIooWdNStN/i/SY7Zqra0fVFVKttOzydeQgJzUd17lpwbQ6DQhBY+j8gD4YErqFhxZ3+Z eZGxoqBjN+e+Z8LzezUZWqp8nmofzBHasRlwXtfPIyj1peX98OVN+LxbKkXF5W91yfzqf IexZxU0iWiqygd/jJvEL1W3VMW5voaD5a+RDfWMBgsGpEEUrT8Kr2I1Gfw0e+wxbXIv/h yfY2PNlXR2Thww9QV7J8vnxxp5sRTWsdUrTSgJF0BtMeGDQe6EDWPTm2TYM3v7QFolQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796217369; h=DMARC-Filter:Received:DKIM-Signature:Received:Received:From:To:Cc: Subject:Date:Message-ID:X-Mailer:MIME-Version: Content-Transfer-Encoding:X-Infomaniak-Routing; bh=1BghEiwA10PD90F0giSVeJSU0fBDX70YaYdUc7Ffbkg=; b=PUSQZh0UFwse3x/jP3X9DiuySnXc5pTtkkNisEy4AzVlgrEShOrEHrjoh5XxJO+7/EYW aEzb1L838oCHG0Qj89oR5OUSeng94idaF3jNmR5VdkqsrZ4vu9d1AO4MyrBGs1D3paloy UatGNEOA2svnqWMYFzgcM1C+5ST+avYR099mVIHm7jLssUaiYA0NRpTcY8VS+msEjDxTs 7sIqbSlU+291HdgaCCNuZNDc7cd7I6UqAwEtiELcuBQPp3BdK/GgaK8gej58TeSq2bzMQ JDlFBfcmSHzzQ+5NyB/DT5fZOfQBW9x9v9LdBR2BlloJHwHidZXPVDurQQKaUWTn+4g== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=daylightlinux.ch; spf=pass smtp.mailfrom=daylightlinux.ch; dkim=pass header.d=daylightlinux.ch header.i=@daylightlinux.ch header.a=rsa-sha256 header.s=20261016 header.b=UIMSRQNA; arc=none smtp.remote-ip=84.16.66.169 Received: from smtp-42a9.mail.infomaniak.ch (smtp-42a9.mail.infomaniak.ch [84.16.66.169]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9C6D6606A31A for ; Wed, 2 Dec 2026 13:16:08 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 9C6D6606A31A Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=daylightlinux.ch Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=daylightlinux.ch Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=daylightlinux.ch header.i=@daylightlinux.ch header.a=rsa-sha256 header.s=20261016 header.b=UIMSRQNA Received: from smtp-3-0000.mail.infomaniak.ch (smtp-3-0000.mail.infomaniak.ch [10.4.36.107]) by smtp-4-3000.mail.infomaniak.ch (Postfix) with ESMTPS id 4jfdYY2mzYzmYM; Wed, 2 Dec 2026 14:16:01 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=daylightlinux.ch; s=20261016; t=1796217361; bh=1BghEiwA10PD90F0giSVeJSU0fBDX70YaYdUc7Ffbkg=; h=From:To:Cc:Subject:Date:From; b=UIMSRQNAHkVihBXQ5QxbPo1FySFDbvWyQAZMrAeNEAvSaSqgGDLts6XCxpyTtx0A3 Of3KBm0cB+APkCW5XqTdWZx7OSxcQyUxjYbWH/KkwbtU3Bj6atJqiVSh849vI6wTPt +oIxfaTo/OrEp4d9niEIkVZPcwtc8EXuYW+4k4OHodTd9K/UPJZA70MjGTLANxE/Gs O3Y0eLRwS/7dOQUxTwZqAgmnlmP25cMATn8Pq3/Vbm7ydaAT8v0Lfitv++VliAyGBx HvnSASDVvAnwvE03mg8Qx7spaLpFeE09mdmJ0rGFQHknZuJodUnBHXyWBRnlFT16UO +EJaJkpjw3ocA== Received: from unknown by smtp-3-0000.mail.infomaniak.ch (Postfix) with ESMTPA id 4jfdYX2KRJz155d; Wed, 2 Dec 2026 14:16:00 +0100 (CET) Received: from unknown by raspberrypi.home with local (Exim 4.96) (envelope-from ) id 1xYkBj-001Z1t-2w; Wed, 02 Dec 2026 14:15:59 +0100 From: Hamdy Abou El Anein To: nathan@kernel.org, nsc@kernel.org Cc: julianbraha@gmail.com, linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, ue081723@gmail.com, valentinrothberg@gmail.com, stefan.hengelein@fau.de Subject: [PATCH v2] scripts: checkkconfigsymbols: detect references in visible if statements Date: Wed, 2 Dec 2026 14:15:58 +0100 Message-ID: <20261202131558.6820-1-info@daylightlinux.ch> X-Mailer: git-send-email 2.56.1 X-Mailing-List: linux-kbuild@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Infomaniak-Routing: alpha checkkconfigsymbols.py does not recognize menu visibility conditions, so undefined Kconfig symbols referenced only in a "visible if" statement are silently missed. The syntax is documented in the Kconfig language reference and used in the i915, I2C and media Kconfig files, among others. Include visible if in the statement matcher so its condition is processed by the existing symbol extraction code. Tested with single and compound conditions, whitespace variations, ordinary depends on and select statements, and comments. Running the script on a temporary Git repository also confirmed that an undefined visibility symbol is reported while a defined symbol is not. Checked actual visibility expressions from i915, I2C and media Kconfig files. AI assistance: ChatGPT identified the issue, prepared the fix and commit message, and ran local regression tests. Signed-off-by: Hamdy Abou El Anein --- Changes in v2: - Remove the Fixes tag as suggested by Julian Braha. - No code changes. v1: https://lore.kernel.org/linux-kbuild/20261201220106.12362-1-info@daylightlinux.ch/ scripts/checkkconfigsymbols.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/checkkconfigsymbols.py b/scripts/checkkconfigsymbols.py index 9f7aed98d91c..183c4f835bd9 100755 --- a/scripts/checkkconfigsymbols.py +++ b/scripts/checkkconfigsymbols.py @@ -24,7 +24,8 @@ SYMBOL = r"(?:\w*[A-Z0-9]\w*){2,}" DEF = r"^\s*(?:menu){,1}config\s+(" + SYMBOL + r")\s*" EXPR = r"(?:" + OPERATORS + r"|\s|" + SYMBOL + r")+" DEFAULT = r"default\s+.*?(?:if\s.+){,1}" -STMT = r"^\s*(?:if|select|imply|depends\s+on|(?:" + DEFAULT + r"))\s+" + EXPR +STMT = (r"^\s*(?:if|select|imply|depends\s+on|visible\s+if|(?:" + + DEFAULT + r"))\s+" + EXPR) SOURCE_SYMBOL = r"(?:\W|\b)+[D]{,1}CONFIG_(" + SYMBOL + r")" # regex objects -- 2.56.1