From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=84.16.66.168 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796162473; b=C7uemCWmG5/kpPpET7WY0BvYxg9lkx4Wnx1gSnkFcqX0FIxl/kLYyVpneRuCeMVgnqVK 46GG4Da1WD7FrtTTyJdU1Vdtz6jTsIXddLLo/tz7VXhyPwt98JW1urhIp8u5ILMYpSauz j7Fz0+o9oLqODylXvodNfwnA7Z07ZYgO/c65Vqj1JP52zgFUxjuY4B5l8Zh/cP/LX6J2a MZKQUSu2W2cLlzfU/arN9epjPJCX7cTxysozo4pouzl4z4JFN0Hk68Z+nu69Q59wv69Uf EFm0QhL7sYwUWvcVZLScrWegnyzH65eDH0EwV3RBFpW+EMibFruSq1Pam4Dk8ziQz0A== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796162473; 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=5WvJGMANc+3sdHMk4sSU2JMGgS9LpEWb4YLaTAG6J/g=; b=PD8NHKoFumf6ZwfUdetjbda8uSP7vty2JyhpGoR9oyLStZvPgJIs6u1gF9rergY7CDZM qhtfNH17QT8qNwEXyk6fj9PFUJyxESnR1G7bnUFnH0cY4B61RotSF5BbxQP6GeZg2ffYY +RI9AWDWO1zzkiwxmMKp04m1x58QQ8nrz9aRXLBwM7AZnvdxLrKQsqN/R+VERAL8imVNH iKiUyB0WIjEVCrQUukD6Y0b3W5pTTC1nxTJv52XiLDZCn9ker5PglukzW20xys7Je70aC B6d9yw2hI5v7FVgxJEmOeThGZWbtXh2R7neqYVlpA88tv11/cY1txA20gzuOsuo7c2A== 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=W4An08Sk; arc=none smtp.remote-ip=84.16.66.168 Received: from smtp-42a8.mail.infomaniak.ch (smtp-42a8.mail.infomaniak.ch [84.16.66.168]) (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 01151606A32C for ; Tue, 1 Dec 2026 22:01:11 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 01151606A32C 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=W4An08Sk Received: from smtp-4-0000.mail.infomaniak.ch (unknown [IPv6:2001:1600:7:10::a6b]) by smtp-3-3000 (Postfix) with ESMTPS id 4jfFFy3T8Fz4rm; Tue, 1 Dec 2026 23:01:10 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=daylightlinux.ch; s=20261016; t=1796162470; bh=5WvJGMANc+3sdHMk4sSU2JMGgS9LpEWb4YLaTAG6J/g=; h=From:To:Cc:Subject:Date:From; b=W4An08Skp262eomUx3mW2p90XjjTmsEBVDi/JxoH3QWKzxJFHFw4Aj6zb6kR3my7T KSvZ/KlolWPn6on44hQCikidRE97dlMDw31Zfwe/AyC4Dw33W5Kbhtllzn1nr8FjnC +q5miNXLY3RFDnsAFhHhzrk2VlbSTCnjplzGsfETdMXj79Dt33CS/ZJT6ujY/E+kR+ VHCSsiJk5gIgm8b7qcVNFxw4RInvG9C1f7uXqyl7O9qsvcc2rP0TDoUUMkR/ICowGj 4mIG5N5MkTnhi+OJHmHQDP+QL/F0uxDRfHkcS8vkyHNGf0/c67p8w2tdvHfG9zIFNY mdYR7Smt50fBw== Received: from unknown by smtp-4-0000.mail.infomaniak.ch (Postfix) with ESMTPA id 4jfFFx1zYqzvL8; Tue, 1 Dec 2026 23:01:09 +0100 (CET) Received: from unknown by raspberrypi.home with local (Exim 4.96) (envelope-from ) id 1xYVuO-004jzj-2o; Tue, 01 Dec 2026 23:01:08 +0100 From: Hamdy Abou El Anein To: nathan@kernel.org, nsc@kernel.org Cc: linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, ue081723@gmail.com, valentinrothberg@gmail.com, stefan.hengelein@fau.de Subject: [PATCH] scripts: checkkconfigsymbols: detect references in visible if statements Date: Tue, 1 Dec 2026 23:01:06 +0100 Message-ID: <20261201220106.12362-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. Fixes: 24fe1f03e4ef ("checkkconfigsymbols.sh: reimplementation in python") Signed-off-by: Hamdy Abou El Anein --- 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