Devicetree
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
To: Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Saravana Kannan <saravanak@kernel.org>
Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Subject: [PATCH 3/6] dtc: dt-check-style: Process property names with a question mark
Date: Sat, 29 Aug 2026 21:53:19 +0200	[thread overview]
Message-ID: <20260829-dts-style-checker-sort-v1-3-6693a37d7ae1@oss.qualcomm.com> (raw)
In-Reply-To: <20260829-dts-style-checker-sort-v1-0-6693a37d7ae1@oss.qualcomm.com>

Devicetree spec allows question mark '?' in property names and such code
is also accepted by DTC, thus catch such properties as a valid code,
even if discouraged.  Otherwise certain rules checking for property
names would ignore that line.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
---
 scripts/dtc/dt-check-style | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/dtc/dt-check-style b/scripts/dtc/dt-check-style
index 5385a03f377e..7c3ee1432dc6 100755
--- a/scripts/dtc/dt-check-style
+++ b/scripts/dtc/dt-check-style
@@ -280,7 +280,7 @@ def parse_node_header(dl):
 
 
 def parse_property_name(dl):
-    m = re.match(r'^([a-zA-Z0-9#][a-zA-Z0-9,._+#-]*)\s*[=;]', dl.stripped)
+    m = re.match(r'^([a-zA-Z0-9#][a-zA-Z0-9,._+?#-]*)\s*[=;]', dl.stripped)
     if m:
         dl.prop_name = m.group(1)
 

-- 
2.53.0


  parent reply	other threads:[~2026-08-29 19:53 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-29 19:53 [PATCH 0/6] dtc: dt-check-style: Cleanup plus new checks Krzysztof Kozlowski
2026-08-29 19:53 ` [PATCH 1/6] dtc: dt-check-style: Sort rule directory by name Krzysztof Kozlowski
2026-08-29 19:53 ` [PATCH 2/6] dtc: dt-check-style: Sort rule functions " Krzysztof Kozlowski
2026-08-29 19:53 ` Krzysztof Kozlowski [this message]
2026-08-29 19:53 ` [PATCH 4/6] dtc: dt-check-style: Add test for node and property name styles Krzysztof Kozlowski
2026-08-30 19:59   ` Rob Herring
2026-08-30 20:57     ` Krzysztof Kozlowski
2026-08-31 17:58       ` Rob Herring
2026-08-29 19:53 ` [PATCH 5/6] dtc: dt-check-style: Check for indentation also in continued lines of DTS Krzysztof Kozlowski
2026-08-29 19:53 ` [PATCH 6/6] dtc: dt-check-style: Check for indentation also in continued lines of bindings example Krzysztof Kozlowski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260829-dts-style-checker-sort-v1-3-6693a37d7ae1@oss.qualcomm.com \
    --to=krzysztof.kozlowski@oss.qualcomm.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robh@kernel.org \
    --cc=saravanak@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox