From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=185.125.25.11 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796217364; b=HxTXOB8n7b7MbwQMVRrwrN+N49ajzO9eHjDQncM7Q5h5B4gJMSgXGNK1I0x94fAkXJXl iAmqQj+N9WBtw6xzw02tc+INI4D/jRh/NhaXZBNH9h6S9L8xAQaHKkKQ5QyAlO/0ignlQ PNPB+hFbd81vNwhb5o7q0XcDVKN8MLiek5sQg+x8RVRDTbB8JMhFM78XQ1C0r7Oiptexc SI9O9qaSOxPzgv1+98U2Ur7sNXGVSxm6uXhbU4g/sWHBzsuKe2qqciWWkt3E2EzdyCAPt evLCu8gWKKeHQL1EqNDtgllULiQcBZN/1SZNAO1wu9wADoRZ4RxAJomL5iR5anLhcnw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796217364; 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=rAXlOdCEMnRz1YR/aD9zWCLzdAjgc1Z9QExIaUo5GWChwasvwLbdLJ0s/FVlHaTdcWRO DSyNu3aM9DU3I/w1M134PSqYpsLPjemscycxS90ZXNthUOdhSSoGkaaXwY5N8B6rvh4CJ hfHtCQ3FqCcBv50uCDQrxMSdOydpqCqe1CzYwTW7WT5mN93DcHYz1Ty/jeUqaJsRCG+VJ ygSNTnAY6bErye/+/APtJl6GMUGZjmmbjbbUpjpOBQJBN1J4FZ8iIW65HXO1MN3wD8Zny BdixAcBr8MweKYl3wO45XMTCLwJpaCJr2tkT0rUauETMnOPqK7yn5rQbtjxscISxBcw== 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=185.125.25.11 Received: from smtp-190b.mail.infomaniak.ch (smtp-190b.mail.infomaniak.ch [185.125.25.11]) (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 A4343606A31A for ; Wed, 2 Dec 2026 13:16:03 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org A4343606A31A 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, unprotected) 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-kernel@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