From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=84.16.66.171 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796162478; b=uTOAfpBF96WTyHt7fNs8hTcwhm8QdSPyvu5qL1GnWRWhZA0ZwHprNN81LnhrEblbn9FY 1Do1nOPoZt+k53sFBfehCRqEGXss8H06tY0eXq5ffYs09FAtdbKAVtmIYQ6RlGp1uzIKy pLj/YRIi5QeD5wHC73oGrLoEShNjXJXAsMUrkwqk1cwDPUZgZoDOIUgY22NdEGjNOmFxc C7GdjXWYv1MZsVl8EbwA8gMcvOZtbcCHV9MVj1am4UoMZ+1OybvWNONuMUDVVSltTMg4J 46Usv6YwssoOPr4hnFHrRBZDXjKGHUshAW9xmQN80C2ZJJN/ou06hUK59hHJ+Rr//Wg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796162478; 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=0f45VskGxesSxBqKbt3SGi0D/tqiAan49Wlf2garR/GRPnc2f5SeWO1HrN2GHfSWbphs omhdqUh7z0NeI7t0incyB4K9KMy4JwLy4Xxukvo6rcpef7YwcIRv3EEqlfvWQrr9ce5Km gw3XUcIS9uT8WAEjhnNiOrtIYoreg443vcfkxmSuU0z9zkSEdZVIysBBlJ0mA0M4FP47Z x+NwdZJ7ARq4S0T9TsUVNAgh7VIEBBizGL4UFDcEmoBoo58s2BJfTDz9Dx8IhVT+SLbSn bcSRyFllNULqgDZmmXfMsuxdLIFE/tOxJ+w4G04UvbCfUAFjbZvo5Ug4fhs0XBaNVfg== 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.171 Received: from smtp-42ab.mail.infomaniak.ch (smtp-42ab.mail.infomaniak.ch [84.16.66.171]) (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 BFF18606A31A for ; Tue, 1 Dec 2026 22:01:17 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org BFF18606A31A 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 (smtp-4-0000.mail.infomaniak.ch [10.7.10.107]) by smtp-4-3000 (Postfix) with ESMTPS id 4jfFFy3S5mz170w; 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-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. 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