From nobody Mon Sep 28 04:56:12 2026 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D364A3F58D6 for ; Wed, 26 Aug 2026 11:16:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787742992; cv=none; b=XGWjRiv5GToxN8EDEBezjNj/4MhjB2Oy82Ed8xccu5W7jNQnKCrC86ngNzD1zvsgdVxeKAlVMqdAr0YRQdsTfxelSXQwYk5LgO9ZdI04aphHhzFFPN59+pB4DEeSLtzkQbCGY2eE2EFzxdO2J+lU+1qeMJYyoY4czUh8qHtxrVs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787742992; c=relaxed/simple; bh=0xthswX1q4vjtkGJ4bdNMPARQGYjWQFVq2U7aKzeU38=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=nl4YmvXWue6/YZJB2dK0BPDINJ1GuTRzuwO5jowhBWSfK6q2xoTGFIpbplmFiEZJ9yUvEhg2oYFERbkxsNrVPxUSftKGh2guoutzRKalesVVpZSczYrpxKGX56sh3V1C3gt+LCrFTDonW1yCTC8oW2DWjyHKbSNXTgwTSVulYE8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b=OSso9VOJ; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=fbVnT9jl; arc=none smtp.client-ip=205.220.180.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b="OSso9VOJ"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="fbVnT9jl" Received: from pps.filterd (m0279870.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 67QAH3oP647426 for ; Wed, 26 Aug 2026 11:16:12 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= STHeb6B/4VhTrwbxAWebhCndsyoByaaPT7onxnl2wsM=; b=OSso9VOJfw9O1Qk2 ZuK9wLgbKJQVjlA+e5T6SRWBP2LUVu5Y2zDF/BIe7deTheUNNS+UvjXvqiZKxOPP OZ8QWHEkhkpcow424cDoc7uM80dsPpd6D+9EuZQKN+BRTDdm/GUA5ooxz+9FHmWk x+O4WOClOlAwgTTr0tW6wQVF0wgjoglc9IAX+hpUBewMKaKg9j2sUizhQI6L32XC WV4uBN/vYK6oq4060ZubzhS1YwOutLBASML348FXtoIm9u3BQmPdJpSXeq7gE4t1 Gwhjfu6/ATDtpZEtxD67kaxIQk5fVrzUe/KqAI/jhSxyjQK5TmFFNeFJMA/P4IX1 friXRg== Received: from mail-qt1-f198.google.com (mail-qt1-f198.google.com [209.85.160.198]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4g9g4mucku-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Wed, 26 Aug 2026 11:16:11 +0000 (GMT) Received: by mail-qt1-f198.google.com with SMTP id d75a77b69052e-52d33c89a29so10571831cf.1 for ; Wed, 26 Aug 2026 04:16:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1787742971; x=1788347771; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :content-type:mime-version:subject:date:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=STHeb6B/4VhTrwbxAWebhCndsyoByaaPT7onxnl2wsM=; b=fbVnT9jlubLKvatCg8HnwBkZXvdMeRAvN6JEtWPBsdu09VN2owE7kFXcFCUCL40hq/ eeAkJimVsZcmnJQWXyBIVXcakILlF8Twigctbcpeh1RF/fYjDo8BfL/2c1g7j5htCnHZ itwvx6SEc5ou8/rfKO8fBsveD1K2jNacxKKO6v2U0aHJ3I1gFic+6YqSKEn0ZxufMcFk ry5FJ3dtOvxGBZVJmSc3edf7tRX7ugPvOCIf9HyoCAj0GR7Hhc20xUjp87UQ4/QXCkMK uIl4veCrG7RbAMfnQKR6s5BdBVgwO4Z3Zi5benpvHeGqmTa/Omuywn2WVNg5Tg5CLO11 FYbA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1787742971; x=1788347771; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :content-type:mime-version:subject:date:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=STHeb6B/4VhTrwbxAWebhCndsyoByaaPT7onxnl2wsM=; b=OyOoCqGyv112MF8Qoq7dXkQhm6z8vfUcx4tJjbo6Nfm+tH0Mr23rzJJVFEIca/z7qr jgKW8cHEyp/j+LOCQ94E0uZqt9rhXwyVTVyAqZYlM4nq3odjcPiNPuvHaTDltKcASolz uqTHwMQqkbTc1YR0ajsohziOyIQS+D54FXPZRJAz+oUacM8gI2P05Sk8tom8iLJxbpBG CYLrJvSF+NOUrUj1/kyRrqsZJ1TF4GgjdKvYcN4T0XlyiIQAjdido4duL3b40pgR/lMr 7wf5mwREneDFdzgEnboninP6hcGWj/pFpR86cXaqLca1WcDe5mGkq9D1o4TPpHKJWYDB 6sWA== X-Forwarded-Encrypted: i=1; AHgh+Ro6Dr//Yir49GaVGqJh8J+6F0j6eEFXoxKl9wMZKTEreXKJvRqiVvjXoa/B7VDsutuBINqGtyEjK3p0Cq0=@vger.kernel.org X-Gm-Message-State: AFuF++n4yPlyJUohMFU7zXfkTIkHDYo95lFiDVFUXqWyjFkTCoo28yMQ 5r0N8xSI5kjqwjSBrn1+lzh4SsTZa7txN/BFyEjTpjIDHWx8DpfVaINUXnI2NmtXFSv+OdFlaG7 txiTYIJodz4LjVvkfkPL0MGGSS7ZgMiSYMIxhisByZHs2HNsVe1HonU7l7rVKIpv0Xpk= X-Gm-Gg: AR+sD10j+0taveeFn4IS/2SoVpXEgfwYEYRT9L3ifPEL+WkJfD1YqX4HKtV29jSfFXb X9F5qYoCTijqdCsQ2zMgu2MzACwQWcjZUYZpZVsjghHSY8sldwe98ejP9qV9oRrbPa+VeSoLi6K jOHw61o2SvW82ejYwfriZzaUsyPGF8lWaNN2yRKirIbUf68wA0zvgA07x1XZ7jhftGYUNU0sFNy WBVvriaKoTTscd0u8d2dQM6lh2Pg0zz3DEJAINsETi6iUva5d3cpAtMfpo2JOgYQnwpiTLkS9DR mJn0SEZ/Z4wH3RUruDevb8jkxbUrcby65vDbRrXqBlT4zTHHwa3JF6S/GZgay/VCStT4v9kadkz QRDuj4vktTlZAc07qR/QOmBc= X-Received: by 2002:a05:622a:8c02:b0:52f:64c4:8094 with SMTP id d75a77b69052e-52f64c48c14mr2740651cf.39.1787742970604; Wed, 26 Aug 2026 04:16:10 -0700 (PDT) X-Received: by 2002:a05:622a:8c02:b0:52f:64c4:8094 with SMTP id d75a77b69052e-52f64c48c14mr2739541cf.39.1787742969604; Wed, 26 Aug 2026 04:16:09 -0700 (PDT) Received: from [127.0.1.1] ([178.197.219.214]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-6a5de8ea6d0sm4577843a12.13.2026.08.26.04.16.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Aug 2026 04:16:08 -0700 (PDT) From: Krzysztof Kozlowski Date: Wed, 26 Aug 2026 13:15:53 +0200 Subject: [PATCH v6 01/10] dtc: dt-check-style: Handle sorting of top-level nodes and properties Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260826-n-dts-style-checker-continued-v6-1-f270b1e81f8e@oss.qualcomm.com> References: <20260826-n-dts-style-checker-continued-v6-0-f270b1e81f8e@oss.qualcomm.com> In-Reply-To: <20260826-n-dts-style-checker-continued-v6-0-f270b1e81f8e@oss.qualcomm.com> To: Rob Herring , Saravana Kannan , Krzysztof Kozlowski , Conor Dooley Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Krzysztof Kozlowski X-Mailer: b4 0.16.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=29299; i=krzysztof.kozlowski@oss.qualcomm.com; h=from:subject:message-id; bh=0xthswX1q4vjtkGJ4bdNMPARQGYjWQFVq2U7aKzeU38=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBqjsrs+zCTk56UfQiDtngF7l3uMbuokuwU8V1cR 6mmDYsHLS6JAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCao7K7AAKCRDBN2bmhouD 16ndD/90diJqLu8CI8Pz84bwU0cvAmo38t4zCz/lFtnIBGJuJdIO4ITJvyWhO90uWPzvMp+MGg7 tPaNd6N/cUYm+GQeb4RO6rOwmXNGrlw9Fdsxa3Lqw+BSdSOkswWtAz9z+6NqLn4r192Tf0RFETM Y+kNL7mjYHXwMaoBOjcj22Jkt7fbZgKN9TEREdrEJEqCiJucj6U+2GYWZnUrAXN3qDqdIjYT2po mjVhfzD3OScz8M0QTQS2/XOR172GrYZdrVz1Jum+ufJb2G0Y5LDzNeQha0hUkmCBwR/FrY7CdBo vM1QxWTsyTmHnRxD802rPwf9DcfuKQHY/77jEjG08sn+tybWMVeECiHb2ryhQ0L64cj6rirl9k1 DaS+d9wHdW/4XI2BbuczmG1TsaGivUPcuSJ9tLUTD/IN2j2KxafZRsmk9q74mPkFzl5z7am0whn ND83m1HW6ySuIk6ydQhglH853jLQfsq9NwCMOGUn27pytQ8dxqChyRfmOEikqy7xk/hJtaLN9sg 99eEwDDKu7nIoBNXFBWTJOegQKmC07KdRCVfd/NHFfOLPNZBhrATKp1Ti5zpiXsobqO5VYwmQOR T8kW3e73NcJeMEIJsnHhlfo9VZ3GNVOjEnaoZTGBFDtozKc9J5d8UcZLyBBjn3QrxZ4gRfhQxUe XkRqS84oNziVJzA== X-Developer-Key: i=krzysztof.kozlowski@oss.qualcomm.com; a=openpgp; fpr=9BD07E0E0C51F8D59677B7541B93437D3B41629B X-Proofpoint-Spam-Info: AW1haW4tMjYwODI2MDA5NCBTYWx0ZWRfX9lW5x9mSkDug OfowPTtO1auE47E+erw/huQOG10qT/1MUGQ+2UBbaVEKUZCC9IEa4TO2MXNNNg0Dl8KjETHGlSN 3d8/B/bWT22fnLXNgiulAaqPGJZ8xMM= X-Proofpoint-ORIG-GUID: eOq_vArhyp0QXgEIUCSzYh5JGAcAfCmc X-Authority-Analysis: v=2.4 cv=eYgNubEH c=1 sm=1 tr=0 ts=6a8ecafb cx=c_pps a=mPf7EqFMSY9/WdsSgAYMbA==:117 a=+bKQE0WJfmhK2875HamI0Q==:17 a=IkcTkHD0fZMA:10 a=Sv0fKeRqtYgA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=gowsoOTTUOVcmtlkKump:22 a=EUspDBNiAAAA:8 a=QqLqwGzyZR2lWnMfL0oA:9 a=GdEP5y9prHww6-rp:21 a=QEXdDO2ut3YA:10 a=dawVfQjAaf238kedN5IG:22 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwODI2MDA5NCBTYWx0ZWRfXwoNp+iwjfpTv XfIkOttOzOXpYfx9bed8bhbeK/9ELyVWJzDCL6n1KYtJgfmNxU+qzrOCFgOAkvTRGBONrFt0iRb 1ior6BnG4MNOTzQocY+tVR2ZXhzsJMp5WFzfmK7QjftAdK0au+z6aeVFFj2q6AO5OgBM62k3jMv cPlQQdifd4FNimJayz2C49G9bpnd4MmayExOVGqXx2dbn5Oqobielr5niiTbS509bl/rJIZDQgd gUub9szSXhUI2plxvMEQZX3bz+VsPcO37+fRZq4uTqTmk0/M1x2TodoBl4BzUZeSjicg4dtqbQG X8Jt/VXzifxceamRH7GZs9p9NPAokQxmvOA95rrSyXh+IBL+rmZnu4jvv98q1UX7HmdcU+KLNYg 7QFvM2G7ZxVO0xchiqdl+L6pr3QSyxbKx4Q/Qef7W2l27Pl2aCoIDTbkdwkFccGLdDn3P2AOmNw kOwL5U5LWJp3qyv/Zng== X-Proofpoint-GUID: eOq_vArhyp0QXgEIUCSzYh5JGAcAfCmc X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.134,FMLib:17.12.100.49 definitions=2026-08-26_03,2026-08-26_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 priorityscore=1501 impostorscore=0 suspectscore=0 clxscore=1015 lowpriorityscore=0 bulkscore=0 phishscore=0 spamscore=0 adultscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606150000 definitions=main-2608260094 Top-level DTS (but not example in the bindings) has only two nodes with unit-addresses: memory@ and soc@. There are two special cases here, in terms of coding style: 1. The unit-address of memory is often not known thus set to @0, because it is filled up by bootloader. 2. There is mixture of non-unit-address and unit-address nodes. Therefore usually the DTS chooses for the top-level part sorting by the node name, not the unit address. Also the properties have one exception: 'model' property is supposed to be before the 'compatible'. This cannot be applied to the entire DTS, because sound cards have also 'model' where it is supposed to follow standard rules (after the 'compatible'). Root node is just special. Signed-off-by: Krzysztof Kozlowski --- scripts/dtc/dt-check-style | 70 ++++++++++++++++++= ---- .../bad/dts-child-name-order.dtso | 33 ++++++++++ .../dt-style-selftest/bad/dts-digit-node-order.dts | 40 +++++++++++++ .../bad/dts-digit-node-order.dtso | 41 +++++++++++++ .../bad/dts-extend-node-child-name-order.dtso | 26 ++++++++ .../bad/dts-extend-node-digit-node-order.dtso | 34 +++++++++++ .../dt-style-selftest/bad/dts-property-order.dts | 15 +++++ .../dt-style-selftest/bad/dts-property-order.dtso | 59 ++++++++++++++++++ .../expected/dts-child-name-order.dts.txt | 1 + .../expected/dts-child-name-order.dtso.txt | 3 + .../expected/dts-digit-node-order.dts.txt | 2 + .../expected/dts-digit-node-order.dtso.txt | 2 + .../dts-extend-node-child-name-order.dtso.txt | 2 + .../dts-extend-node-digit-node-order.dtso.txt | 2 + .../expected/dts-property-order.dts.txt | 14 +++-- .../expected/dts-property-order.dtso.txt | 10 ++++ .../good/dts-child-name-order.dtso | 44 ++++++++++++++ .../good/dts-digit-node-order.dts | 3 - .../good/dts-digit-node-order.dtso | 59 ++++++++++++++++++ .../good/dts-extend-node-child-name-order.dtso | 26 ++++++++ .../good/dts-extend-node-digit-node-order.dtso | 34 +++++++++++ .../dt-style-selftest/good/dts-property-order.dts | 5 ++ .../dt-style-selftest/good/dts-property-order.dtso | 47 +++++++++++++++ 23 files changed, 554 insertions(+), 18 deletions(-) diff --git a/scripts/dtc/dt-check-style b/scripts/dtc/dt-check-style index 96deffc0d8a7..5a9985baa051 100755 --- a/scripts/dtc/dt-check-style +++ b/scripts/dtc/dt-check-style @@ -77,24 +77,26 @@ def is_preprocessor(stripped): =20 =20 class DtsLine: - __slots__ =3D ('lineno', 'raw', 'linetype', 'indent_str', 'stripped', + __slots__ =3D ('lineno', 'raw', 'linetype', 'indent_str', 'stripped', = 'is_root', 'prop_name', 'continuations', - 'node_name', 'node_addr', 'label', 'ref_name', 'depth', + 'node_name', 'node_addr', 'label', 'ref_name', 'parent', = 'depth', 'closures') =20 - def __init__(self, lineno, raw, linetype, depth, indent_str, stripped): + def __init__(self, lineno, raw, linetype, depth, indent_str, stripped,= is_root =3D False): self.lineno =3D lineno # 1-based within the block self.raw =3D raw self.linetype =3D linetype self.indent_str =3D indent_str # leading whitespace as-is self.depth =3D depth self.stripped =3D stripped + self.is_root =3D is_root self.prop_name =3D None self.continuations =3D [] self.node_name =3D None self.node_addr =3D None self.label =3D None self.ref_name =3D None + self.parent =3D None # DtsLine of parent node self.closures =3D 1 # count of '}' on a NODE_CLOSE line =20 =20 @@ -228,7 +230,10 @@ def classify_lines(text): continue =20 if code.endswith('{'): - dl =3D DtsLine(i, raw, LineType.NODE_OPEN, depth, indent_str, = code) + is_root =3D False + if re.search(r'&{/}\s*{', code) or re.search(r'^/\s*\{$', code= ): + is_root =3D True + dl =3D DtsLine(i, raw, LineType.NODE_OPEN, depth, indent_str, = code, is_root=3Dis_root) parse_node_header(dl) out.append(dl) depth +=3D 1 @@ -491,16 +496,24 @@ def _walk_bodies(lines): """Yield lists of immediate-child NODE_OPEN lines for each node body in the input. Skips ref-nodes (&label) since those don't have an intrinsic ordering.""" + # Array of stacked nodes (parent/child) body_stack =3D [[]] + # Current stack of nodes, purely to track parent relationship for each= node + node_stack =3D [] + parent_dl =3D None for dl in lines: if dl.linetype =3D=3D LineType.NODE_OPEN: + dl.parent =3D parent_dl + node_stack.append(dl) body_stack[-1].append(dl) body_stack.append([]) + parent_dl =3D dl continue if dl.linetype =3D=3D LineType.NODE_CLOSE: if len(body_stack) <=3D 1: # Unbalanced; ignore to avoid crashing on malformed input continue + parent_dl =3D node_stack.pop().parent yield body_stack.pop() continue while body_stack: @@ -521,12 +534,18 @@ def _natural_sort_key(s): =20 def check_child_address_order(ctx): """Addressed siblings (foo@N) must appear in ascending address - order within their parent node body.""" + order within their parent node body. + Exception: Top-level in DTS follows name order, regardless of unit add= ress + in memory@N and soc@N nodes + """ for children in _walk_bodies(ctx.lines): addressed =3D [] for c in children: if c.node_addr is None: continue + if c.parent and c.parent.is_root: + # Top-level does not use unit address sorting usually + continue try: parts =3D tuple(int(p, 16) for p in c.node_addr.split(',')) except ValueError: @@ -544,12 +563,16 @@ def check_child_name_order(ctx): """Unaddressed siblings must appear in natural-sort order by node name within their parent node body. Addressed children are scoped by check_child_address_order; reference nodes (&label { ... }) and - the root node are skipped.""" + the root node are skipped. + However root node has children with and without unit address, and + sorting should be only by name.""" for children in _walk_bodies(ctx.lines): unaddressed =3D [] for c in children: if c.node_addr is not None: - continue + # Skip nodes with unit address, except when sorting top-le= vel + if not c.parent or not c.parent.is_root: + continue if c.node_name in (None, '/'): continue if c.ref_name is not None: @@ -591,6 +614,30 @@ def _property_bucket(name): return (5 if ',' in stripped else 4, None) =20 =20 +def _property_bucket_root(name): + """Return the canonical bucket index for a property: + 0 model (for root nodes only) + 1 compatible + Plus a sub-key inside the bucket for fixed slots (device_type, compati= ble, + reg, reg-names, ranges, status). 'standard' and 'vendor' return None f= or + the sub-key, signalling that the within-bucket key is computed by + the pairing rules.""" + stripped =3D name.lstrip('#') + if name =3D=3D 'model': + return (0, 0) + if name =3D=3D 'compatible': + return (1, 0) + if name =3D=3D 'reg': + return (2, 0) + if name =3D=3D 'reg-names': + return (2, 1) + if name =3D=3D 'ranges': + return (3, 0) + if name =3D=3D 'status': + return (6, 0) + return (5 if ',' in stripped else 4, None) + + # Declarative pairing rules: each is a callable # (name, all_names) -> anchor_name_or_None # If a rule returns an anchor, the property sorts immediately after the @@ -627,13 +674,16 @@ def _pair_x_names(name, all_names): PAIRING_RULES =3D (_pair_pinctrl_names, _pair_x_names) =20 =20 -def _property_sort_key(name, all_names): +def _property_sort_key(dl, name, all_names): """Sort key for a property among its node-body siblings. =20 Format: (bucket, within_key, tiebreak). 'within_key' for standard/vendor buckets follows pairing rules: a property paired with anchor X sorts as if it were X with a higher tiebreak.""" - bucket, fixed_sub =3D _property_bucket(name) + if dl.is_root: + bucket, fixed_sub =3D _property_bucket_root(name) + else: + bucket, fixed_sub =3D _property_bucket(name) if fixed_sub is not None: return (bucket, (), fixed_sub) =20 @@ -668,7 +718,7 @@ def check_property_order(ctx): if len(props) < 2: continue all_names =3D [p.prop_name for p in props] - keyed =3D [(p, _property_sort_key(p.prop_name, all_names)) + keyed =3D [(p, _property_sort_key(dl, p.prop_name, all_names)) for p in props] for k in range(1, len(keyed)): if keyed[k][1] < keyed[k - 1][1]: diff --git a/scripts/dtc/dt-style-selftest/bad/dts-child-name-order.dtso b/= scripts/dtc/dt-style-selftest/bad/dts-child-name-order.dtso new file mode 100644 index 000000000000..74b49be69e98 --- /dev/null +++ b/scripts/dtc/dt-style-selftest/bad/dts-child-name-order.dtso @@ -0,0 +1,33 @@ +// SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +/dts-v1/; +/plugin/; + +&{/} { + #address-cells =3D <1>; + #size-cells =3D <1>; + + pmu { + compatible =3D "example,pmu"; + + /* Include labels to be sure they do not affect sorting */ + foo: foo { + label =3D "foo"; + }; + + label_bar: bar { + label =3D "bar"; + }; + }; + + memory@a0000000 { + device_type =3D "memory"; + reg =3D <0x0 0xa0000000 0x0 0x0>; + }; + + pmu-2 { + compatible =3D "example,pmu"; + + /* Just reference labels to avoid strict warnings */ + example,foo =3D <&foo>, <&label_bar>; + }; +}; diff --git a/scripts/dtc/dt-style-selftest/bad/dts-digit-node-order.dts b/s= cripts/dtc/dt-style-selftest/bad/dts-digit-node-order.dts new file mode 100644 index 000000000000..74c956398324 --- /dev/null +++ b/scripts/dtc/dt-style-selftest/bad/dts-digit-node-order.dts @@ -0,0 +1,40 @@ +// SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +/dts-v1/; + +/ { + #address-cells =3D <1>; + #size-cells =3D <1>; + + memory@a0000000 { + device_type =3D "memory"; + reg =3D <0x0 0xa0000000 0x0 0x0>; + }; + + pmu { + compatible =3D "example,pmu"; + }; + + soc@0 { + compatible =3D "simple-bus"; + ranges =3D <0 0 0 0xc0000000>; + + #address-cells =3D <1>; + #size-cells =3D <1>; + + serial@20000 { + compatible =3D "example,serial"; + reg =3D <0x20000 0x1000>; + }; + + interrupt-controller@10000 { + compatible =3D "example,intc"; + reg =3D <0x10000 0x1000>; + interrupts =3D <1 2 3>; + }; + + serial@30000 { + compatible =3D "example,serial"; + reg =3D <0x30000 0x1000>; + }; + }; +}; diff --git a/scripts/dtc/dt-style-selftest/bad/dts-digit-node-order.dtso b/= scripts/dtc/dt-style-selftest/bad/dts-digit-node-order.dtso new file mode 100644 index 000000000000..052c02935a45 --- /dev/null +++ b/scripts/dtc/dt-style-selftest/bad/dts-digit-node-order.dtso @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +/dts-v1/; +/plugin/; + +&{/} { + #address-cells =3D <1>; + #size-cells =3D <1>; + + memory@a0000000 { + device_type =3D "memory"; + reg =3D <0x0 0xa0000000 0x0 0x0>; + }; + + pmu { + compatible =3D "example,pmu"; + }; + + soc@0 { + compatible =3D "simple-bus"; + ranges =3D <0 0 0 0xc0000000>; + + #address-cells =3D <1>; + #size-cells =3D <1>; + + serial@20000 { + compatible =3D "example,serial"; + reg =3D <0x20000 0x1000>; + }; + + interrupt-controller@10000 { + compatible =3D "example,intc"; + reg =3D <0x10000 0x1000>; + interrupts =3D <1 2 3>; + }; + + serial@30000 { + compatible =3D "example,serial"; + reg =3D <0x30000 0x1000>; + }; + }; +}; diff --git a/scripts/dtc/dt-style-selftest/bad/dts-extend-node-child-name-o= rder.dtso b/scripts/dtc/dt-style-selftest/bad/dts-extend-node-child-name-or= der.dtso new file mode 100644 index 000000000000..d9cf670f19f6 --- /dev/null +++ b/scripts/dtc/dt-style-selftest/bad/dts-extend-node-child-name-order.dt= so @@ -0,0 +1,26 @@ +// SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +/dts-v1/; +/plugin/; + +&{/} { + #address-cells =3D <1>; + #size-cells =3D <1>; + + pmu { + compatible =3D "example,pmu"; + + /* Just reference labels to avoid strict warnings */ + example,foo =3D <&foo>, <&label_bar>; + }; +}; + +&pmu { + /* Include labels to be sure they do not affect sorting */ + foo: foo { + label =3D "foo"; + }; + + label_bar: bar { + label =3D "bar"; + }; +}; diff --git a/scripts/dtc/dt-style-selftest/bad/dts-extend-node-digit-node-o= rder.dtso b/scripts/dtc/dt-style-selftest/bad/dts-extend-node-digit-node-or= der.dtso new file mode 100644 index 000000000000..4b2cf60e5a92 --- /dev/null +++ b/scripts/dtc/dt-style-selftest/bad/dts-extend-node-digit-node-order.dt= so @@ -0,0 +1,34 @@ +// SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +/dts-v1/; +/plugin/; + +&{/} { + #address-cells =3D <1>; + #size-cells =3D <1>; + + soc: soc@0 { + compatible =3D "simple-bus"; + ranges =3D <0 0 0 0xc0000000>; + + #address-cells =3D <1>; + #size-cells =3D <1>; + }; +}; + +&soc { + serial@20000 { + compatible =3D "example,serial"; + reg =3D <0x20000 0x1000>; + }; + + interrupt-controller@10000 { + compatible =3D "example,intc"; + reg =3D <0x10000 0x1000>; + interrupts =3D <1 2 3>; + }; + + serial@30000 { + compatible =3D "example,serial"; + reg =3D <0x30000 0x1000>; + }; +}; diff --git a/scripts/dtc/dt-style-selftest/bad/dts-property-order.dts b/scr= ipts/dtc/dt-style-selftest/bad/dts-property-order.dts index f31abb6ceae4..ebe561e38766 100644 --- a/scripts/dtc/dt-style-selftest/bad/dts-property-order.dts +++ b/scripts/dtc/dt-style-selftest/bad/dts-property-order.dts @@ -6,6 +6,11 @@ /dts-v1/; =20 / { + compatible =3D "example,test-board", "example,test-soc"; + model =3D "DT style selftest"; + qcom,board-id =3D <8 0>; + chassis-type =3D "handset"; + cpus { #address-cells =3D <1>; #size-cells =3D <0>; @@ -41,3 +46,13 @@ interrupt-controller@10000 { }; }; }; + +/ { + compatible =3D "example,test-board", "example,test-soc"; + model =3D "DT style selftest"; +}; + +/{ + compatible =3D "example,test-board", "example,test-soc"; + model =3D "DT style selftest"; +}; diff --git a/scripts/dtc/dt-style-selftest/bad/dts-property-order.dtso b/sc= ripts/dtc/dt-style-selftest/bad/dts-property-order.dtso new file mode 100644 index 000000000000..64604fa6b8c3 --- /dev/null +++ b/scripts/dtc/dt-style-selftest/bad/dts-property-order.dtso @@ -0,0 +1,59 @@ +// SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +/* + * Test fixture: Incorrect property order + */ + +/dts-v1/; +/plugin/; + +&{/} { + compatible =3D "example,test-board", "example,test-soc"; + model =3D "DT style selftest"; + qcom,board-id =3D <8 0>; + chassis-type =3D "handset"; + + cpus { + #address-cells =3D <1>; + #size-cells =3D <0>; + + cpu@0 { + reg =3D <0x0 0x0>; + compatible =3D "arm,cortex-a57"; + device_type =3D "cpu"; + enable-method =3D "psci"; + }; + }; + + pmu { + compatible =3D "example,pmu"; + + status =3D "disabled"; + dma-coherent; + }; + + soc@0 { + ranges =3D <0 0 0 0xc0000000>; + compatible =3D "simple-bus"; + + #address-cells =3D <1>; + #size-cells =3D <1>; + + interrupt-controller@10000 { + reg =3D <0x10000 0x1000>; + interrupts =3D <1 2 3>, + <4 5 6>, + <7 8 9>; + compatible =3D "example,intc"; + }; + }; +}; + +&{/} { + compatible =3D "example,test-board", "example,test-soc"; + model =3D "DT style selftest"; +}; + +&{/}{ + compatible =3D "example,test-board", "example,test-soc"; + model =3D "DT style selftest"; +}; diff --git a/scripts/dtc/dt-style-selftest/expected/dts-child-name-order.dt= s.txt b/scripts/dtc/dt-style-selftest/expected/dts-child-name-order.dts.txt index e2eea0862102..312a45ed913a 100644 --- a/scripts/dtc/dt-style-selftest/expected/dts-child-name-order.dts.txt +++ b/scripts/dtc/dt-style-selftest/expected/dts-child-name-order.dts.txt @@ -1,2 +1,3 @@ # mode=3Dstrict bad/dts-child-name-order.dts:16: [child-name-order] child node 'bar' out o= f name order +bad/dts-child-name-order.dts:21: [child-name-order] child node 'memory' ou= t of name order diff --git a/scripts/dtc/dt-style-selftest/expected/dts-child-name-order.dt= so.txt b/scripts/dtc/dt-style-selftest/expected/dts-child-name-order.dtso.t= xt new file mode 100644 index 000000000000..e44ceb24ece8 --- /dev/null +++ b/scripts/dtc/dt-style-selftest/expected/dts-child-name-order.dtso.txt @@ -0,0 +1,3 @@ +# mode=3Dstrict +bad/dts-child-name-order.dtso:17: [child-name-order] child node 'bar' out = of name order +bad/dts-child-name-order.dtso:22: [child-name-order] child node 'memory' o= ut of name order diff --git a/scripts/dtc/dt-style-selftest/expected/dts-digit-node-order.dt= s.txt b/scripts/dtc/dt-style-selftest/expected/dts-digit-node-order.dts.txt new file mode 100644 index 000000000000..1f41acdea0b0 --- /dev/null +++ b/scripts/dtc/dt-style-selftest/expected/dts-digit-node-order.dts.txt @@ -0,0 +1,2 @@ +# mode=3Dstrict +bad/dts-digit-node-order.dts:29: [child-address-order] child node @10000 o= ut of address order diff --git a/scripts/dtc/dt-style-selftest/expected/dts-digit-node-order.dt= so.txt b/scripts/dtc/dt-style-selftest/expected/dts-digit-node-order.dtso.t= xt new file mode 100644 index 000000000000..21db32f6e639 --- /dev/null +++ b/scripts/dtc/dt-style-selftest/expected/dts-digit-node-order.dtso.txt @@ -0,0 +1,2 @@ +# mode=3Dstrict +bad/dts-digit-node-order.dtso:30: [child-address-order] child node @10000 = out of address order diff --git a/scripts/dtc/dt-style-selftest/expected/dts-extend-node-child-n= ame-order.dtso.txt b/scripts/dtc/dt-style-selftest/expected/dts-extend-node= -child-name-order.dtso.txt new file mode 100644 index 000000000000..d7941a891135 --- /dev/null +++ b/scripts/dtc/dt-style-selftest/expected/dts-extend-node-child-name-ord= er.dtso.txt @@ -0,0 +1,2 @@ +# mode=3Dstrict +bad/dts-extend-node-child-name-order.dtso:23: [child-name-order] child nod= e 'bar' out of name order diff --git a/scripts/dtc/dt-style-selftest/expected/dts-extend-node-digit-n= ode-order.dtso.txt b/scripts/dtc/dt-style-selftest/expected/dts-extend-node= -digit-node-order.dtso.txt new file mode 100644 index 000000000000..408796d5bb03 --- /dev/null +++ b/scripts/dtc/dt-style-selftest/expected/dts-extend-node-digit-node-ord= er.dtso.txt @@ -0,0 +1,2 @@ +# mode=3Dstrict +bad/dts-extend-node-digit-node-order.dtso:24: [child-address-order] child = node @10000 out of address order diff --git a/scripts/dtc/dt-style-selftest/expected/dts-property-order.dts.= txt b/scripts/dtc/dt-style-selftest/expected/dts-property-order.dts.txt index 4bc21328625f..aab048a0ba3b 100644 --- a/scripts/dtc/dt-style-selftest/expected/dts-property-order.dts.txt +++ b/scripts/dtc/dt-style-selftest/expected/dts-property-order.dts.txt @@ -1,6 +1,10 @@ # mode=3Dstrict -bad/dts-property-order.dts:15: [property-order] property 'compatible' out = of canonical order (should sort before 'reg') -bad/dts-property-order.dts:16: [property-order] property 'device_type' out= of canonical order (should sort before 'compatible') -bad/dts-property-order.dts:25: [property-order] property 'dma-coherent' ou= t of canonical order (should sort before 'status') -bad/dts-property-order.dts:30: [property-order] property 'compatible' out = of canonical order (should sort before 'ranges') -bad/dts-property-order.dts:40: [property-order] property 'compatible' out = of canonical order (should sort before 'interrupts') +bad/dts-property-order.dts:10: [property-order] property 'model' out of ca= nonical order (should sort before 'compatible') +bad/dts-property-order.dts:12: [property-order] property 'chassis-type' ou= t of canonical order (should sort before 'qcom,board-id') +bad/dts-property-order.dts:20: [property-order] property 'compatible' out = of canonical order (should sort before 'reg') +bad/dts-property-order.dts:21: [property-order] property 'device_type' out= of canonical order (should sort before 'compatible') +bad/dts-property-order.dts:30: [property-order] property 'dma-coherent' ou= t of canonical order (should sort before 'status') +bad/dts-property-order.dts:35: [property-order] property 'compatible' out = of canonical order (should sort before 'ranges') +bad/dts-property-order.dts:45: [property-order] property 'compatible' out = of canonical order (should sort before 'interrupts') +bad/dts-property-order.dts:52: [property-order] property 'model' out of ca= nonical order (should sort before 'compatible') +bad/dts-property-order.dts:57: [property-order] property 'model' out of ca= nonical order (should sort before 'compatible') diff --git a/scripts/dtc/dt-style-selftest/expected/dts-property-order.dtso= .txt b/scripts/dtc/dt-style-selftest/expected/dts-property-order.dtso.txt new file mode 100644 index 000000000000..e9b3ac985718 --- /dev/null +++ b/scripts/dtc/dt-style-selftest/expected/dts-property-order.dtso.txt @@ -0,0 +1,10 @@ +# mode=3Dstrict +bad/dts-property-order.dtso:11: [property-order] property 'model' out of c= anonical order (should sort before 'compatible') +bad/dts-property-order.dtso:13: [property-order] property 'chassis-type' o= ut of canonical order (should sort before 'qcom,board-id') +bad/dts-property-order.dtso:21: [property-order] property 'compatible' out= of canonical order (should sort before 'reg') +bad/dts-property-order.dtso:22: [property-order] property 'device_type' ou= t of canonical order (should sort before 'compatible') +bad/dts-property-order.dtso:31: [property-order] property 'dma-coherent' o= ut of canonical order (should sort before 'status') +bad/dts-property-order.dtso:36: [property-order] property 'compatible' out= of canonical order (should sort before 'ranges') +bad/dts-property-order.dtso:46: [property-order] property 'compatible' out= of canonical order (should sort before 'interrupts') +bad/dts-property-order.dtso:53: [property-order] property 'model' out of c= anonical order (should sort before 'compatible') +bad/dts-property-order.dtso:58: [property-order] property 'model' out of c= anonical order (should sort before 'compatible') diff --git a/scripts/dtc/dt-style-selftest/good/dts-child-name-order.dtso b= /scripts/dtc/dt-style-selftest/good/dts-child-name-order.dtso new file mode 100644 index 000000000000..1fd75a6285ce --- /dev/null +++ b/scripts/dtc/dt-style-selftest/good/dts-child-name-order.dtso @@ -0,0 +1,44 @@ +// SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +/dts-v1/; +/plugin/; + +&{/} { + #address-cells =3D <1>; + #size-cells =3D <1>; + + memory@a0000000 { + device_type =3D "memory"; + reg =3D <0x0 0xa0000000 0x0 0x0>; + }; + + pmu { + compatible =3D "example,pmu"; + + /* Include labels to be sure they do not affect sorting */ + label_bar: bar { + label =3D "bar"; + }; + + foo: foo { + label =3D "foo"; + }; + }; + + pmu-2 { + compatible =3D "example,pmu"; + + /* Just reference labels to avoid strict warnings */ + example,foo =3D <&foo>, <&label_bar>; + }; +}; + +&pmu { + /* Include labels to be sure they do not affect sorting */ + label_bar_2: bar-2 { + label =3D "bar"; + }; + + foo_2: foo-2 { + label =3D "foo"; + }; +} diff --git a/scripts/dtc/dt-style-selftest/good/dts-digit-node-order.dts b/= scripts/dtc/dt-style-selftest/good/dts-digit-node-order.dts index cdf3f91ebe01..2b21dde7f3c8 100644 --- a/scripts/dtc/dt-style-selftest/good/dts-digit-node-order.dts +++ b/scripts/dtc/dt-style-selftest/good/dts-digit-node-order.dts @@ -5,13 +5,10 @@ / { #address-cells =3D <1>; #size-cells =3D <1>; =20 - /* TODO: uncomment when child-address-order is fixed for top-level */ - /* memory@a0000000 { device_type =3D "memory"; reg =3D <0x0 0xa0000000 0x0 0x0>; }; - */ =20 pmu { compatible =3D "example,pmu"; diff --git a/scripts/dtc/dt-style-selftest/good/dts-digit-node-order.dtso b= /scripts/dtc/dt-style-selftest/good/dts-digit-node-order.dtso new file mode 100644 index 000000000000..efafa1cccc15 --- /dev/null +++ b/scripts/dtc/dt-style-selftest/good/dts-digit-node-order.dtso @@ -0,0 +1,59 @@ +// SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +/dts-v1/; +/plugin/; + +&{/} { + #address-cells =3D <1>; + #size-cells =3D <1>; + + memory@a0000000 { + device_type =3D "memory"; + reg =3D <0x0 0xa0000000 0x0 0x0>; + }; + + pmu { + compatible =3D "example,pmu"; + }; + + soc@0 { + compatible =3D "simple-bus"; + ranges =3D <0 0 0 0xc0000000>; + + #address-cells =3D <1>; + #size-cells =3D <1>; + + interrupt-controller@10000 { + compatible =3D "example,intc"; + reg =3D <0x10000 0x1000>; + interrupts =3D <1 2 3>; + }; + + serial@20000 { + compatible =3D "example,serial"; + reg =3D <0x20000 0x1000>; + }; + + serial@30000 { + compatible =3D "example,serial"; + reg =3D <0x30000 0x1000>; + }; + }; +}; + +&soc { + interrupt-controller@110000 { + compatible =3D "example,intc"; + reg =3D <0x110000 0x1000>; + interrupts =3D <1 2 3>; + }; + + serial@120000 { + compatible =3D "example,serial"; + reg =3D <0x120000 0x1000>; + }; + + serial@130000 { + compatible =3D "example,serial"; + reg =3D <0x130000 0x1000>; + }; +}; diff --git a/scripts/dtc/dt-style-selftest/good/dts-extend-node-child-name-= order.dtso b/scripts/dtc/dt-style-selftest/good/dts-extend-node-child-name-= order.dtso new file mode 100644 index 000000000000..b00c2a195179 --- /dev/null +++ b/scripts/dtc/dt-style-selftest/good/dts-extend-node-child-name-order.d= tso @@ -0,0 +1,26 @@ +// SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +/dts-v1/; +/plugin/; + +&{/} { + #address-cells =3D <1>; + #size-cells =3D <1>; + + pmu { + compatible =3D "example,pmu"; + + /* Just reference labels to avoid strict warnings */ + example,foo =3D <&foo>, <&label_bar>; + }; +}; + +&pmu { + /* Include labels to be sure they do not affect sorting */ + label_bar: bar { + label =3D "bar"; + }; + + foo: foo { + label =3D "foo"; + }; +}; diff --git a/scripts/dtc/dt-style-selftest/good/dts-extend-node-digit-node-= order.dtso b/scripts/dtc/dt-style-selftest/good/dts-extend-node-digit-node-= order.dtso new file mode 100644 index 000000000000..1ce18afb80de --- /dev/null +++ b/scripts/dtc/dt-style-selftest/good/dts-extend-node-digit-node-order.d= tso @@ -0,0 +1,34 @@ +// SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +/dts-v1/; +/plugin/; + +&{/} { + #address-cells =3D <1>; + #size-cells =3D <1>; + + soc: soc@0 { + compatible =3D "simple-bus"; + ranges =3D <0 0 0 0xc0000000>; + + #address-cells =3D <1>; + #size-cells =3D <1>; + }; +}; + +&soc { + interrupt-controller@10000 { + compatible =3D "example,intc"; + reg =3D <0x10000 0x1000>; + interrupts =3D <1 2 3>; + }; + + serial@20000 { + compatible =3D "example,serial"; + reg =3D <0x20000 0x1000>; + }; + + serial@30000 { + compatible =3D "example,serial"; + reg =3D <0x30000 0x1000>; + }; +}; diff --git a/scripts/dtc/dt-style-selftest/good/dts-property-order.dts b/sc= ripts/dtc/dt-style-selftest/good/dts-property-order.dts index 0e183e3459cd..3d847cc9fa3e 100644 --- a/scripts/dtc/dt-style-selftest/good/dts-property-order.dts +++ b/scripts/dtc/dt-style-selftest/good/dts-property-order.dts @@ -6,6 +6,11 @@ /dts-v1/; =20 / { + model =3D "DT style selftest"; + compatible =3D "example,test-board", "example,test-soc"; + chassis-type =3D "handset"; + qcom,board-id =3D <8 0>; + cpus { #address-cells =3D <1>; #size-cells =3D <0>; diff --git a/scripts/dtc/dt-style-selftest/good/dts-property-order.dtso b/s= cripts/dtc/dt-style-selftest/good/dts-property-order.dtso new file mode 100644 index 000000000000..5ae78541f68b --- /dev/null +++ b/scripts/dtc/dt-style-selftest/good/dts-property-order.dtso @@ -0,0 +1,47 @@ +// SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +/* + * Test fixture: Incorrect property order + */ + +/dts-v1/; +/plugin/; + +&{/} { + model =3D "DT style selftest"; + compatible =3D "example,test-board", "example,test-soc"; + chassis-type =3D "handset"; + qcom,board-id =3D <8 0>; + + cpus { + #address-cells =3D <1>; + #size-cells =3D <0>; + + cpu@0 { + device_type =3D "cpu"; + compatible =3D "arm,cortex-a57"; + reg =3D <0x0 0x0>; + enable-method =3D "psci"; + }; + }; + + pmu { + compatible =3D "example,pmu"; + dma-coherent; + + status =3D "disabled"; + }; + + soc@0 { + compatible =3D "simple-bus"; + ranges =3D <0 0 0 0xc0000000>; + + #address-cells =3D <1>; + #size-cells =3D <1>; + + interrupt-controller@10000 { + compatible =3D "example,intc"; + reg =3D <0x10000 0x1000>; + interrupts =3D <1 2 3>; + }; + }; +}; --=20 2.53.0 From nobody Mon Sep 28 04:56:12 2026 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 975B63E1D12 for ; Wed, 26 Aug 2026 11:16:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787742983; cv=none; b=bYUyHruI1VLWuzWFCJNfqGT6eKazuDDOi3S57JSn02JYcoDy/43cCE8sbIHTtZhNgjVh1Eu5X3wTi0u9My9F3P7+UqYgFOtb4fbjiHSWYzKIdXPjD2WOkBtAYGD2OVGGaB0uNoBW5JgG4Bt4acDdr+mi3Xw+0qwWLYIg4PTSAso= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787742983; c=relaxed/simple; bh=Q/J7FN7gGPyhDSdt/FQ/VZn0+1FY2L615paV5EC6nxY=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=efdUZ9qW2XuRpmA40C4CIUpqXgsHrR+NEo4NpTOooM8xw8WIBC/SjM393eHrXud/l7wGj9Zlw0p6lgZHkbcmTmdsRnVCXI7w4zc9jOX6cRpdbGGSNS33wfOmZKoA0L9P/+3axZ20VIgJV7YIovovMLeB4gTWZZMOCVWm1G59B64= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b=o4qFOAvl; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=RQq7lFbk; arc=none smtp.client-ip=205.220.180.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b="o4qFOAvl"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="RQq7lFbk" Received: from pps.filterd (m0279871.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 67QAH2CV972453 for ; Wed, 26 Aug 2026 11:16:12 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= Nx72tm3aLXOwX2pw8bT1HprONt9gl/DnSxMz4SHqnoU=; b=o4qFOAvln5+/MuKe Ql06AQf2eHJUUe8MY+r7M+E1hGoU69ncBiIOvGpNClvoLSRZHMYKS7454nXrcWDJ ew+orQsqKMAZgiPpafH1/MkBeSG0FDUTJSKqK2BD3AhbCu0cuEIlOHyKdv6oRkHs 8AQQO5YcOeETkE8/1lhYpKv9TGLbt3Sg9myPTgn6s2/63VzLARflirXTzlAkf3Mb 8J7NQfmcDcK1xYsxQiSQMYpRenW/Mh1PU9i8oty/7eHVGU0kYHoQtkQHYm5YcWoe PyMwEx2B0Hm3WeBs6v9ZURp9XmELQv5qy3Q1g80KEddgzLEhU5KfS+f9UALhVyUO xTuN6w== Received: from mail-qt1-f200.google.com (mail-qt1-f200.google.com [209.85.160.200]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4g9r1ghrrc-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Wed, 26 Aug 2026 11:16:12 +0000 (GMT) Received: by mail-qt1-f200.google.com with SMTP id d75a77b69052e-51c0408254aso23927131cf.0 for ; Wed, 26 Aug 2026 04:16:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1787742972; x=1788347772; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :content-type:mime-version:subject:date:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=Nx72tm3aLXOwX2pw8bT1HprONt9gl/DnSxMz4SHqnoU=; b=RQq7lFbkFAJh3jayP+lTQa1tMZWed5wK/7eJXZlZOISxdadAdgugwm3cqDeGQRqNdT leT95W5p9TYU/MeVo2THGkDJDzcdrem0eIz0aZ+wLP5ucOflpzF6yBpVgyzqY5zI5vOz SS9Ktikm6BPdc4nbVhb3LuiGCNqstBzAOKUYA2M2X6jcy+55ljmdncKkweIiKBgnwMVf c96K34cFzeRJkAbXQTLffSpJaqFwp5gkiDp0lRLzAd1G5m6aE1BUXr0tT+2yh3y3zYES 7591Ad/JE2qyoDW14y0kby1/ysYAXpFbQtRqcSL8giz2yH+VXqdwwyO/WW1F9+9d131U 0MmA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1787742972; x=1788347772; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :content-type:mime-version:subject:date:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=Nx72tm3aLXOwX2pw8bT1HprONt9gl/DnSxMz4SHqnoU=; b=PSTEYFTT1AGqQjzO6Hnu6Yh7f/2glXf+ONx07MGnLONIfhO0tDSRkhyGnBADjwGFm5 tXRiajGKJL/cM6vB1FBYE/qa5JB9AXoGmCkyGyfgmrVmYELyp8aujweDt/OadbDcn0rX 3VJGPN0yHsxWa7jvk9xbTXVzWYtmRBul48xwPxsGfxobxf/A1VO4KJPRPOIp+CTmHyU4 0a0V4XWcW0MnEu5QYIll00hSt8NMvwbx/5Hox2LM4aiCtO5aZfL+vkI9NcgxmUIVejWZ lp83o1OYa3Y4UmE44h4x4CdU3iT+OYZ5L7lnn9C8PvuqH7a4Z/fP5q5EgvaD3u+H+UBh jeug== X-Forwarded-Encrypted: i=1; AHgh+RqXGfaUsOKi/+QxfbbHopZzevQ5C00gD2VghbP5nL+d0g/CmOpSe2u0SXnNEIO3QkywaT94XIbQzgo3Rfw=@vger.kernel.org X-Gm-Message-State: AFuF++kTTL+iAljPTT1/n+8ZST8P9nMBS6xidwaqZjVSCglhbvefc1uM aIViVUPbL6xNqmiLF5XuyzA7iR7q5uwnjfr6ncXOBPyRSBFZrJmlM2hDwjoZVknAn9d4aUKe+8f yXnEQWAWkDiX79RMBD51QEHVEY1yxxQi1JLhBl9Uanl7yVy9Qes+CN3N1nCqq50khb5I= X-Gm-Gg: AR+sD10B88qWyEkSD6qv8Hs/1mFGZ1FjTEhHQp1h18yC53zLiuJMKUkpw/fmrRQmUug PA/VUL663RifrKP64yoDf5GbBezv9eTBnmqHb9cyN+DtlAtd3FilgM3atEis7LeF6D3ssdbjc5z lrV5L17KpyfVHhwGIlPiSiDdQj9iq6Lb00HsX9ws4GYmkEebQYrU3951VaPk4zk0zvzb6RCMVO2 O2KCSzbips+aQamfaV4xq17Q17KnfDMVFoPKsjrGCkxmOrzNanO0hrbCscCQIpFeCLbANojKpcd 7K3sW18UarrYCpreL4R6VxOc36QR7tyxn0NcxrHKQKJ3TgWKhn9hvA/wkCrK1ZtfpE28TqDX7fc ve4d4PPVlMavtUr0C1cXO3DY= X-Received: by 2002:a05:622a:11cf:b0:51b:fcc1:a0b7 with SMTP id d75a77b69052e-52e2ec51619mr141529301cf.8.1787742971900; Wed, 26 Aug 2026 04:16:11 -0700 (PDT) X-Received: by 2002:a05:622a:11cf:b0:51b:fcc1:a0b7 with SMTP id d75a77b69052e-52e2ec51619mr141528711cf.8.1787742971326; Wed, 26 Aug 2026 04:16:11 -0700 (PDT) Received: from [127.0.1.1] ([178.197.219.214]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-6a5de8ea6d0sm4577843a12.13.2026.08.26.04.16.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Aug 2026 04:16:10 -0700 (PDT) From: Krzysztof Kozlowski Date: Wed, 26 Aug 2026 13:15:54 +0200 Subject: [PATCH v6 02/10] dtc: dt-check-style: Drop stray backslash before quote for continuation-alignment Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260826-n-dts-style-checker-continued-v6-2-f270b1e81f8e@oss.qualcomm.com> References: <20260826-n-dts-style-checker-continued-v6-0-f270b1e81f8e@oss.qualcomm.com> In-Reply-To: <20260826-n-dts-style-checker-continued-v6-0-f270b1e81f8e@oss.qualcomm.com> To: Rob Herring , Saravana Kannan , Krzysztof Kozlowski , Conor Dooley Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Krzysztof Kozlowski X-Mailer: b4 0.16.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=2119; i=krzysztof.kozlowski@oss.qualcomm.com; h=from:subject:message-id; bh=Q/J7FN7gGPyhDSdt/FQ/VZn0+1FY2L615paV5EC6nxY=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBqjsrtzlh7ve901Bh0v3qQZe2bZ/ysv800fqaQo BZITNB7KJqJAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCao7K7QAKCRDBN2bmhouD 17WND/0Utn8JGRqE9MCo6Ot6oqZnM0JI4P+EZKTkutGHOFqIIwi44Xl3NkdplMRTImCW4wzuzRp EZVWLp+xKyCETOUI8PJsaGCweMAeAvlfQL14vOzUdbJwpUyCtnaNuCM9WOJjg4auDU7+1+Dtc7q jcnNgrA8AjXrb4V7GquswcQ0fmNQAu8SMXKRiz37XPg1yqLQJXVGNdghTRAw+YZupwZbSJRo7Gd kGihElHA7uUPogdQZTOjFfcswy4qqbDn+BFl5UqWlNy3zAl/jG/RRxKDoRw+6Vg2YKfCuSG1eJ3 B7Us+Y5PHtF+z5x1jIz6DqYv/4HYxRchSsVfMkXrIi4R0sRxrpOhYMamQJGn6zH6SlpXL+IU4Hz yevBkzlkBjIHMr0Lk0YY2lECqqSE8dLJHhPLvtQrUiIOPg9UUXltNInDWqWbb6z7GyFevV7lbRR idsmyhj7rII3a/zXRClrqutI+IxJyyeEUfo5xtltBpGgdDA5M+vmmfNNRifEj1DsqSEK8iNNTk3 eAW8ZRQgCQFk6CxkZ8ynGsKJGmigxhnkRjqQvXGAp8xZdNPxxODfI/f8vCO89SmTCvcpNQgylzY r5Z4U/a7jUkRN+avbPknHgIMkY5WMKdN62ZoDK1Sh8eg0+uUsKRo+wyINZKhKqU1jSC6IIjpiAp Pl1Dwl1v3Fun9Lg== X-Developer-Key: i=krzysztof.kozlowski@oss.qualcomm.com; a=openpgp; fpr=9BD07E0E0C51F8D59677B7541B93437D3B41629B X-Proofpoint-GUID: 74N8EbZclPCyP3w6uuanSRWzbR95b408 X-Authority-Analysis: v=2.4 cv=FPMrAeos c=1 sm=1 tr=0 ts=6a8ecafc cx=c_pps a=JbAStetqSzwMeJznSMzCyw==:117 a=+bKQE0WJfmhK2875HamI0Q==:17 a=IkcTkHD0fZMA:10 a=Sv0fKeRqtYgA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=3WHJM1ZQz_JShphwDgj5:22 a=EUspDBNiAAAA:8 a=gm1a3DUOUa9zjCqAlRYA:9 a=QEXdDO2ut3YA:10 a=uxP6HrT_eTzRwkO_Te1X:22 X-Proofpoint-Spam-Info: AW1haW4tMjYwODI2MDA5MyBTYWx0ZWRfX/Yvls6TtNtV/ mQVFqyJxdji4Ub4aYYupoAkm0FOpM3ETJuwXT9dI/YwjDC4vus3Yz85sqZdQQGD9H3HBV20iXAI nFBLLoezKzSVM74ye92fYSFMCHw41TQ= X-Proofpoint-ORIG-GUID: 74N8EbZclPCyP3w6uuanSRWzbR95b408 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwODI2MDA5MyBTYWx0ZWRfXywNaACAf+dFa /XzwkwY8+tQo7CYE2dyvTkFebxqS1b+M+bd5YRX04dMtkjpwntLH1Rdrsvf+8Ogv+0YEP8PAR/f NDeADAp4ScIe5NzujHgE2FpvIcK3lCV68eaiv/F20iH72fMLABsew8Esu1F2iunBAKvc+qCqUfg 8wrXenD1gD9lfNrx0OwxDnoqiNQNTKMWDymUFDMa8SgkxC8GUyPBeFFPWQviRMrHgP5I8HegDPy yZnIJiTYuPxmuVgKAmO+GQ003bMcoDBhX45aUhqQC8j27vF5XyjbopkYodVFTDVQOqCqRKDwQS3 COFCElZkS9681Im5PRegaO4Li3QGExa5DjL+fsdFgrb4AKO2G8koBRj00Dhya+ib/sHW+uoGfX0 ZYKAxt43MOVZ65jQ5f4aDyR89Sw1zrSgNXzvTT7BE9MSmf4XSnsRWElgWXN0l445Kmo89DihW+h +tTWZREpwV7ZEFg89oQ== X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.134,FMLib:17.12.100.49 definitions=2026-08-26_03,2026-08-26_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 malwarescore=0 priorityscore=1501 clxscore=1015 lowpriorityscore=0 suspectscore=0 adultscore=0 spamscore=0 phishscore=0 bulkscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606150000 definitions=main-2608260093 Drop stray backslash before the quote character in a warning for continuation-alignment rule: (under "<" or \"). Since the '"' character has no quotes, drop the quotes also from '<'. Signed-off-by: Krzysztof Kozlowski --- scripts/dtc/dt-check-style | 4 ++-- scripts/dtc/dt-style-selftest/expected/yaml-cont-align.yaml.txt | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/dtc/dt-check-style b/scripts/dtc/dt-check-style index 5a9985baa051..22e1ceac7f8b 100755 --- a/scripts/dtc/dt-check-style +++ b/scripts/dtc/dt-check-style @@ -948,7 +948,7 @@ def check_continuation_alignment(ctx): if _display_col(cont.indent_str) !=3D target_col: yield (cont.lineno, 'continuation should align to column %d ' - '(under "<" or \\")' % (target_col + 1)) + '(under < or ")' % (target_col + 1)) =20 =20 def check_unclosed_block_comment(ctx): @@ -1052,7 +1052,7 @@ RULES =3D [ 'lines must not exceed 80 columns', check_line_length), Rule('continuation-alignment', 'strict', - 'multi-line property continuations align under "<" or "\\""', + 'multi-line property continuations align under < or "', check_continuation_alignment), Rule('unused-labels', 'strict', 'every label must be &-referenced in the same example/file ' diff --git a/scripts/dtc/dt-style-selftest/expected/yaml-cont-align.yaml.tx= t b/scripts/dtc/dt-style-selftest/expected/yaml-cont-align.yaml.txt index b5576dd0f6b1..c0801c56d5db 100644 --- a/scripts/dtc/dt-style-selftest/expected/yaml-cont-align.yaml.txt +++ b/scripts/dtc/dt-style-selftest/expected/yaml-cont-align.yaml.txt @@ -1,2 +1,2 @@ # mode=3Dstrict -bad/yaml-cont-align.yaml:29: example 0 [continuation-alignment] continuati= on should align to column 11 (under "<" or \") +bad/yaml-cont-align.yaml:29: example 0 [continuation-alignment] continuati= on should align to column 11 (under < or ") --=20 2.53.0 From nobody Mon Sep 28 04:56:12 2026 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 29DB13E5EFD for ; Wed, 26 Aug 2026 11:16:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787742987; cv=none; b=a0Ar+FcRoYf3JvXLRmPVDPJTQ00Wy1FGUBBjio/lFgQFL5YD/jfRMJcdcKcOwWZXJYx9ff6sfiGKl2twvxbyJVTuno3z3QIOP52lGb75Vpql8fscgAlRUosUdGSDIyinNZCQx8ZJ0vZlGhtH0+4MKG54N3Ih2CRraCa/dD904zM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787742987; c=relaxed/simple; bh=vUywCdt9f5EiGeQ9MbdCyKVHrE9ryco4S02U67mU+54=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=e5s1ACba/THRNYMfzSspJ2nJtRmiRC2Jp+4HYMVbFtlAgPWpV8o8Z+LcRTl2xWqF2Y5tb3FXVihCPjC2X2RgADvdO8f+aIPVLxeT/+1qEgIl/HLwd3cqpxRKmT0VnEaZXNrCK3ADtNWpmrN198AOVX70XfRoOrqLsuB2LZfVnCc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b=caj7VnVA; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=jC8mTS8N; arc=none smtp.client-ip=205.220.180.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b="caj7VnVA"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="jC8mTS8N" Received: from pps.filterd (m0279872.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 67QAGp59107561 for ; Wed, 26 Aug 2026 11:16:15 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= LjRoNeoFbcKwdkt38RcjtODM1aSosiJ7EB/zrpSw2Wk=; b=caj7VnVAxRlUSffw SFB+VWPhkpPclHwMMlXy0YxE1yQq4vOhAWutFnq/1290tC7jIKKjDrX/0kqtFOJo xBnbyjx/aUywxxlbouv9PNsgOoOQrUgcCKgd5GfGJ0O7MlEbdb36mpwKssNOpAoX nqzLdFq2ylSCZcfkfLCqnO3J8c1moAOWF8VoxRQfJt0SMqBOWDkH/MAxLsSm+e0+ FOf08XQhWz/vzTWP7E9Q8+U0Uxc0Haf8gAsHeD2p7/X9Q5zULikerf8cNCDPY24L 8s3avKUbUPZGmW7eQc3/V4Enf6jxQ/SSDGlS147AanoHMnF5QU8TvH9yE1NOoBbz /401AA== Received: from mail-qt1-f199.google.com (mail-qt1-f199.google.com [209.85.160.199]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4g9s9g9hj9-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Wed, 26 Aug 2026 11:16:14 +0000 (GMT) Received: by mail-qt1-f199.google.com with SMTP id d75a77b69052e-51c0408254aso23928231cf.0 for ; Wed, 26 Aug 2026 04:16:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1787742974; x=1788347774; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :content-type:mime-version:subject:date:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=LjRoNeoFbcKwdkt38RcjtODM1aSosiJ7EB/zrpSw2Wk=; b=jC8mTS8N/RSmnn3nnqVDhpn2OsPRKznjE1n0kNhTwzLy+kc/eHYUVcjABA0USPVS44 DA0X77GdcbBlKdNcF4slx+8hugS3EN54NMm5+rJrGqTsb8AasUMDiJ9FF8AApyM729i5 OUkvSOdZkQ1t/orvtA3wvTENs5/St9uPP9/dQUkRuPK/etnV9xbm7p8dYY1LvNW+BRuL CmRrLKqRLzAP2Y1+KOhE5IwAN6X0DzCLn3OHUdzRrVXdF3iw2kzMKDAZ9NK2TzXy7guG p4VGQMD+1BlF5ahPaY03b8TXQ9mdPGnEg68lKBZEd497rZLH1YXgY2Oqw/azvPiNnBeq 2Jng== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1787742974; x=1788347774; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :content-type:mime-version:subject:date:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=LjRoNeoFbcKwdkt38RcjtODM1aSosiJ7EB/zrpSw2Wk=; b=hWSDVpup+nb2jmW9abzQm1RV/Ex6BrMICMxCPpLVDJGc/8dPiZspUmYvSqG7DLpXKO t+Qnp6E0MJutPqVcKXpj2+8NITTQweK4ewdLEScmUjKInEf2zMXQ+zDdrDGXY0GV6LUZ lEq4JP+QB4aXZ/pc1zkb3qyNFPjrZgfYJCrvRROiqea0SF+Mu/fhWXRJ4E6xiOU08UcM 4LCAE9iP+ltMSWHHCvxIT1McZdmPTGaf2OUJsFUvk1Cnp34AG6a6rztPhsL1r1TtGiUf xsnNHEOvYMwlT0IP4S3wGGpqR+FqWqrlRF+whtYi972gtxgh9KXj/hb9iIgCfMptHmC1 NyuQ== X-Forwarded-Encrypted: i=1; AHgh+RppwP8kyfu/u80EAd3VegNAKI3LOFiomq+CK0UWWCenLF7JFam74YoVrqn2JiU1Y9qsO5UviN7rCbPPi+E=@vger.kernel.org X-Gm-Message-State: AFuF++msT4bzbq2Jp44haWosoAmj5OS+jJMXRH6KohuR9kfh2I19w/eF gXm5LzPltKA3yQX1dOeraGmWoN8zVOpfpXL3SG1CbQ+OHQt8PoX9XVEpJ3E78+uzxJ6/qRvmr6G AsqlYiO6L5fWLcfJzpEX194k69RUCedfGA9q2Xgla2qd0OsK5O+RITGMrFaFZUIQezqI= X-Gm-Gg: AR+sD110GTf58Sjw4r6bxlB6WfDkQ44JJLkO02CgMYR4UrHYLEIpU7uA+Mjc+Z1ilkl G30xGUg0vcvuxtRfw787gpqC+bXirD6ahbK/RfiFwPp7RS6jKRPgqvedtwqdrH0PVtEXTYGSbza DEzFejHb5Rr16/+GGD8oTTmUKCTQPokteRW64HfKbGTzT4i0Wzhx24B7HIica/F8JC+IcD24ra+ hbHClzg0zUFZBeQET+mDIUF4CEOfMToklsoPIPOEvTyb67oJI/bFh5jl+2tpT9JOjKhTKi9fNr8 NaMkvOYuXea9a1bESkqDQMkw94M9DaCaiDqG6DZ15O6IgoAcY/98W20MhQy7HG/tJDbx2MEleLu O/Ie+5cVmDbYpIAsXgJQp4g0= X-Received: by 2002:a05:622a:1e0d:b0:50e:474a:47e1 with SMTP id d75a77b69052e-52e2ecc147amr158271261cf.10.1787742973852; Wed, 26 Aug 2026 04:16:13 -0700 (PDT) X-Received: by 2002:a05:622a:1e0d:b0:50e:474a:47e1 with SMTP id d75a77b69052e-52e2ecc147amr158270021cf.10.1787742973119; Wed, 26 Aug 2026 04:16:13 -0700 (PDT) Received: from [127.0.1.1] ([178.197.219.214]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-6a5de8ea6d0sm4577843a12.13.2026.08.26.04.16.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Aug 2026 04:16:12 -0700 (PDT) From: Krzysztof Kozlowski Date: Wed, 26 Aug 2026 13:15:55 +0200 Subject: [PATCH v6 03/10] dtc: dt-check-style: Fix alignment of values in continued property lines Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260826-n-dts-style-checker-continued-v6-3-f270b1e81f8e@oss.qualcomm.com> References: <20260826-n-dts-style-checker-continued-v6-0-f270b1e81f8e@oss.qualcomm.com> In-Reply-To: <20260826-n-dts-style-checker-continued-v6-0-f270b1e81f8e@oss.qualcomm.com> To: Rob Herring , Saravana Kannan , Krzysztof Kozlowski , Conor Dooley Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Krzysztof Kozlowski X-Mailer: b4 0.16.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=10257; i=krzysztof.kozlowski@oss.qualcomm.com; h=from:subject:message-id; bh=vUywCdt9f5EiGeQ9MbdCyKVHrE9ryco4S02U67mU+54=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBqjsru9LAxBtdKQCyaE8ACS18ZzMiUCfhdCv250 jrU27YpRIeJAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCao7K7gAKCRDBN2bmhouD 1zP5D/9FatNHQ4AWj+5Z207jVRneW0bteQ6g5kFCyeEmU9/KfdP3lJ+tk59YkhGhfbPurCAxP3U QhQEs0Plw+7BPpCGXqEr2PCqVegvfS7L/6EPRsUlWZ48MM6BAS2OssINx2KMzbbPMhb8EOMUid3 d6Ugo50HrxuIX2e/qvur6M22/yWNHtdFBKr9I7CVhQS3MK8afbMtLDpVxZvRnlCXwDfNV7Cq4eu ajb86Tj5a0jie1qcj60u8VL4vyxBMImIbFslSoIbEw0DC1TrhNSmS6AjYZ5waoHrWU8jE+EhPkC TfUlAikba3lTHqP6lWnfczWRCcgjzaIHaSFHJ6XM7eREneL6zAayuoCevaszRSLB/vTeQz3rx07 qZsdJNzHj6UBDnlPoOk/CkigiZzCDnWS3aAvF+wvSXmK1ry+BoG9d7GnHig0OH7nH1wR3xY4pNO k9hhaxf1QFu+PVsutdZH10qqKqZVLtauTF+a4ddS49kg5p95B+kES8ByFfmMzFM5KMGN6ZMwVP3 yzUOmF47FCi/SJ+8mzU5cZ1VvCNZi1fVxpq0IKwj7l683i3sQg1WOFz909LSYmU35+fUF7rglAQ GsGi+Q+4Og7Ri/6wPU1fgzH7m2DqjGrMJmDOPKFbv1+kX8AAD09x1vKDCZim1o124l56uQPzWOw q6XV0g5f9SDyQmQ== X-Developer-Key: i=krzysztof.kozlowski@oss.qualcomm.com; a=openpgp; fpr=9BD07E0E0C51F8D59677B7541B93437D3B41629B X-Proofpoint-GUID: 4gsOVqzPZ2vpYsODjdUiu_5j-qd4iNRs X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwODI2MDA5NCBTYWx0ZWRfXzxW1ud/hPJXF s43dty8Ww5+DThFDYb8l7lYeHppVOb0eVlGSKQv09CVD+BK+22GjGPhIqC+cMeUL2XcVfTJ3nfV uBkTp+xmU9aYLAlciiyqxgdEL8q3kczdJr1d3lJ/3IzjaqUNfbpgzzS5rfcZsM/d1p4HRekC/Y2 IfwQiGwpAMpM+Rwo6flqQblXiVcP9uxueI81gJU6IORv2VT3c3H839LYglDkMFXg8G0LwRmkGt8 1RIl9caphwGc4SjfqsAH2BG2Mb2kHF9IxZmO4QmLgs5C5aOP3IbEXFrkOSiiti1W7uQXuNH/JGt AZkys10pPVzaLddmfkAJzw+5d0n3+9j3vSVzTyhwbAGmzvNf1QD5cIdo8DmmXXH5UxsZouva4V0 SR/GeBancur4zIQkjgtqAOmT/sMKJFFjixBO2/qfBE7cSWRq81LthF5kjrc1L9PYlqbRfakxlWJ nx/xu1PsLhrj90MaNNA== X-Authority-Analysis: v=2.4 cv=Xfq5Co55 c=1 sm=1 tr=0 ts=6a8ecafe cx=c_pps a=WeENfcodrlLV9YRTxbY/uA==:117 a=+bKQE0WJfmhK2875HamI0Q==:17 a=IkcTkHD0fZMA:10 a=Sv0fKeRqtYgA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=yx91gb_oNiZeI1HMLzn7:22 a=gEfo2CItAAAA:8 a=EUspDBNiAAAA:8 a=A1X0JdhQAAAA:8 a=hSPt3AOBSVI_F3cxmAoA:9 a=QEXdDO2ut3YA:10 a=kacYvNCVWA4VmyqE58fU:22 a=sptkURWiP4Gy88Gu7hUp:22 X-Proofpoint-Spam-Info: AW1haW4tMjYwODI2MDA5NCBTYWx0ZWRfXxvlFUw3Q+tik /zuK/eF0LpXHjrsww6CjBNVC8xqaj4+CV2NVveWykq1pwO/wVHt6CtBR9D4hZ4FPsQwBfawqh9S iv6wVOW2nbPOFvuBTR/Y6TU7PZnWwOE= X-Proofpoint-ORIG-GUID: 4gsOVqzPZ2vpYsODjdUiu_5j-qd4iNRs X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.134,FMLib:17.12.100.49 definitions=2026-08-26_03,2026-08-26_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 lowpriorityscore=0 phishscore=0 suspectscore=0 priorityscore=1501 bulkscore=0 clxscore=1015 malwarescore=0 adultscore=0 impostorscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606150000 definitions=main-2608260094 Continued lines in property assignments should be indented to opening '<' or '"' if they also start with that character, e.g.: reg =3D <0x1000 0x100>, <0x2000 0x100>; If the continued line is part of previous phandle, then alignment should be to inner values to make it more readable, e.g.: reg =3D <0x1000 0x100 0x2000 0x100>; Signed-off-by: Krzysztof Kozlowski --- scripts/dtc/dt-check-style | 32 ++++++++++++++----= ---- .../dtc/dt-style-selftest/bad/dts-cont-align.dts | 26 ++++++++++++++++++ .../dtc/dt-style-selftest/bad/yaml-cont-align.yaml | 6 ++-- .../expected/dts-cont-align.dts.txt | 10 +++++++ .../expected/yaml-cont-align.yaml.txt | 3 +- .../expected/yaml-value-ws-multiline.yaml.txt | 1 + .../dtc/dt-style-selftest/good/dts-cont-align.dts | 13 +++++---- .../dt-style-selftest/good/yaml-cont-align.yaml | 32 ++++++++++++++++++= ++++ 8 files changed, 104 insertions(+), 19 deletions(-) diff --git a/scripts/dtc/dt-check-style b/scripts/dtc/dt-check-style index 22e1ceac7f8b..eb5045f0ad9e 100755 --- a/scripts/dtc/dt-check-style +++ b/scripts/dtc/dt-check-style @@ -926,10 +926,11 @@ def check_line_length(ctx): =20 def check_continuation_alignment(ctx): """A multi-line property's continuation lines must align their - first non-whitespace character to the display column of the first - '<' or '"' after the '=3D' in the leading line. Display columns are - used so tab-indented .dts files (where a continuation aligns with - tabs plus spaces) are compared correctly.""" + first non-whitespace character to the display column of: + 1. the first '<' or '"' after the '=3D' in the leading line, if contin= uation is with '<' or '"' + 2. the first value, if the continuation is still the same phandle. + Display columns are used so tab-indented .dts files (where a continuat= ion + aligns with tabs plus spaces) are compared correctly.""" for dl in ctx.lines: if dl.linetype !=3D LineType.PROPERTY: continue @@ -938,17 +939,26 @@ def check_continuation_alignment(ctx): eq =3D dl.raw.find('=3D') if eq < 0: continue - # First '<' or '"' after '=3D' - rest =3D dl.raw[eq + 1:] - m =3D re.search(r'[<"]', rest) + # First '<' or '"' after '=3D', but ignore comments and strip trai= ling + # whitespace (e.g. remaining after removing the comment) + rest =3D _strip_strings_and_comments(dl.raw[eq + 1:]).rstrip() + m =3D re.search(r'\s*([<"])', rest) if not m: continue - target_col =3D _display_col(dl.raw[:eq + 1 + m.start()]) + dl_value_complete =3D rest.endswith('",') or rest.endswith('>,') + target_col =3D _display_col(_strip_strings_and_comments(dl.raw[:eq= + 1 + m.start(1)])) for cont in dl.continuations: - if _display_col(cont.indent_str) !=3D target_col: + target_offset =3D 0 + err_msg_explanation =3D 'to < or "' + if not dl_value_complete: + target_offset =3D 1 + err_msg_explanation =3D 'to the value under <' + if _display_col(cont.indent_str) !=3D target_col + target_offs= et: yield (cont.lineno, 'continuation should align to column %d ' - '(under < or ")' % (target_col + 1)) + '(%s)' % (target_col + target_offset + 1, err_msg_e= xplanation)) + # Align to the value within <> or "" of continuation (so the p= revious line) + dl_value_complete =3D cont.stripped.endswith('",') or cont.str= ipped.endswith('>,') =20 =20 def check_unclosed_block_comment(ctx): @@ -1052,7 +1062,7 @@ RULES =3D [ 'lines must not exceed 80 columns', check_line_length), Rule('continuation-alignment', 'strict', - 'multi-line property continuations align under < or "', + 'multi-line property continuations align under <, " or the value = under <', check_continuation_alignment), Rule('unused-labels', 'strict', 'every label must be &-referenced in the same example/file ' diff --git a/scripts/dtc/dt-style-selftest/bad/dts-cont-align.dts b/scripts= /dtc/dt-style-selftest/bad/dts-cont-align.dts new file mode 100644 index 000000000000..5390ebbf4059 --- /dev/null +++ b/scripts/dtc/dt-style-selftest/bad/dts-cont-align.dts @@ -0,0 +1,26 @@ +// SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +/dts-v1/; + +/ { + compatible =3D "example,test-board"; + #address-cells =3D <1>; + #size-cells =3D <1>; + + interrupt-controller@10000 { + compatible =3D "example,intc"; + reg =3D <0x10000 0x1000>; + clocks =3D <1 2 3>, /* comments with " < , should not matter */ + <4 5 6>, + <7 8 9>; + interrupts =3D <1 2 3>, /* comments with " < , should not ... */ + <4 5 6>, + <7 8 9>; + pinmux =3D <0x01 + 0x02>, + <0x03 + 0x04>; + power-domain-names =3D "foo", + "bar", /* comments with " < , should not */ + "baz"; + }; +}; diff --git a/scripts/dtc/dt-style-selftest/bad/yaml-cont-align.yaml b/scrip= ts/dtc/dt-style-selftest/bad/yaml-cont-align.yaml index 92778540b056..ccf443173dca 100644 --- a/scripts/dtc/dt-style-selftest/bad/yaml-cont-align.yaml +++ b/scripts/dtc/dt-style-selftest/bad/yaml-cont-align.yaml @@ -25,6 +25,8 @@ examples: - | foo@1000 { compatible =3D "example,test-cont-align"; - reg =3D <0x1000 0x100>, - <0x2000 0x100>; + reg =3D <0x1000 0x100>, /* comments with " < , should not matter */ + <0x2000 0x100>, /* comments with " < , should not matter */ + <0x3000 + 0x100>; }; diff --git a/scripts/dtc/dt-style-selftest/expected/dts-cont-align.dts.txt = b/scripts/dtc/dt-style-selftest/expected/dts-cont-align.dts.txt new file mode 100644 index 000000000000..a7ed62677a2b --- /dev/null +++ b/scripts/dtc/dt-style-selftest/expected/dts-cont-align.dts.txt @@ -0,0 +1,10 @@ +# mode=3Dstrict +bad/dts-cont-align.dts:13: [continuation-alignment] continuation should al= ign to column 26 (to < or ") +bad/dts-cont-align.dts:14: [continuation-alignment] continuation should al= ign to column 26 (to < or ") +bad/dts-cont-align.dts:16: [continuation-alignment] continuation should al= ign to column 30 (to < or ") +bad/dts-cont-align.dts:17: [continuation-alignment] continuation should al= ign to column 30 (to < or ") +bad/dts-cont-align.dts:19: [continuation-alignment] continuation should al= ign to column 27 (to the value under <) +bad/dts-cont-align.dts:20: [continuation-alignment] continuation should al= ign to column 26 (to < or ") +bad/dts-cont-align.dts:21: [continuation-alignment] continuation should al= ign to column 27 (to the value under <) +bad/dts-cont-align.dts:23: [continuation-alignment] continuation should al= ign to column 38 (to < or ") +bad/dts-cont-align.dts:24: [continuation-alignment] continuation should al= ign to column 38 (to < or ") diff --git a/scripts/dtc/dt-style-selftest/expected/yaml-cont-align.yaml.tx= t b/scripts/dtc/dt-style-selftest/expected/yaml-cont-align.yaml.txt index c0801c56d5db..eb9a84d5c222 100644 --- a/scripts/dtc/dt-style-selftest/expected/yaml-cont-align.yaml.txt +++ b/scripts/dtc/dt-style-selftest/expected/yaml-cont-align.yaml.txt @@ -1,2 +1,3 @@ # mode=3Dstrict -bad/yaml-cont-align.yaml:29: example 0 [continuation-alignment] continuati= on should align to column 11 (under < or ") +bad/yaml-cont-align.yaml:29: example 0 [continuation-alignment] continuati= on should align to column 11 (to < or ") +bad/yaml-cont-align.yaml:31: example 0 [continuation-alignment] continuati= on should align to column 12 (to the value under <) diff --git a/scripts/dtc/dt-style-selftest/expected/yaml-value-ws-multiline= .yaml.txt b/scripts/dtc/dt-style-selftest/expected/yaml-value-ws-multiline.= yaml.txt index 3df55b1762d0..d25b5b425e3f 100644 --- a/scripts/dtc/dt-style-selftest/expected/yaml-value-ws-multiline.yaml.t= xt +++ b/scripts/dtc/dt-style-selftest/expected/yaml-value-ws-multiline.yaml.t= xt @@ -1,2 +1,3 @@ # mode=3Dstrict bad/yaml-value-ws-multiline.yaml:25: example 0 [value-whitespace] extra wh= itespace inside <...> +bad/yaml-value-ws-multiline.yaml:26: example 0 [continuation-alignment] co= ntinuation should align to column 12 (to the value under <) diff --git a/scripts/dtc/dt-style-selftest/good/dts-cont-align.dts b/script= s/dtc/dt-style-selftest/good/dts-cont-align.dts index 36fb4eefcd83..b52ee6cccd8c 100644 --- a/scripts/dtc/dt-style-selftest/good/dts-cont-align.dts +++ b/scripts/dtc/dt-style-selftest/good/dts-cont-align.dts @@ -15,12 +15,15 @@ / { interrupt-controller@10000 { compatible =3D "example,intc"; reg =3D <0x10000 0x1000>; - interrupts =3D <1 2 3>, + interrupts =3D <1 2 3>, /* comments with " < , should not ... */ <4 5 6>, <7 8 9>; - pinmux =3D < - 0x01 - 0x02 - >; + pinmux =3D <0x01 + 0x02>, + <0x03 /* comments with " < , should not matter */ + 0x04>; + power-domain-names =3D "foo", /* comments with " < , should not */ + "bar", + "baz"; }; }; diff --git a/scripts/dtc/dt-style-selftest/good/yaml-cont-align.yaml b/scri= pts/dtc/dt-style-selftest/good/yaml-cont-align.yaml new file mode 100644 index 000000000000..2e7b8582bb7c --- /dev/null +++ b/scripts/dtc/dt-style-selftest/good/yaml-cont-align.yaml @@ -0,0 +1,32 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/test-good-cont-align.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Test fixture with aligned multi-line property + +maintainers: + - Test User + +properties: + compatible: + const: example,test-cont-align + reg: + maxItems: 2 + +required: + - compatible + - reg + +additionalProperties: false + +examples: + - | + foo@1000 { + compatible =3D "example,test-cont-align"; + reg =3D <0x1000 0x100>, + <0x2000 0x100>, + <0x3000 + 0x100>; + }; --=20 2.53.0 From nobody Mon Sep 28 04:56:12 2026 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 217AB3EB0E6 for ; Wed, 26 Aug 2026 11:16:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787742984; cv=none; b=Ajwl2TZxkMioD87hcgIL8TL4T1S7zFnJet95NOyOQ9HZJUeIOLGzE5NRGOh1tcP5AwJbl9Csq9uwH36k+JYZrO1slUr+9QL8xSCBTESGiH0kwvXcElmLAFGVuWUaVer31QlX/IMRQUCzBH9UpVj8/JfwC+531c1/W8DvHjVNLCo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787742984; c=relaxed/simple; bh=8gUwTUBHM0kNRCngutc0wZauetjjU/QmdyT5tUCooAc=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=AW94zrVSI9+UBIE6hqgY8bNTokdnTAPxyUOVj+w1pWbJXkDz7bPYMIOufuwD/5lHU67qV7JN7gA19RzzBfvQIR1CzdQsn6QR8ukd1TfGxqcHX4l76lY4Yk0FBL98sCa64E4TSgnhWi72cg+PPczsZFa9/CI4AwhBmLTAITArZ+0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b=Ie71J7WN; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=YKfgZj8X; arc=none smtp.client-ip=205.220.180.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b="Ie71J7WN"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="YKfgZj8X" Received: from pps.filterd (m0279872.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 67QAGq49107582 for ; Wed, 26 Aug 2026 11:16:16 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= w2BhHbjCShFcc39eD+zqk0lEY0YgOdp55BH3m0XXprc=; b=Ie71J7WNErd5M36P quW21xjlH+heGLAGxlu9w+0HDBnH62Kg1+mC/BMQM5XPnuJyWFPk5eLG6XwF1kuA eRUwJZJxpefPkuW9+ycw0xveX8gcS+YscJ4OkG0MUPwyFIOu1u1OBLmLIxkXyzLk /QZD0xEy2fTBryf6PR1eClBq5XA4SihMyY96w82XXg20RUCXG/3nkWEYqt362JUR u/bAqSQG4U9NluwKFbqqhvIwotivyn7OnmLO5PlHMzvn2Wu7O7Z4RnZwCeDA5ywF QtQ22pJB3hVmwMtw8F+sqBvEac7dfwxblB7ZmYGxq/EICSpTr1e6ADbNpbz+5rE+ MF2ETg== Received: from mail-qt1-f200.google.com (mail-qt1-f200.google.com [209.85.160.200]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4g9s9g9hjc-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Wed, 26 Aug 2026 11:16:16 +0000 (GMT) Received: by mail-qt1-f200.google.com with SMTP id d75a77b69052e-51c0408254aso23928771cf.0 for ; Wed, 26 Aug 2026 04:16:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1787742975; x=1788347775; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :content-type:mime-version:subject:date:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=w2BhHbjCShFcc39eD+zqk0lEY0YgOdp55BH3m0XXprc=; b=YKfgZj8XKab20TOMLTWJNW4/USC7eAMc90OR+Ei6peGQXF5M0MWyuiQR+/cLv8+Gke Z4BeqD0UARQ+eFUSVwIioFTppts1jGex2R92rU1HMfFxBAAWHfwSz67WsQlooVtFhYHT GgpWjkvIp52QPSQWXa98uitSWDF+u0w0GQsVWHToGayhMymEJafuRRPe05aZfHtBHCU7 7RT/6JkWSQRnn/qIGHsoNBH2TZ1zqWaW2bVRV8NK0fFLR175gS6M7FnW7pTjm9l5t5tt 1CXFCLIHH/611XcWv/OExSzeYZ5iK/uK//o9bLaQhpD7j+Tn7G69I7szG+njHBZL5rDc huMg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1787742975; x=1788347775; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :content-type:mime-version:subject:date:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=w2BhHbjCShFcc39eD+zqk0lEY0YgOdp55BH3m0XXprc=; b=CzUOMVNWncRZ9XIlOjcZCV0wuuChgxSJaH31TWF5FzHA6xUWt4gXTjI+Z7xl+h6ccj Xb+LBv9nGeisI4cQYtIzHv9xwekucUoQmgPw37T6pUoOAeEq7na5SZbhq0OWiUMtrlcA KyfH2Yweyz5gMGePyZJFvvMA+oe+axPpcX1yMQUg457sHAaJnHM2ZqJ6BbLShAqHkVfM +TPUyr8xyFxoiTCE/akhToKaHDNeGNBv5pUdPbnaBuuLsReWg1XJ3MHPbkUhdX5XNSPj i7E79R3N+FBClIWEtYAz4B85tbiho1vrYwO6aWdr2j2pXIg19BZ38V6ZsmV+7GQJcb9T OTJw== X-Forwarded-Encrypted: i=1; AHgh+Ro51+9UWKSYVC1Jujj41tPP9tP2NMCeRjUy6uyU/oJqjBRpAz9IFbk76uT8CyZLibCcTKXCfVtuzh+N+YQ=@vger.kernel.org X-Gm-Message-State: AFuF++n07UArE/hJ90Zx0qxZeoRnuM0vAWuIWumWl4pynPViIOWpDZFN Esktr1PnqyvGVWz+NCre/514cOPHPi3z0cNRtCHL5s+s4PAv75/7FYz52oqSirChzbdQB2h4kgT DNLa6YTqcNj6HXF6H3Ejmb74ZXkAppcOb5Hv/ZApW4WeL174FupSnBxgnSjVMShExEpg= X-Gm-Gg: AR+sD13a1j0P3FUSKAFjGgQ50Ox/jUrEmLGt3t5XXxUjtt1IHxxWRqiMbFMlLzVMRWI FQ3Z3dO0mvPP23wvMQccWQbzLomsTOlZz0rBBd4OE2g7o95alXCr6ryjMyC/sfwYNHxx8t2YzTd KaDFFrpONOxmY8Rr8Czjzd9atxPVADUMurDyrV86lYnA4CZWsPzXWG7xRrC+ToZNEnTViG86pVZ Q/ZN3agb/V0U1r4sUO4F7WVPFGgtsZBpZFY85wm/5hY+eX+4lezhGJnfbazXKUsMN5jT15lVHip jyBUtlurDuP4k6yOgaV8zCpyqdYrgJ3kLNpPbiBvG14us31dA747XiHks1iPq9ksCEYQoRPz+Uv Wh86keglHxJZ/2XsmVvV6b5g= X-Received: by 2002:a05:622a:cc:b0:516:82e2:7788 with SMTP id d75a77b69052e-52e2ec1e3c5mr123570521cf.1.1787742975389; Wed, 26 Aug 2026 04:16:15 -0700 (PDT) X-Received: by 2002:a05:622a:cc:b0:516:82e2:7788 with SMTP id d75a77b69052e-52e2ec1e3c5mr123569981cf.1.1787742974875; Wed, 26 Aug 2026 04:16:14 -0700 (PDT) Received: from [127.0.1.1] ([178.197.219.214]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-6a5de8ea6d0sm4577843a12.13.2026.08.26.04.16.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Aug 2026 04:16:14 -0700 (PDT) From: Krzysztof Kozlowski Date: Wed, 26 Aug 2026 13:15:56 +0200 Subject: [PATCH v6 04/10] dtc: dt-check-style: Consistently call 'kind' as 'file_type' Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260826-n-dts-style-checker-continued-v6-4-f270b1e81f8e@oss.qualcomm.com> References: <20260826-n-dts-style-checker-continued-v6-0-f270b1e81f8e@oss.qualcomm.com> In-Reply-To: <20260826-n-dts-style-checker-continued-v6-0-f270b1e81f8e@oss.qualcomm.com> To: Rob Herring , Saravana Kannan , Krzysztof Kozlowski , Conor Dooley Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Krzysztof Kozlowski X-Mailer: b4 0.16.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=3656; i=krzysztof.kozlowski@oss.qualcomm.com; h=from:subject:message-id; bh=8gUwTUBHM0kNRCngutc0wZauetjjU/QmdyT5tUCooAc=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBqjsrvWMHbv/g24lyW4B6vDZOp9OqkBLpH4iPLW YPeR43PpCWJAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCao7K7wAKCRDBN2bmhouD 1+k0D/4nIqpEUWqGVCGmdbhwLB8tx6uNHTICJmKnwbOzQ6hNJjBGLLOKQSRLB7RPYGxw0aPsDoX LVKSyPiwgl53RU1QAUaeFX7sHXH/8prS5m0NVd0iEnGrD9JN09BwcIMwKeU8/MHDZAqK9ZiWjPL CrIe1qWDrCFptgNjyhSJPIgrQZ/6Ex9pPL8Af9QK2IVzuEadyKuaILVYSxxN5BJEqkOQI6fylWP Vcl5SrJZDlXDw82otgdH9p3WBHtLgXT6ZI7GbZ7z3I5EXCOnp88QEhRYr1upBndX1GtPJJMv60Q V7QXK6Zw9Y3p+aTsU1H/F0WRSmt9XX4KcsFqZNA5JwLmAumGH72YiHFqaF3l6qQFvnu0VbfTNrh pqeQfG8JU9B0mF5tYeBz1cJg6hj6QqYQPwa1YcqC0ixjBmhQz6U4zP9wa7Ugr7C7Uvac/eEx6RZ 3mncEtUKdAXqeb6bq75u3BiYZAhrWXZopmR5u2gr0m7FdmYCIa22x1LYmqapZK8TQk0jfQ6nVRC QLYauPkdcyCYl0BcAjmCQlloY1zRfQia5vljEwAOyfyr1PgGU9aA7id/7Xkw2V646/1z5rul6aN Bfyqa9fxxwqVwdaRi+udspM6MxRQWHDMVkilbzZHX03SODc4jqQQJGIDoz9CgEVU+hk/zu9b33k NsXiYeHA1QjQz2A== X-Developer-Key: i=krzysztof.kozlowski@oss.qualcomm.com; a=openpgp; fpr=9BD07E0E0C51F8D59677B7541B93437D3B41629B X-Proofpoint-GUID: vBFxQvpPROZWpEJiB-Le9fgb9IL0wGST X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwODI2MDA5NCBTYWx0ZWRfX0+fUS9xnJab0 iys03huRk2739UMRaOipCYWaO1aAYY7N/MtgDoIvZrd4pbopr/E3I1RLKwiMkVl6JO+2124XIZd vyZeNOcwitTCHPO/HdCUUacxVC7C8lN4YB5Pn0D8TU+Y6WsJnEGFhO6b9gbuLMJ4T15iEFRxASf v6ZPO+wQbRB82T2s4iOU0Zpled0gyFKlKAntxI2j+wLaGbQuvjXTOpkEix0lh/r+DTJfXdZVYky deM1bHKa/Zp1lxaDYfFyNPWYwv4BFDDqE/hC6uSlzyI0eLYEeGeq/FxlJX7Yy3KnCl5yai3z71I yCt88R3Z4hzmUvphYIOZxdHw9Rn1GKUDEn8CccqrTPMWKhDk3gJ1J9XJF6Xu4j3AX8tCLZJmlTV auafe2KRtpWFC0H5qRWN/dn7tGJnLpvKK+jA3smC1yXhi+3ZUjngVHhNC1vfwNRI2yjwFqD8HSi b8/kDjbeBcHh4sByAEQ== X-Authority-Analysis: v=2.4 cv=Xfq5Co55 c=1 sm=1 tr=0 ts=6a8ecb00 cx=c_pps a=JbAStetqSzwMeJznSMzCyw==:117 a=+bKQE0WJfmhK2875HamI0Q==:17 a=IkcTkHD0fZMA:10 a=Sv0fKeRqtYgA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=yx91gb_oNiZeI1HMLzn7:22 a=EUspDBNiAAAA:8 a=6JaV1sFd9OF9Hac_-DgA:9 a=QEXdDO2ut3YA:10 a=uxP6HrT_eTzRwkO_Te1X:22 X-Proofpoint-Spam-Info: AW1haW4tMjYwODI2MDA5NCBTYWx0ZWRfX4ZP6J/99pQ7l kVYOTvJHbyb9uN1PdwjVmeWm/iVgLNQMa5Xuw48tQRRB/REx/RLTkZOezfriCbI6338rzGUBSTM sA1+uJFXFaQMY6AfpwKAHXFRTFcJIsA= X-Proofpoint-ORIG-GUID: vBFxQvpPROZWpEJiB-Le9fgb9IL0wGST X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.134,FMLib:17.12.100.49 definitions=2026-08-26_03,2026-08-26_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 lowpriorityscore=0 phishscore=0 suspectscore=0 priorityscore=1501 bulkscore=0 clxscore=1015 malwarescore=0 adultscore=0 impostorscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606150000 definitions=main-2608260094 Script was using different names for variables or attributes with the same meaning: the type of file (YAML, DTS, DTSI, DTSO). Unify 'kind', 'input_kind' and function input_kind() to consistent 'file_type'. Signed-off-by: Krzysztof Kozlowski --- scripts/dtc/dt-check-style | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/scripts/dtc/dt-check-style b/scripts/dtc/dt-check-style index eb5045f0ad9e..17332018d70b 100755 --- a/scripts/dtc/dt-check-style +++ b/scripts/dtc/dt-check-style @@ -314,13 +314,13 @@ def collect_labels_and_refs(text): =20 class Ctx: """Context passed to each rule check. Carries the parsed lines, - raw text, mode and kind.""" + raw text, mode and file_type.""" =20 - def __init__(self, lines, text, mode, kind): + def __init__(self, lines, text, mode, file_type): self.lines =3D lines self.text =3D text self.mode =3D mode # 'relaxed' or 'strict' - if kind in DTS_FAMILY: + if file_type in DTS_FAMILY: self.file_type =3D 'dts' else: self.file_type =3D 'yaml' @@ -1071,14 +1071,14 @@ RULES =3D [ ] =20 =20 -def select_rules(mode, input_kind): +def select_rules(mode, file_type): """Return rules that apply to the given mode and input type.""" rank =3D {'relaxed': 0, 'strict': 1} out =3D [] for r in RULES: if rank[r.mode] > rank[mode]: continue - if input_kind not in r.applies_to: + if file_type not in r.applies_to: continue out.append(r) return out @@ -1088,12 +1088,12 @@ def select_rules(mode, input_kind): # Block runner # ------------------------------------------------------------------------= --- =20 -def check_block(text, mode, input_type): +def check_block(text, mode, file_type): """Run all selected rules on a single block of DTS text. Returns a list of (lineno, rule_name, message) tuples.""" lines =3D classify_lines(text) - ctx =3D Ctx(lines, text, mode, input_type) - rules =3D select_rules(mode, input_type) + ctx =3D Ctx(lines, text, mode, file_type) + rules =3D select_rules(mode, file_type) findings =3D [] for r in rules: for lineno, msg in r.check(ctx): @@ -1150,7 +1150,7 @@ def iter_dts_file(filepath): # Top-level processing # ------------------------------------------------------------------------= --- =20 -def input_kind(filepath): +def get_file_type(filepath): p =3D filepath.lower() if p.endswith('.yaml') or p.endswith('.yml'): return 'yaml' @@ -1170,17 +1170,17 @@ DTS_FAMILY =3D ('dts', 'dtsi', 'dtso') def collect_findings(filepath, mode): """Return a (lines, count) pair for filepath. lines is a list of formatted output strings; count is the number of findings.""" - kind =3D input_kind(filepath) - if kind =3D=3D 'yaml': + file_type =3D get_file_type(filepath) + if file_type =3D=3D 'yaml': iterator =3D iter_yaml_examples(filepath) - elif kind in DTS_FAMILY: + elif file_type in DTS_FAMILY: iterator =3D iter_dts_file(filepath) else: return (['%s: unknown file type, skipping' % filepath], 0) =20 out =3D [] for text, base, idx in iterator: - for lineno, rule, msg in check_block(text, mode, kind): + for lineno, rule, msg in check_block(text, mode, file_type): abs_line =3D base + lineno - 1 ex_tag =3D '' if idx is None else ' example %d' % idx out.append('%s:%d:%s [%s] %s' % --=20 2.53.0 From nobody Mon Sep 28 04:56:12 2026 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4B8033E8C65 for ; Wed, 26 Aug 2026 11:16:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787742992; cv=none; b=SLNqfW92BZsXCRTttFxVkuU3k7VejY9RrwZrvJhSJUQje4fgTZULMBo9Me+eMI0h3qI1kTCN+ToVJn4dWb9tmcF7gTmqpoJh7x4B83vkU7dYQpbcqg7npHu4HcKQwAeogAviw7ZRRSxXw4g4ijrl0sXtQJWHyVJdxbIjxtBrfFg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787742992; c=relaxed/simple; bh=3Nd0Fr0aGx3HpTw4jpVEC5Dyy26W/9GDP5cqSBbH0Dw=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=jBLd4qJ7EW5FSOkd5I8X+3VbhfYUH75BZi5I9TvgJdF2BaxEbnebQU+IAsRooUC0q2XvZNwWQbxMig/aUpTAD5EkSyDIbgeVXpW3skUGjGrnyBfeILINIcLZsdldpQKKHdQprdJarJ1jLZrpnw0J7xqtSR1Zuh7OMSQ+gVJbTdw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b=Q9SQ7yQ9; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=NFsyiFWs; arc=none smtp.client-ip=205.220.180.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b="Q9SQ7yQ9"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="NFsyiFWs" Received: from pps.filterd (m0279873.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 67QAH6vE518618 for ; Wed, 26 Aug 2026 11:16:18 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= cAyDyrDvctbLkPSbfKW6yU7FKAJafZWcD+OUPP/lBeU=; b=Q9SQ7yQ95CFpMaUp 3OBUT5mBZwDo49k0sRVD1S/fhPZfOS3Zu7l8rufBD7a0P9zUVZTKPwAv3VjeiHaf gkfqeXg9aqpTktG9HmwZ77MrdtKD5HJ7+ic4WA4qpKQLP1q4cABIf0TPKkQocXAW o51BkuAAeXdU/XmPXxZNF1+aCWXcjAFk1n2KDZuxf/4EWbYMH2QHWphb4ODNZSEe YhP2fGuaR7afu2gyh3mToiB6diDr8DtlaD+EUBrHKxsFf3Vn7mhb/I6G/IXpNZ2f Qyis2OcUmXnfmG6vIF5vBsUw928xf+qOfDgdTlknJj30BjLj3PrW5N2brFvQZyrG QPxsRw== Received: from mail-qt1-f199.google.com (mail-qt1-f199.google.com [209.85.160.199]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4g9x2n087n-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Wed, 26 Aug 2026 11:16:17 +0000 (GMT) Received: by mail-qt1-f199.google.com with SMTP id d75a77b69052e-52827090cc5so8139771cf.0 for ; Wed, 26 Aug 2026 04:16:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1787742977; x=1788347777; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :content-type:mime-version:subject:date:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=cAyDyrDvctbLkPSbfKW6yU7FKAJafZWcD+OUPP/lBeU=; b=NFsyiFWsgI0sWE5V4veS9F6fZe29/vzoKPxuTxWnGlJ2XbFw9OMr8TOCgDvyR/dRRC Bh5chR6tTnrdiCXkvt4ZSMArg3Vjf9utBO2vKy4oY4TogLVTYztcJEt2mc1ULWSg0tYJ b3G2M8eGsK9muyEAe5mbomp8YMExgVCrQWConh0ex6ELhNk0AWSjto6whRHYK7jd0rVT m255ueS3X8qdC7/nRKezZWynOhAdcPzswD3kHuGDDv0OksS4SDhbVtNmUoAg4wadOkc1 uTjiBx/S2bFCxfmUIPSu6PufJ0rL7v4TDHkJywgrAEp6NEvclhqFYPq88diA9FZGyKIB uwRA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1787742977; x=1788347777; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :content-type:mime-version:subject:date:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=cAyDyrDvctbLkPSbfKW6yU7FKAJafZWcD+OUPP/lBeU=; b=gQxdr/ZOMwfLmY3ysl9UffoXJlY8A8Lc7BqwKFgVBvEjCb9zAkHbaepVjMDpuwn3XH exHUwzJPZhDbqEKLY8qafmON6kyTouBK3F40Pborn/6m663MAe5LABK1Fhaqc80ZZlKK o5BMeo78dAnHOiSUKXD7NhK3npmqIgBszt0hT3ENvk0cvBJCbZi+9oL9gGCgdW0yBHtQ PFUR6BpigFskfIkgX/p+AMvn5QGZVfIvpks+4IXNltYfH02vme/oaoK1bzqjGVNetmv/ RNdFovmelMvrnomSrNMPIzx6FwiJzjQyfdzkTF1oS3PCtE2h8VmggW6BvbN0PtNmLsfx 2+yA== X-Forwarded-Encrypted: i=1; AHgh+RrfrsCWxVoYcaczwCl5NabEs9YwEFWwkHDxnWftu3BovH8c3isT57yRkcaN9a21GT5Z7YylZhjxYn9vf1A=@vger.kernel.org X-Gm-Message-State: AFuF++nn/g8WT07GOwaX9hveO4gd0mWZEcJKqp9KEzeWQHbzr/+0fkdl kJNOobvnPxuhEvizzwOsC8AlxPQ7GaXPkwT+emhJp7szYlAVhNdylB/sT47DVOAmvdzblRkfPcq 6qXp9UEg1n7J1ewP117wAHr+TqxUaSyT+mIcweSOf1AqJzBjsV9v5A8dJAsXeSFriU6eDBZqJeR o= X-Gm-Gg: AR+sD12lCT8oyjwh8LG+RzaBZziPmUDGcRk4ewBNLolKLkcXVb4bc0fI0XW+c7eW0cf nBjHBZ6rzIl3EHU+1OIsUcRGP+mfq1dEmyxdARW0ELYG1m6VqRu2KAIxa6m1Lljg6ddQbABtEE5 6z5pRSVU7EdKuh42geTdKHjYt1y+cjZtW278skz/Lf+gJqbbo0X3ZL/hG9bPlux6ufL+KC0Z2D/ R+B1osQbqGt+GIlKJQLtJw02tAxHbd0L8o9dS2NWu2bqKyTPxsvILnVB8/jQkATGILRH7hRkglK 1CJIEG+frt40N3UuWdB2lecrhi8K1wQxxhr9p4smXNZRud/lKnamhQlxhRekECVhkFK4K5eHd1M d4wiFNr9ZN66bs466TB4RxNQ= X-Received: by 2002:ac8:5dc7:0:b0:517:146d:2cb5 with SMTP id d75a77b69052e-52e2ed58474mr122196391cf.20.1787742977024; Wed, 26 Aug 2026 04:16:17 -0700 (PDT) X-Received: by 2002:ac8:5dc7:0:b0:517:146d:2cb5 with SMTP id d75a77b69052e-52e2ed58474mr122195971cf.20.1787742976609; Wed, 26 Aug 2026 04:16:16 -0700 (PDT) Received: from [127.0.1.1] ([178.197.219.214]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-6a5de8ea6d0sm4577843a12.13.2026.08.26.04.16.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Aug 2026 04:16:15 -0700 (PDT) From: Krzysztof Kozlowski Date: Wed, 26 Aug 2026 13:15:57 +0200 Subject: [PATCH v6 05/10] dtc: dt-check-style: Introduce 'stricter' mode Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260826-n-dts-style-checker-continued-v6-5-f270b1e81f8e@oss.qualcomm.com> References: <20260826-n-dts-style-checker-continued-v6-0-f270b1e81f8e@oss.qualcomm.com> In-Reply-To: <20260826-n-dts-style-checker-continued-v6-0-f270b1e81f8e@oss.qualcomm.com> To: Rob Herring , Saravana Kannan , Krzysztof Kozlowski , Conor Dooley Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Krzysztof Kozlowski X-Mailer: b4 0.16.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=7477; i=krzysztof.kozlowski@oss.qualcomm.com; h=from:subject:message-id; bh=3Nd0Fr0aGx3HpTw4jpVEC5Dyy26W/9GDP5cqSBbH0Dw=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBqjsrwED/PIj1SIr12/lTGGIKqjD8NZ6Jv6c9DN mB76nRipTKJAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCao7K8AAKCRDBN2bmhouD 16OyD/4567ijsXhqs7RrCGE5TJryfVbSP388JH+KKqALidFOxyYZqEKBkqPwG0Gs3w2HkWGlw3J GDzPr1ukqg+jPdZtTPdpYq7rIGb/sLxgIpDzvYNbetbC+LWaU4CWaS5rtKupCsO8LsuufnKtpQA EMBs/RpZo11AHFfpYWDl+7dM8j0UUVHI50hytUNZgjjislPuCQK02gXPhvgqCCyZEyJK7PkHGWw PWo6QtnvGeo389YHCcsZM7SNhyWP3rZvEhRPiObvTV2y3tAu87Q6BQdVAaEVTvfWjO7jNtio3Gd S92PwqnfxRojvrZhaqGaMKciMA+vNUdFf4WMxEIqzbaxQuyWe0CRHnhhnaWINHU3tzqoZl9gfjk ZmADLAk1iRWUclE9mTt0gQ+NYpOqPZirMbVt14rOc+IjxyWQ6jMcrJ8eNsEPuLd7AI5Q+g3OJdw DihCU8+fU7iTiF2nsDXsw/XvTvpMqYAcpCOGPjwHKxQyNRIpm/Hyvl3pK/GYbvjxTzt3FPkyXWF Am/gTeVYH+SguiK0PhvMw+Cw9y8T3KjkNoZpxjwx95vKQNxFntqHwxEsXe7cO+ingnZxGcfDUB8 qiMprEMLjiZYLVtPKYtGq6sVNDK89vc8vsSSEr3fQGkA5kHDRq3Wyd20pK+5YbXHWP5qEhr+lWK 8PeLpGeRxA7OVYQ== X-Developer-Key: i=krzysztof.kozlowski@oss.qualcomm.com; a=openpgp; fpr=9BD07E0E0C51F8D59677B7541B93437D3B41629B X-Proofpoint-ORIG-GUID: 1pmdy7jB2VgnqfQL2_5U9fY2w2h5yyas X-Proofpoint-Spam-Info: AW1haW4tMjYwODI2MDA5MyBTYWx0ZWRfX1boNrlmXlsd+ da1x1bw3uk0gRT0XOuzkhHMaFrCRmp7eSoU8EM71sJfWRtRb5mHSpYlnoqpFYWhqs7mb613Onkv CyVQawui8qaG2XQWn9fDldZ1FB4JKns= X-Proofpoint-GUID: 1pmdy7jB2VgnqfQL2_5U9fY2w2h5yyas X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwODI2MDA5MyBTYWx0ZWRfXxNO3o7Q9Y7TL TvZ6GMJKZSORwXGtk6Qfl3BBFWaFLYxRP7SFHJE57+jN1qRRzEzvlgTiGgicNJJl4L7zl2DNMzZ u3ro9ZYK2X/ZyBsOcbDlw9Nuc/Brzr7Jh2m7D/gpdR82aSTDxV8xb0v636gO4cB45cIiRy18ZsG bbtUa2HrZl7RUeMW7F5Iu2NfwfAy8BFyNB8LcNvf+KFydwgr9hv4GIrrlJ9VP2odT49c31eRu33 WEc9ZQmQxK26b61bTK1q9LxKoX2XWSGjCiupzYZc2kykO5JrNULBzhyhdVUJjxOkYoDf+f/fZC3 +Q1N8B3t8NyQpPDk2XbI/t2QDiTwMzz1z49eppHCaVXHLQP+JhDYp6RZ75z9yQyDaF4zNVS1DXj /7kLtnzZJ/vszr48fbpQCr546FwNMfmNWD0iL3gpuHjBi+wwWWjqqW2BT6168fj5kGRwhpLdDdS sgpzgVUndc442BHyE6w== X-Authority-Analysis: v=2.4 cv=PPQ/P/qC c=1 sm=1 tr=0 ts=6a8ecb01 cx=c_pps a=WeENfcodrlLV9YRTxbY/uA==:117 a=+bKQE0WJfmhK2875HamI0Q==:17 a=IkcTkHD0fZMA:10 a=Sv0fKeRqtYgA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=rJkE3RaqiGZ5pbrm-msn:22 a=EUspDBNiAAAA:8 a=WUDqnpqoxdndseS9DjUA:9 a=QEXdDO2ut3YA:10 a=kacYvNCVWA4VmyqE58fU:22 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.134,FMLib:17.12.100.49 definitions=2026-08-26_03,2026-08-26_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 priorityscore=1501 malwarescore=0 lowpriorityscore=0 clxscore=1015 suspectscore=0 impostorscore=0 spamscore=0 adultscore=0 phishscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606150000 definitions=main-2608260093 Two rules, which are enabled in 'strict' mode make little sense for DTS: 1. line-length, limiting length of line to 80 characters: DTS often has a bit longer lines, especially for interconnects or heavily nested opp-level. Checkpatch already does not warn for exceeding 80 characters. 2. unused-labels, discouraging unused labels in DTS or YAML (not DTSI or DTSO): while not harming this leads to many false positives, e.g. unused PMIC regulators in DTS. Introduce another 'mode' of running beside existing relaxed and strict: a 'stricter' one where these two rules are moved for DTS. Intention is to have in-tree DTS passing 'strict' mode. Signed-off-by: Krzysztof Kozlowski --- scripts/dtc/dt-check-style | 25 +++++++++++++++---= ---- .../dtc/dt-style-selftest/bad/dts-line-length.dts | 21 ++++++++++++++++++ .../dtc/dt-style-selftest/bad/dts-unused-label.dts | 21 ++++++++++++++++++ .../expected/dts-line-length.dts.txt | 2 ++ .../expected/dts-unused-label.dts.txt | 2 ++ scripts/dtc/dt-style-selftest/run.sh | 2 +- 6 files changed, 64 insertions(+), 9 deletions(-) diff --git a/scripts/dtc/dt-check-style b/scripts/dtc/dt-check-style index 17332018d70b..b71e6bf815a7 100755 --- a/scripts/dtc/dt-check-style +++ b/scripts/dtc/dt-check-style @@ -5,12 +5,14 @@ # .dts/.dtsi/.dtso source files. Enforces rules from # Documentation/devicetree/bindings/dts-coding-style.rst. # -# Two modes: +# Three modes: # --mode=3Drelaxed (default) # Only rules that produce zero warnings on the current tree. # Suitable for dt_binding_check. # --mode=3Dstrict -# All rules. Required for new submissions. +# Most of the rules. Required for new submissions. +# --mode=3Dstricter +# All rules, including ones having false positives. # # Two input types (auto-detected by file extension): # *.yaml -- DT binding; check each example block @@ -319,7 +321,7 @@ class Ctx: def __init__(self, lines, text, mode, file_type): self.lines =3D lines self.text =3D text - self.mode =3D mode # 'relaxed' or 'strict' + self.mode =3D mode # 'relaxed', 'strict' or 'stricte= r' if file_type in DTS_FAMILY: self.file_type =3D 'dts' else: @@ -332,7 +334,7 @@ class Rule: def __init__(self, name, mode, description, check, applies_to=3D('yaml', 'dts', 'dtsi', 'dtso')): self.name =3D name - self.mode =3D mode # 'relaxed' or 'strict' + self.mode =3D mode # 'relaxed', 'strict' or 'stricter' self.description =3D description self.check =3D check self.applies_to =3D applies_to # input types this rule covers @@ -1060,20 +1062,27 @@ RULES =3D [ check_node_close_alone), Rule('line-length', 'strict', 'lines must not exceed 80 columns', - check_line_length), + check_line_length, applies_to=3D('yaml',)), + Rule('line-length-dts', 'stricter', + 'lines must not exceed 80 columns', + check_line_length, applies_to=3D('dts', 'dtsi', 'dtso')), Rule('continuation-alignment', 'strict', 'multi-line property continuations align under <, " or the value = under <', check_continuation_alignment), Rule('unused-labels', 'strict', 'every label must be &-referenced in the same example/file ' '(skipped for .dtsi/.dtso since labels there are exported)', - check_unused_labels, applies_to=3D('yaml', 'dts')), + check_unused_labels, applies_to=3D('yaml',)), + Rule('unused-labels-dts', 'stricter', + 'every label must be &-referenced in the same example/file ' + '(skipped for .dtsi/.dtso since labels there are exported)', + check_unused_labels, applies_to=3D('dts',)), ] =20 =20 def select_rules(mode, file_type): """Return rules that apply to the given mode and input type.""" - rank =3D {'relaxed': 0, 'strict': 1} + rank =3D {'relaxed': 0, 'strict': 1, 'stricter': 2} out =3D [] for r in RULES: if rank[r.mode] > rank[mode]: @@ -1201,7 +1210,7 @@ def main(): description=3D'Check DTS coding style on YAML examples and ' '.dts/.dtsi/.dtso files.', fromfile_prefix_chars=3D'@') - ap.add_argument('--mode', choices=3D('relaxed', 'strict'), + ap.add_argument('--mode', choices=3D('relaxed', 'strict', 'stricter'), default=3D'relaxed', help=3D'which rule set to apply (default: relaxed)') ap.add_argument('-j', '--jobs', type=3Dint, default=3D0, diff --git a/scripts/dtc/dt-style-selftest/bad/dts-line-length.dts b/script= s/dtc/dt-style-selftest/bad/dts-line-length.dts new file mode 100644 index 000000000000..bde91a922477 --- /dev/null +++ b/scripts/dtc/dt-style-selftest/bad/dts-line-length.dts @@ -0,0 +1,21 @@ +// SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +/* + * Test fixture: Line length in DTS + */ + +/dts-v1/; + +/ { + soc@0 { + compatible =3D "simple-bus"; + ranges =3D <0 0 0 0xc0000000>; + + #address-cells =3D <1>; + #size-cells =3D <1>; + + foo@1000 { + compatible =3D "example,test-line-length-this-is-a-very-long-name-indee= d-yeah"; + reg =3D <0x1000 0x100>; + }; + }; +}; diff --git a/scripts/dtc/dt-style-selftest/bad/dts-unused-label.dts b/scrip= ts/dtc/dt-style-selftest/bad/dts-unused-label.dts new file mode 100644 index 000000000000..90802ae107e1 --- /dev/null +++ b/scripts/dtc/dt-style-selftest/bad/dts-unused-label.dts @@ -0,0 +1,21 @@ +// SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +/* + * Test fixture: Unused label in DTS + */ + +/dts-v1/; + +/ { + soc@0 { + compatible =3D "simple-bus"; + ranges =3D <0 0 0 0xc0000000>; + + #address-cells =3D <1>; + #size-cells =3D <1>; + + dev: device@1000 { + compatible =3D "example,test-unused-label"; + reg =3D <0x1000 0x100>; + }; + }; +}; diff --git a/scripts/dtc/dt-style-selftest/expected/dts-line-length.dts.txt= b/scripts/dtc/dt-style-selftest/expected/dts-line-length.dts.txt new file mode 100644 index 000000000000..8ed08c309632 --- /dev/null +++ b/scripts/dtc/dt-style-selftest/expected/dts-line-length.dts.txt @@ -0,0 +1,2 @@ +# mode=3Dstricter +bad/dts-line-length.dts:17: [line-length-dts] line exceeds 80 columns (101) diff --git a/scripts/dtc/dt-style-selftest/expected/dts-unused-label.dts.tx= t b/scripts/dtc/dt-style-selftest/expected/dts-unused-label.dts.txt new file mode 100644 index 000000000000..4cdcaba3ba2f --- /dev/null +++ b/scripts/dtc/dt-style-selftest/expected/dts-unused-label.dts.txt @@ -0,0 +1,2 @@ +# mode=3Dstricter +bad/dts-unused-label.dts:16: [unused-labels-dts] label 'dev' defined but n= ever &-referenced diff --git a/scripts/dtc/dt-style-selftest/run.sh b/scripts/dtc/dt-style-se= lftest/run.sh index 8117dd9be90a..5691301d6a4a 100755 --- a/scripts/dtc/dt-style-selftest/run.sh +++ b/scripts/dtc/dt-style-selftest/run.sh @@ -26,7 +26,7 @@ run() { # good/ -- must exit 0 and produce no output in both modes for f in "$here"/good/*; do [ -e "$f" ] || continue - for mode in relaxed strict; do + for mode in relaxed strict stricter; do out=3D$(run "$f" "$mode") rc=3D$? if [ -n "$out" ] || [ "$rc" -ne 0 ]; then --=20 2.53.0 From nobody Mon Sep 28 04:56:12 2026 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 065153ACA60 for ; Wed, 26 Aug 2026 11:16:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787742996; cv=none; b=LpWFzDv846BgB1nl/nCMYheMf5h6uynAjSPTvbD//FugoSsxGrtqqCrfR1Dm8AJ/uRI2aZ1TqL7AgUcinA/FB8jwwekqG8W3sya3U0Yn7qZ/BeY3CwwvKPAHIuglbBM7vi6ExVVUto4pdEdPh6uHYTX03NFpY9C2HFcTisU5Ojs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787742996; c=relaxed/simple; bh=sLtLbF7S86pE8AXPx2k+gSnDPess+J9HKtzyUzkbn28=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=EWaq0rCZk3Kwr/b7A1XIRq2Hd+fgbrBxDKVSC/ltMBqHZx06jK/LbH7rdWxiszdftCPZ2s7MV0zy2+Iipa4asQ8kaNliUYrK3aj0I/525qekzo41DoCm7mVIT7wK9XoQJLq0hBnvgcxa50JnL6lm87cmL8k0wd1qMDpLE5Xrk4c= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b=YWItPXKd; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=kUgqxT5O; arc=none smtp.client-ip=205.220.180.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b="YWItPXKd"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="kUgqxT5O" Received: from pps.filterd (m0279869.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 67QAH5GB3648317 for ; Wed, 26 Aug 2026 11:16:20 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= Z1WIJvKAd2XOfDndIJ3ooRHt9ByqbXSTIWd0+xfU8KI=; b=YWItPXKdadioFdlr WGq+qPuCV3712T7z5QerIQBxnG+0tB6evoNXbNnXEz/Y8mCLJ0O2RcA0sPQxYCqV Y05yS6laqDP5t1TmHkhWOpUcRxLwh/vwVx/rzW97JybT24LwHgfvFAFePVRNxEHe Jliz3RtO0Tg7iYz3IA3cruEXzfJ6wrdaZ+8ogZVm2uo/GfBsRj95Am9kgHx/LJoI JLR9tQgt/vEaQ7ojmGovW71bSvOym/N0Xf6hpE8TUhGrxFXDNXP/4xNGwfWZAgJF tmW9/BYV+qDGfC9Sq7lHlVpqZBBsliaUpxc//THWgYDjHGi3/FDcjbRfLWotK3V8 HXut1Q== Received: from mail-qt1-f200.google.com (mail-qt1-f200.google.com [209.85.160.200]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4g9uthrusc-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Wed, 26 Aug 2026 11:16:19 +0000 (GMT) Received: by mail-qt1-f200.google.com with SMTP id d75a77b69052e-52ef04756caso1903861cf.1 for ; Wed, 26 Aug 2026 04:16:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1787742979; x=1788347779; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :content-type:mime-version:subject:date:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=Z1WIJvKAd2XOfDndIJ3ooRHt9ByqbXSTIWd0+xfU8KI=; b=kUgqxT5OQYYcvo61OdkRUo7+I1cjzcFoWOupxpW9khA+505KILdOGQKuHedxGOQhw2 TQS1SfGQaidgp+6IFOShjHjm/5wafW11CrhWaWACOjxl4I3ygSzEyw+wrFYdCpJ3I17W LNDFwXHRsNpFXn/qm0eVZdXTRku0+mOufF1CtOtUixPXHcWC5ekXAIiTCOuJQ4rjit62 bajZzvbOR9dgjt0yYFkYFBt7M6ieErLLrz9wO7zg6RVj249sDD4lvPY2sIpqmcZ2Pb5Z bGsSj/QtjRS0XLmGBhgtdpafo5NRTaYx5BHPvezS0WEaZGpZ1o/wSyK5/6may13XCcLl erwA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1787742979; x=1788347779; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :content-type:mime-version:subject:date:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=Z1WIJvKAd2XOfDndIJ3ooRHt9ByqbXSTIWd0+xfU8KI=; b=kjnIBXZiBKFrqRUSogcb1YIlczWoeKccbs7l8VATEZqti0XFidkI3RwhOAPaTl71+h yyh7xx8mI68Lli9D5SIjOuWx078hK2vYf903arf+f8rihBhE3QPBPdPGOFzSHBlSI2QT sHgFGuXt+KqwxJIHLYp3ox4ohu4BmgPo4s429hEsTs11EBbUSzAkiJgtV68oPAj68J+c ch0NfJVd2aJ0AfSM4wk5rlsvnj/Brh0/PhnAtkGuCtof0w6oxwT51K2hZHqrknNEJGGO zQ2m/+fzohIOyAgmUKMVlVLv6B1S4l1175uHWkSWf0zJj9Ak4NiXLydX6xUVob6IRE62 qGwA== X-Forwarded-Encrypted: i=1; AHgh+RqZpZR3okWJS9aa3w5nhHKYvGxA7lhUW5YvkgOTvgEggEJ5XnWPCgm6Z8ldN/BLOx1g4pYxLD06Yeq/3JA=@vger.kernel.org X-Gm-Message-State: AFuF++kEdl5b8V559tO3RDqbpjaXD66lnW9lhbXf/Kr8uw0I0UOvlvgk A01CuLDwfJNtbqXKxq/jfek0WmAPjIsHpd2eaOQFTtu2EA+QyJdtbfyWHjm0fOwKi4j3H16EtF/ Uf01zuOSE/0l11WnzOS9kL5IuPVuyVKbkokph+JxRCHPRd7Ex45Or6MPCjTkZT0apsJ0= X-Gm-Gg: AR+sD12+4P03KJTx9smud+gcyo9tTb6RNxSOO+aXOwAGLK2/f/KizK2wkZngxyv0W24 gmoTy7spwQJDlstClbJwp1VcRX2R4XimfT1EdNP5xoplnLmd9gD5lmkVEmIvS8GH5hezVyijNUp X6GuTWfCS7P+iU6YNuptmAEQ8/NjrvyW6BwFCDxr0TWEKlJWma1psM5DyxL00lCog4rlihK7Mf+ +v06yET3N8KTMcSWrYgUIFPqgmksUbiXusKwWwQn2KT77+bEYw18aSxKQKeiBaZGspCb9XkTvez 3nFsRF9T7CkE12n+oXFc5RCqu7jjSRoqMVspeHBF+Lhzvf7Bkrp7ttIaCtbP0MlOv0DytJmM2GT V+uRWs7UYUHha2WoSl+PVVP0= X-Received: by 2002:ac8:5f10:0:b0:52d:6afd:7db5 with SMTP id d75a77b69052e-52e4230c933mr46292651cf.25.1787742979103; Wed, 26 Aug 2026 04:16:19 -0700 (PDT) X-Received: by 2002:ac8:5f10:0:b0:52d:6afd:7db5 with SMTP id d75a77b69052e-52e4230c933mr46291581cf.25.1787742978261; Wed, 26 Aug 2026 04:16:18 -0700 (PDT) Received: from [127.0.1.1] ([178.197.219.214]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-6a5de8ea6d0sm4577843a12.13.2026.08.26.04.16.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Aug 2026 04:16:17 -0700 (PDT) From: Krzysztof Kozlowski Date: Wed, 26 Aug 2026 13:15:58 +0200 Subject: [PATCH v6 06/10] dtc: dt-check-style: Replace Test User email with Rob Herring Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260826-n-dts-style-checker-continued-v6-6-f270b1e81f8e@oss.qualcomm.com> References: <20260826-n-dts-style-checker-continued-v6-0-f270b1e81f8e@oss.qualcomm.com> In-Reply-To: <20260826-n-dts-style-checker-continued-v6-0-f270b1e81f8e@oss.qualcomm.com> To: Rob Herring , Saravana Kannan , Krzysztof Kozlowski , Conor Dooley Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Krzysztof Kozlowski X-Mailer: b4 0.16.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=17204; i=krzysztof.kozlowski@oss.qualcomm.com; h=from:subject:message-id; bh=sLtLbF7S86pE8AXPx2k+gSnDPess+J9HKtzyUzkbn28=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBqjsrxPcoNDLPAdfqOALdqFrWAw1ZkAJl08SXG0 tsGr6G0z6+JAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCao7K8QAKCRDBN2bmhouD 11UWD/9P9qmiVrocNVeiKP3VfN5a3qha4F3ftzVbrEXnPsYncEYFPDffSGbw4APBxPAoz1usrvI 8Po4l41x1G65Emaiy9QQeeiwpxchJIZwlXs2VuVz1vRKipgey6orOi/GvGxx6IPVXb9Ap8+VdBK lS1MS7PWnifQQE+014V9ZkufH56gzwZbcqzF25yXoCvzZPry/bwkd32Q/eC4bF6/a6cR+vsnrpk KGHWje35VvYml3kMLUX92Kqipfw/+X9yNDSXAPq7y5PM3Adtz2dltVYRKio1Dbr1+0Cyl3W73/c WPjFz71ALXEuNUvjK5WNkUbaeVSBQledGMc49lMd/z8gBBzzL0Tl7RiQKSHkxhfz2RuCK5BYIt4 EmO8J7NQIb8DlnuhmJYY0Z1CROboaTsow/KeeWcEk9ev7oqXCs6wbA9BYKSKAQW2yAgmRS1x1TL yaOhhS+tLyNAsbEUIKYS8vM7LcjmvrVDxInJsPTUhNOrdWUtD8O2SD6C78/vj1JNFp78+6Ogmb7 o8slA3rNqS+GIwZ+MN+OafeIYqWQLKR/JgEP5WE7phMVwm8nhPqiIHs7BCsD7ZQSpVe8guD3xAN 0FUu6Cg4ek9Kk0DA6q5xRIJErWZ67PKd3F+q18vhpcznMXtsECDUlNJgcwtaCyp7WWUJkWh6Wls wuiBQEm6QSCFKKQ== X-Developer-Key: i=krzysztof.kozlowski@oss.qualcomm.com; a=openpgp; fpr=9BD07E0E0C51F8D59677B7541B93437D3B41629B X-Authority-Analysis: v=2.4 cv=EMA2FVZC c=1 sm=1 tr=0 ts=6a8ecb04 cx=c_pps a=JbAStetqSzwMeJznSMzCyw==:117 a=+bKQE0WJfmhK2875HamI0Q==:17 a=IkcTkHD0fZMA:10 a=Sv0fKeRqtYgA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=_glEPmIy2e8OvE2BGh3C:22 a=gEfo2CItAAAA:8 a=A1X0JdhQAAAA:8 a=EUspDBNiAAAA:8 a=VwQbUJbxAAAA:8 a=Lkbq6ki4aylNsx_sLmcA:9 a=QEXdDO2ut3YA:10 a=uxP6HrT_eTzRwkO_Te1X:22 a=sptkURWiP4Gy88Gu7hUp:22 X-Proofpoint-ORIG-GUID: mTv4b6WqDKY9h5Z7LgguRe9Guv-N_K4S X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwODI2MDA5MyBTYWx0ZWRfX3Gz4PIlsAISx Ake1JuZj1RkAoVQB/unkP8PJhcPtulkwyTCgpU/hvCuc9GFQrwcm8FIUFo7mx3uBdThXMOD9dqo v+fRIKmge6Emq19uF7aBd0P/NvnC4OHRe+1m0xeaEa0r6ZKD6/e6rmeNOw8UKcjQIYK2Q8woGo7 vX8eIKVK9o4y3IiDANMtx29ixG/V0+ZBawce8dSrIrmW94X60NbBRi5GJ8R+J+bhCbtQGBz8PSg LSEFXf5YpkNTNDzy2eTb8CLi6xtHcWErF4d9nqcLkd8/h04VMv1Dr8WzbtlIZYkLQTUTjcX0aYP YDs8yKt12UcexLMKEmYtWuKGIUdTfSzHffFGrVRPERoXOC77lM94w23UfOgdQDeEuFHxoaL7Y1Y HUf+hAJst9oDnGHwYebkxQV4JQmkjx0QD3gh+T9aJ2mRHQghzz38vwEB7mVbCGD5DEPSVP+Mt86 INDrudilCECW2xJ2K1A== X-Proofpoint-Spam-Info: AW1haW4tMjYwODI2MDA5MyBTYWx0ZWRfX06JcAWjbcotY 2J8DxVZ6Hn2LrLZT8SP7unweeW5vaq4ZfZHdW6SkqgkfPWjeQ+Q4rP4echZz633WCwJ/r582yVO L2gdHQXezoJsHHk3eWtS9efWM7TRxv4= X-Proofpoint-GUID: mTv4b6WqDKY9h5Z7LgguRe9Guv-N_K4S X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.134,FMLib:17.12.100.49 definitions=2026-08-26_03,2026-08-26_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 lowpriorityscore=0 spamscore=0 adultscore=0 malwarescore=0 clxscore=1015 phishscore=0 priorityscore=1501 suspectscore=0 bulkscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606150000 definitions=main-2608260093 scripts/get_maintainer.pl reports email from the example binding fixtures, so let's spare someone at @example.com from receiving bunch of odd emails. Signed-off-by: Krzysztof Kozlowski --- scripts/dtc/dt-style-selftest/bad/yaml-child-addr-order.yaml | 2 +- scripts/dtc/dt-style-selftest/bad/yaml-child-name-order.yaml | 2 +- scripts/dtc/dt-style-selftest/bad/yaml-cont-align.yaml | 2 +- scripts/dtc/dt-style-selftest/bad/yaml-digit-node-order.yaml | 2 +- scripts/dtc/dt-style-selftest/bad/yaml-hex-case.yaml | 2 +- scripts/dtc/dt-style-selftest/bad/yaml-indent-strict.yaml | 2 +- scripts/dtc/dt-style-selftest/bad/yaml-label-in-string.yaml | 2 +- scripts/dtc/dt-style-selftest/bad/yaml-line-length.yaml | 2 +- scripts/dtc/dt-style-selftest/bad/yaml-mixed-indent.yaml | 2 +- scripts/dtc/dt-style-selftest/bad/yaml-multi-close.yaml | 2 +- scripts/dtc/dt-style-selftest/bad/yaml-node-close.yaml | 2 +- scripts/dtc/dt-style-selftest/bad/yaml-prop-order-device-type.yaml | 2 +- scripts/dtc/dt-style-selftest/bad/yaml-prop-order.yaml | 2 +- scripts/dtc/dt-style-selftest/bad/yaml-prop-pairing.yaml | 2 +- scripts/dtc/dt-style-selftest/bad/yaml-required-blank.yaml | 2 +- scripts/dtc/dt-style-selftest/bad/yaml-tab.yaml | 2 +- scripts/dtc/dt-style-selftest/bad/yaml-trailing-comment.yaml | 2 +- scripts/dtc/dt-style-selftest/bad/yaml-trailing-ws.yaml | 2 +- scripts/dtc/dt-style-selftest/bad/yaml-unclosed-comment.yaml | 2 +- scripts/dtc/dt-style-selftest/bad/yaml-unit-addr-prefix.yaml | 2 +- scripts/dtc/dt-style-selftest/bad/yaml-unit-addr.yaml | 2 +- scripts/dtc/dt-style-selftest/bad/yaml-unused-label.yaml | 2 +- scripts/dtc/dt-style-selftest/bad/yaml-value-ws-multiline.yaml | 2 +- scripts/dtc/dt-style-selftest/bad/yaml-value-ws.yaml | 2 +- scripts/dtc/dt-style-selftest/good/yaml-4space.yaml | 2 +- scripts/dtc/dt-style-selftest/good/yaml-cont-align.yaml | 2 +- scripts/dtc/dt-style-selftest/good/yaml-tricky-parsing.yaml | 2 +- 27 files changed, 27 insertions(+), 27 deletions(-) diff --git a/scripts/dtc/dt-style-selftest/bad/yaml-child-addr-order.yaml b= /scripts/dtc/dt-style-selftest/bad/yaml-child-addr-order.yaml index 3df56e69a1ff..7c3b731e059a 100644 --- a/scripts/dtc/dt-style-selftest/bad/yaml-child-addr-order.yaml +++ b/scripts/dtc/dt-style-selftest/bad/yaml-child-addr-order.yaml @@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml# title: Test fixture with addressed children out of order =20 maintainers: - - Test User + - Rob Herring =20 properties: compatible: diff --git a/scripts/dtc/dt-style-selftest/bad/yaml-child-name-order.yaml b= /scripts/dtc/dt-style-selftest/bad/yaml-child-name-order.yaml index 35d85e5573c2..f3483033859a 100644 --- a/scripts/dtc/dt-style-selftest/bad/yaml-child-name-order.yaml +++ b/scripts/dtc/dt-style-selftest/bad/yaml-child-name-order.yaml @@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml# title: Test fixture with unaddressed children out of name order =20 maintainers: - - Test User + - Rob Herring =20 properties: compatible: diff --git a/scripts/dtc/dt-style-selftest/bad/yaml-cont-align.yaml b/scrip= ts/dtc/dt-style-selftest/bad/yaml-cont-align.yaml index ccf443173dca..a5a9eb17fc17 100644 --- a/scripts/dtc/dt-style-selftest/bad/yaml-cont-align.yaml +++ b/scripts/dtc/dt-style-selftest/bad/yaml-cont-align.yaml @@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml# title: Test fixture with mis-aligned multi-line property =20 maintainers: - - Test User + - Rob Herring =20 properties: compatible: diff --git a/scripts/dtc/dt-style-selftest/bad/yaml-digit-node-order.yaml b= /scripts/dtc/dt-style-selftest/bad/yaml-digit-node-order.yaml index 44a9d25e5ba0..068542a98576 100644 --- a/scripts/dtc/dt-style-selftest/bad/yaml-digit-node-order.yaml +++ b/scripts/dtc/dt-style-selftest/bad/yaml-digit-node-order.yaml @@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml# title: Test fixture with digit-leading nodes out of address order =20 maintainers: - - Test User + - Rob Herring =20 properties: compatible: diff --git a/scripts/dtc/dt-style-selftest/bad/yaml-hex-case.yaml b/scripts= /dtc/dt-style-selftest/bad/yaml-hex-case.yaml index b26d1bf58de9..c55359a4ca68 100644 --- a/scripts/dtc/dt-style-selftest/bad/yaml-hex-case.yaml +++ b/scripts/dtc/dt-style-selftest/bad/yaml-hex-case.yaml @@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml# title: Test fixture with uppercase hex literals =20 maintainers: - - Test User + - Rob Herring =20 properties: compatible: diff --git a/scripts/dtc/dt-style-selftest/bad/yaml-indent-strict.yaml b/sc= ripts/dtc/dt-style-selftest/bad/yaml-indent-strict.yaml index bee4cf118d73..155060a79887 100644 --- a/scripts/dtc/dt-style-selftest/bad/yaml-indent-strict.yaml +++ b/scripts/dtc/dt-style-selftest/bad/yaml-indent-strict.yaml @@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml# title: Test fixture using 2-space indent (rejected by strict mode) =20 maintainers: - - Test User + - Rob Herring =20 properties: compatible: diff --git a/scripts/dtc/dt-style-selftest/bad/yaml-label-in-string.yaml b/= scripts/dtc/dt-style-selftest/bad/yaml-label-in-string.yaml index ba512869b702..4a69b503af4b 100644 --- a/scripts/dtc/dt-style-selftest/bad/yaml-label-in-string.yaml +++ b/scripts/dtc/dt-style-selftest/bad/yaml-label-in-string.yaml @@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml# title: Test fixture where a label is only "referenced" inside a string =20 maintainers: - - Test User + - Rob Herring =20 properties: compatible: diff --git a/scripts/dtc/dt-style-selftest/bad/yaml-line-length.yaml b/scri= pts/dtc/dt-style-selftest/bad/yaml-line-length.yaml index 64427bf1c385..6e4140e500b5 100644 --- a/scripts/dtc/dt-style-selftest/bad/yaml-line-length.yaml +++ b/scripts/dtc/dt-style-selftest/bad/yaml-line-length.yaml @@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml# title: Test fixture exceeding 80 columns =20 maintainers: - - Test User + - Rob Herring =20 properties: compatible: diff --git a/scripts/dtc/dt-style-selftest/bad/yaml-mixed-indent.yaml b/scr= ipts/dtc/dt-style-selftest/bad/yaml-mixed-indent.yaml index 5401d1a423a1..c25a0d1a999e 100644 --- a/scripts/dtc/dt-style-selftest/bad/yaml-mixed-indent.yaml +++ b/scripts/dtc/dt-style-selftest/bad/yaml-mixed-indent.yaml @@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml# title: Test fixture mixing tabs and spaces in indent =20 maintainers: - - Test User + - Rob Herring =20 properties: compatible: diff --git a/scripts/dtc/dt-style-selftest/bad/yaml-multi-close.yaml b/scri= pts/dtc/dt-style-selftest/bad/yaml-multi-close.yaml index 4d9fa27b50a2..afc202a698eb 100644 --- a/scripts/dtc/dt-style-selftest/bad/yaml-multi-close.yaml +++ b/scripts/dtc/dt-style-selftest/bad/yaml-multi-close.yaml @@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml# title: Test fixture with two closing braces on one line =20 maintainers: - - Test User + - Rob Herring =20 properties: compatible: diff --git a/scripts/dtc/dt-style-selftest/bad/yaml-node-close.yaml b/scrip= ts/dtc/dt-style-selftest/bad/yaml-node-close.yaml index e107659fd9e8..9e714f7e7d47 100644 --- a/scripts/dtc/dt-style-selftest/bad/yaml-node-close.yaml +++ b/scripts/dtc/dt-style-selftest/bad/yaml-node-close.yaml @@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml# title: Test fixture with closing brace not on its own line =20 maintainers: - - Test User + - Rob Herring =20 properties: compatible: diff --git a/scripts/dtc/dt-style-selftest/bad/yaml-prop-order-device-type.= yaml b/scripts/dtc/dt-style-selftest/bad/yaml-prop-order-device-type.yaml index e2c69e9ff452..c71fb2c0a3e5 100644 --- a/scripts/dtc/dt-style-selftest/bad/yaml-prop-order-device-type.yaml +++ b/scripts/dtc/dt-style-selftest/bad/yaml-prop-order-device-type.yaml @@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml# title: Test fixture with device_type =20 maintainers: - - Test User + - Rob Herring =20 properties: compatible: diff --git a/scripts/dtc/dt-style-selftest/bad/yaml-prop-order.yaml b/scrip= ts/dtc/dt-style-selftest/bad/yaml-prop-order.yaml index 75582a3d2f6e..bf1480e97209 100644 --- a/scripts/dtc/dt-style-selftest/bad/yaml-prop-order.yaml +++ b/scripts/dtc/dt-style-selftest/bad/yaml-prop-order.yaml @@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml# title: Test fixture with reg before compatible =20 maintainers: - - Test User + - Rob Herring =20 properties: compatible: diff --git a/scripts/dtc/dt-style-selftest/bad/yaml-prop-pairing.yaml b/scr= ipts/dtc/dt-style-selftest/bad/yaml-prop-pairing.yaml index 767ab21c39f3..51abc540af11 100644 --- a/scripts/dtc/dt-style-selftest/bad/yaml-prop-pairing.yaml +++ b/scripts/dtc/dt-style-selftest/bad/yaml-prop-pairing.yaml @@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml# title: Test fixture exercising -names and pinctrl-names pairing =20 maintainers: - - Test User + - Rob Herring =20 properties: compatible: diff --git a/scripts/dtc/dt-style-selftest/bad/yaml-required-blank.yaml b/s= cripts/dtc/dt-style-selftest/bad/yaml-required-blank.yaml index 8bb53240cffa..0036d5e0c4ea 100644 --- a/scripts/dtc/dt-style-selftest/bad/yaml-required-blank.yaml +++ b/scripts/dtc/dt-style-selftest/bad/yaml-required-blank.yaml @@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml# title: Test fixture missing required blank lines =20 maintainers: - - Test User + - Rob Herring =20 properties: compatible: diff --git a/scripts/dtc/dt-style-selftest/bad/yaml-tab.yaml b/scripts/dtc/= dt-style-selftest/bad/yaml-tab.yaml index 487d07ff8cb6..937ecdd923b0 100644 --- a/scripts/dtc/dt-style-selftest/bad/yaml-tab.yaml +++ b/scripts/dtc/dt-style-selftest/bad/yaml-tab.yaml @@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml# title: Test fixture with a tab in a DTS line =20 maintainers: - - Test User + - Rob Herring =20 properties: compatible: diff --git a/scripts/dtc/dt-style-selftest/bad/yaml-trailing-comment.yaml b= /scripts/dtc/dt-style-selftest/bad/yaml-trailing-comment.yaml index 2368ada8106f..695d046e8454 100644 --- a/scripts/dtc/dt-style-selftest/bad/yaml-trailing-comment.yaml +++ b/scripts/dtc/dt-style-selftest/bad/yaml-trailing-comment.yaml @@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml# title: Test fixture with properties out of order behind trailing comments =20 maintainers: - - Test User + - Rob Herring =20 properties: compatible: diff --git a/scripts/dtc/dt-style-selftest/bad/yaml-trailing-ws.yaml b/scri= pts/dtc/dt-style-selftest/bad/yaml-trailing-ws.yaml index 5c4b4bd833c5..f338c14174e6 100644 --- a/scripts/dtc/dt-style-selftest/bad/yaml-trailing-ws.yaml +++ b/scripts/dtc/dt-style-selftest/bad/yaml-trailing-ws.yaml @@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml# title: Test fixture with trailing whitespace =20 maintainers: - - Test User + - Rob Herring =20 properties: compatible: diff --git a/scripts/dtc/dt-style-selftest/bad/yaml-unclosed-comment.yaml b= /scripts/dtc/dt-style-selftest/bad/yaml-unclosed-comment.yaml index 63c1c08712a5..191ed775384b 100644 --- a/scripts/dtc/dt-style-selftest/bad/yaml-unclosed-comment.yaml +++ b/scripts/dtc/dt-style-selftest/bad/yaml-unclosed-comment.yaml @@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml# title: Test fixture with an unclosed /* block comment =20 maintainers: - - Test User + - Rob Herring =20 properties: compatible: diff --git a/scripts/dtc/dt-style-selftest/bad/yaml-unit-addr-prefix.yaml b= /scripts/dtc/dt-style-selftest/bad/yaml-unit-addr-prefix.yaml index 9b3fe508c5fd..62590948d2de 100644 --- a/scripts/dtc/dt-style-selftest/bad/yaml-unit-addr-prefix.yaml +++ b/scripts/dtc/dt-style-selftest/bad/yaml-unit-addr-prefix.yaml @@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml# title: Test fixture with 0x-prefixed unit address =20 maintainers: - - Test User + - Rob Herring =20 properties: compatible: diff --git a/scripts/dtc/dt-style-selftest/bad/yaml-unit-addr.yaml b/script= s/dtc/dt-style-selftest/bad/yaml-unit-addr.yaml index 93705cd45410..5bb19fba5c19 100644 --- a/scripts/dtc/dt-style-selftest/bad/yaml-unit-addr.yaml +++ b/scripts/dtc/dt-style-selftest/bad/yaml-unit-addr.yaml @@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml# title: Test fixture with malformed unit address =20 maintainers: - - Test User + - Rob Herring =20 properties: compatible: diff --git a/scripts/dtc/dt-style-selftest/bad/yaml-unused-label.yaml b/scr= ipts/dtc/dt-style-selftest/bad/yaml-unused-label.yaml index 28d7176cbf08..7f862ae5a175 100644 --- a/scripts/dtc/dt-style-selftest/bad/yaml-unused-label.yaml +++ b/scripts/dtc/dt-style-selftest/bad/yaml-unused-label.yaml @@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml# title: Test fixture with an unused label =20 maintainers: - - Test User + - Rob Herring =20 properties: compatible: diff --git a/scripts/dtc/dt-style-selftest/bad/yaml-value-ws-multiline.yaml= b/scripts/dtc/dt-style-selftest/bad/yaml-value-ws-multiline.yaml index 504bf0931c27..1d7bc8142fd7 100644 --- a/scripts/dtc/dt-style-selftest/bad/yaml-value-ws-multiline.yaml +++ b/scripts/dtc/dt-style-selftest/bad/yaml-value-ws-multiline.yaml @@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml# title: Test fixture with extra whitespace in a multi-line cell array =20 maintainers: - - Test User + - Rob Herring =20 properties: compatible: diff --git a/scripts/dtc/dt-style-selftest/bad/yaml-value-ws.yaml b/scripts= /dtc/dt-style-selftest/bad/yaml-value-ws.yaml index 342ab9f399f1..a5082a158155 100644 --- a/scripts/dtc/dt-style-selftest/bad/yaml-value-ws.yaml +++ b/scripts/dtc/dt-style-selftest/bad/yaml-value-ws.yaml @@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml# title: Test fixture with extra whitespace inside <...> =20 maintainers: - - Test User + - Rob Herring =20 properties: compatible: diff --git a/scripts/dtc/dt-style-selftest/good/yaml-4space.yaml b/scripts/= dtc/dt-style-selftest/good/yaml-4space.yaml index 1502f803c24c..b91b8a8a9512 100644 --- a/scripts/dtc/dt-style-selftest/good/yaml-4space.yaml +++ b/scripts/dtc/dt-style-selftest/good/yaml-4space.yaml @@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml# title: Test fixture for dt-check-style =20 maintainers: - - Test User + - Rob Herring =20 properties: compatible: diff --git a/scripts/dtc/dt-style-selftest/good/yaml-cont-align.yaml b/scri= pts/dtc/dt-style-selftest/good/yaml-cont-align.yaml index 2e7b8582bb7c..8463075f9f4c 100644 --- a/scripts/dtc/dt-style-selftest/good/yaml-cont-align.yaml +++ b/scripts/dtc/dt-style-selftest/good/yaml-cont-align.yaml @@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml# title: Test fixture with aligned multi-line property =20 maintainers: - - Test User + - Rob Herring =20 properties: compatible: diff --git a/scripts/dtc/dt-style-selftest/good/yaml-tricky-parsing.yaml b/= scripts/dtc/dt-style-selftest/good/yaml-tricky-parsing.yaml index a836d5f36b93..a95d07f883ef 100644 --- a/scripts/dtc/dt-style-selftest/good/yaml-tricky-parsing.yaml +++ b/scripts/dtc/dt-style-selftest/good/yaml-tricky-parsing.yaml @@ -17,7 +17,7 @@ description: | not leave the parser in block-comment state. =20 maintainers: - - Test User + - Rob Herring =20 properties: compatible: --=20 2.53.0 From nobody Mon Sep 28 04:56:12 2026 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9D4E63E16A9 for ; Wed, 26 Aug 2026 11:16:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787742992; cv=none; b=TOS2hxFsXkZ0nyT4P2H2fyE9zSuNQy1zzFXyk8vpUaTFaV//ke62M3kY/LLTvph8OVK78fb/7Vmfc4uf1WJa8CmGc9vXcFzEhsvvbJUC6oyq1L9hqWJIV/cmtiHRJMr0c5dMNrhaTWR6oZx3ggrzyi9WkKVpzkgbqYQa/Gq/9Dw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787742992; c=relaxed/simple; bh=+eb0h22jivPbCiyNZVJ/SonWgPLlpoFK7nMKA9Ib+ag=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=sdcptWp/lz7J0U2FGMfNKt6D+wZDzX6lGK+KfEsR4SqWq51sVZI+erERTFeYengihnPwOkkAr0xpPGK3mpFOb7f3KjljepSBN7DfowcOaVVkcMaWJjhV0yDXCjPiH7BP/JwyPy9wY9Ofxd0E2O+/DsG6XDeYvtknlC06j8ehB1E= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b=El1Mltsg; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=aIHF1bX6; arc=none smtp.client-ip=205.220.180.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b="El1Mltsg"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="aIHF1bX6" Received: from pps.filterd (m0279869.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 67QAH4HS3648241 for ; Wed, 26 Aug 2026 11:16:21 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= M5ET4VH5qnmWPvY4Kn6EAmWGAJ2lzFw/g2+/xxP1MPU=; b=El1Mltsg+c/+Q9lv GjEMDhgpN+cb8qu7qahHbxvlLiYcCf9M2pauaJIJDuQEc5TotB7DXm2w59B35l4W xXF+gzmB/9FPTYVfIQ3qFEgCzbz9UeAuPaulwNv+IxuNBxEdlZM71mdG0Ruv4jRI fyLcrWb0cLxZmIDG0Z+MYsv3HzRam/0PphHEjicNCWKXXtWVD5co/h84MQaKR3KC aeClSsXE8lywGz3mEU00FrmFguQ0lpqHJBfKpkJ+oNPefx84pTrfpmnP1+MCKOwD qAVvpT5bqE4T+vV//m8O29vJyc2qUEYNDCmf/36KqGo31k9DMMp6EOrsiOKwDY6u BaH4WA== Received: from mail-qt1-f197.google.com (mail-qt1-f197.google.com [209.85.160.197]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4g9uthruse-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Wed, 26 Aug 2026 11:16:21 +0000 (GMT) Received: by mail-qt1-f197.google.com with SMTP id d75a77b69052e-52d33c89a29so10574441cf.1 for ; Wed, 26 Aug 2026 04:16:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1787742981; x=1788347781; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :content-type:mime-version:subject:date:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=M5ET4VH5qnmWPvY4Kn6EAmWGAJ2lzFw/g2+/xxP1MPU=; b=aIHF1bX6HBWVbxPPf1Zn4deb910/lsXYm9i0/ADVHzb48hVnZZ62WyUo0RC7UxruLt CBi7fckV599bytk/h9I6svfty7fxpn9Ggt0Gs2pIsnm8tr3ANZi01LdcDCSJrVtAczJo lyRyyOb/XIPowCtBx+vbSbVNLTN009sAeyZPoktIjEBW7Z1fWS7N4kUlmE1XXAwVkCWC tD9Im8JuOen+X0FU5oUMR5Egu4LSHD9oXGGrymDsssDc7eSjkdqRZZrdbUJvQeX1VFCr PpmNe/8zKQNrcMIJwJWQ+uIoR/xYHjcl5Wq16CJ8D4zRUfGe7/MtNxc93tDBpfFwsxDn Wxqg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1787742981; x=1788347781; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :content-type:mime-version:subject:date:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=M5ET4VH5qnmWPvY4Kn6EAmWGAJ2lzFw/g2+/xxP1MPU=; b=jWNqG2w7jndamtWgsE69Th1EEoYNqtOREuG86lnD5dffUk7/P06SMj9ERwz+bSKkXu XS87zpdwAWwdpUd9NeoG+FQLJ9/NJbbeh3O6w2uM8O/+I5ajcCi8nJ5BEoNfpMudPD6B TZZ9qkWhHGsCcqdgJxuFd0Q72sxzi/emwVmi7kbbdXyG+cAoGWOAmj9aQ3oa85VE2FvU 1YVhZPE4MSMOG6YZpWxsu2fUXOBGt43MXlrd0wTq3ARgZsnEUotqdNSzdr3cgnUpPznP /rOTYB/WnCFDNYgRpNaXM1ShZ5FyRWa3WF+sw1g/hp0Ah5N7M66paAlexzekKlH6IzSW OKEQ== X-Forwarded-Encrypted: i=1; AHgh+RqGRt20Odb+nORyquMAOaC3WAJ0FT2KUILmMprONldD51jyStjtngMGk9X2CT22pZJIyMwm5SRcwY9CBtE=@vger.kernel.org X-Gm-Message-State: AFuF++mes8X7q1YOouu+VXl10Ev6o9bgDrKfKja11pZ8KxdSDUaMZpNJ 4ElaPaayJ3KQDPzSM4vL4/vgfQKtINwig57Mos65Yf7s/Ox0Axvaj7bROXwHLv7iBwHaGhNPOhJ knj2pkbrGHK6YF4XKFAjkxzPe7A0aJ8uieJtbkXUT/ts2Z1Oj4WM147bBkaeo8ulrNNXWE79TkF A= X-Gm-Gg: AR+sD12jDG8ZTmMlCl503bJqy+Qhdq/1CyP7wDfTLvHJ9pk6MxIWFPWxnWs80c1H9N6 UQqGc2e7XWXExCX7rvmfL2h+nUmTeFK25r80Ux5kQW0tiKB5MlNCK2CiF5g9WzJoUz5WQDZ0yuY pFlGEtAJP1Gw6q/EutHzMjlD8SlQ4oIoJEBeRIdh4XiGzJPQ0NovE8dwN6rVKgltkZdKoId4INC /jZ550Ec0Q+x5stc3DoroN3uzdd9792XsOrD+Y8YoVBdZ60iHRlzwAyoHB4f9OU2fJpVfouM4/F 85a+ysBPV2+mfPjnJN4rOQ/hOv1I7Ho3I5H65OUoX6AfrT2S/45M6YR8sRZkWrHRcaHcsAbRF9V DJPxEYBsYsLwM3IB1va+d6qY= X-Received: by 2002:a05:622a:550:b0:51c:73f:e3a7 with SMTP id d75a77b69052e-52e42323355mr56371341cf.26.1787742980466; Wed, 26 Aug 2026 04:16:20 -0700 (PDT) X-Received: by 2002:a05:622a:550:b0:51c:73f:e3a7 with SMTP id d75a77b69052e-52e42323355mr56370551cf.26.1787742979994; Wed, 26 Aug 2026 04:16:19 -0700 (PDT) Received: from [127.0.1.1] ([178.197.219.214]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-6a5de8ea6d0sm4577843a12.13.2026.08.26.04.16.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Aug 2026 04:16:19 -0700 (PDT) From: Krzysztof Kozlowski Date: Wed, 26 Aug 2026 13:15:59 +0200 Subject: [PATCH v6 07/10] dtc: dt-check-style: Call _strip_strings_and_comments() only once Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260826-n-dts-style-checker-continued-v6-7-f270b1e81f8e@oss.qualcomm.com> References: <20260826-n-dts-style-checker-continued-v6-0-f270b1e81f8e@oss.qualcomm.com> In-Reply-To: <20260826-n-dts-style-checker-continued-v6-0-f270b1e81f8e@oss.qualcomm.com> To: Rob Herring , Saravana Kannan , Krzysztof Kozlowski , Conor Dooley Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Krzysztof Kozlowski X-Mailer: b4 0.16.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=3085; i=krzysztof.kozlowski@oss.qualcomm.com; h=from:subject:message-id; bh=+eb0h22jivPbCiyNZVJ/SonWgPLlpoFK7nMKA9Ib+ag=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBqjsry1F2dlr4RW+XU0zb3A06qO3hoPhOxBAjKg JIMjNKnuGSJAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCao7K8gAKCRDBN2bmhouD 14zJD/9BNdmxutTyf467F7+Vv5C5SPSghxXFVuZ5F2Zs8mv6LO2MMfXR6PYgA1sMnQjio6QMpHa eP0LaixY3ryEc2oDpoxSdYlSh8ULI+GwbGvyFLAJUhQqzmCkGYN7nLRZs26fxpBT1Q2QNHqfvLF tdQU4yb6iXMsU1wKVFn557xizQ+R2HUJJlrqXPS6xoeNmTCRPhlSBWnYHEdz66uLBxJmgAl/CAr OPTPzj4htJDVrxNHypplvbuKUwm2RMnhDuewJu1jOtHKNXzi6FQkhYq+0MGwWUpfwX0giRr+ieu jhl07YsW90zwaZwFNKjH5rZDXroKDaKIqYKxZGLSgYmbpwAOfpRZiExEpbY0KEjbj7pDetttR6S 09Dcq9ygKtsvw4Bq567ytzNxTOyHIpasn4MsC1foqVaPLjP/Ql6jJBChAprMQGfcjhH5AUQKGx/ w1U4oJGhVENCY7Bxll/xR9A+ZEuuyFBcBcavfE5GuAx6CJx2qUP0J4UsQ00cCwJe2kp9/0cdZ1f 33c7M0yDH6YhbK/NXzbbezEKRbsgZfEnlunn1KPkZShmYl81wX2KBus3EkfWceZMz0XzK1iOjGE SNU51pZ8udfWKfM6p8brXwvafHU9hq28P7EvtvQ2WN40BIEWNpgWN4mrXYeqCezT8TH+GFkCuUu FjWsLX4CfOyexdg== X-Developer-Key: i=krzysztof.kozlowski@oss.qualcomm.com; a=openpgp; fpr=9BD07E0E0C51F8D59677B7541B93437D3B41629B X-Authority-Analysis: v=2.4 cv=EMA2FVZC c=1 sm=1 tr=0 ts=6a8ecb05 cx=c_pps a=EVbN6Ke/fEF3bsl7X48z0g==:117 a=+bKQE0WJfmhK2875HamI0Q==:17 a=IkcTkHD0fZMA:10 a=Sv0fKeRqtYgA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=_glEPmIy2e8OvE2BGh3C:22 a=EUspDBNiAAAA:8 a=w4kPxWdgdsGoh0WTy7oA:9 a=QEXdDO2ut3YA:10 a=a_PwQJl-kcHnX1M80qC6:22 X-Proofpoint-ORIG-GUID: SuYYCoiEWB30s93xu0kclSrrudOAn8XQ X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwODI2MDA5MyBTYWx0ZWRfX7ZH0M6KyYccp dTobwLDCxAhvtmZvKwTxvF8nv/q3gZT/JGvD8yq8NLjrT53hKpw2rZu0AAxWq+QIzMB8gJJJs0t UKQmlT7y2Z1is25go+Fc6Cwtd+Y2idvXzLBNm5TWcexT1Jix3KPWaVNL6hgFoYYelSEi4IO7Ewz VFN9a9HypKLXYVq/yn0B58EDBsa8dCMFFtIka+56JJAYQtFtCZk0Xxag0OPBdPm9U1ZD7FTmfHE agQG4l6sZUh8tL/DIVVZvprLtk0rLq+qeiGWR3aOo/TC/YT+o1W2SgQqRXnOo8gBpoDqHdNptYt KXguZGbRlE7MwbHVnKeIrEZgGZT94fC9Ip/RxiY9y2kJMnquDpf8GbgCL3d1GM5tQnuZXbMV8pE 7hx4y+nF4Kg5IYK3DRppRSl95dDX8TBEcPinKyzjzG8FRnpegt1p6dsxWrj6IwHqatW+WB4/XHe ZdTdO9hG70qvmSyQkjw== X-Proofpoint-Spam-Info: AW1haW4tMjYwODI2MDA5MyBTYWx0ZWRfX49V1Ub5KCjJJ wVFVs7M1JSi8PlB3ZGbCapcj8P9+FJnX/gXVs9QsviswKiZzzfwh/A1H7GxzLDg+B0VpnuwH5i0 kG3mkEP0siOfHX0fF9fVhDEZzSljrqc= X-Proofpoint-GUID: SuYYCoiEWB30s93xu0kclSrrudOAn8XQ X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.134,FMLib:17.12.100.49 definitions=2026-08-26_03,2026-08-26_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 lowpriorityscore=0 spamscore=0 adultscore=0 malwarescore=0 clxscore=1015 phishscore=0 priorityscore=1501 suspectscore=0 bulkscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606150000 definitions=main-2608260093 More than one rule evaluates pure code - stripped from comments and indentation - thus store this pure code in DtsLine class for better performance. Signed-off-by: Krzysztof Kozlowski --- scripts/dtc/dt-check-style | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/scripts/dtc/dt-check-style b/scripts/dtc/dt-check-style index b71e6bf815a7..43069fc1fac9 100755 --- a/scripts/dtc/dt-check-style +++ b/scripts/dtc/dt-check-style @@ -79,18 +79,19 @@ def is_preprocessor(stripped): =20 =20 class DtsLine: - __slots__ =3D ('lineno', 'raw', 'linetype', 'indent_str', 'stripped', = 'is_root', + __slots__ =3D ('lineno', 'raw', 'code', 'linetype', 'indent_str', 'str= ipped', 'is_root', 'prop_name', 'continuations', 'node_name', 'node_addr', 'label', 'ref_name', 'parent', = 'depth', 'closures') =20 def __init__(self, lineno, raw, linetype, depth, indent_str, stripped,= is_root =3D False): self.lineno =3D lineno # 1-based within the block - self.raw =3D raw + self.raw =3D raw # Entire raw line self.linetype =3D linetype self.indent_str =3D indent_str # leading whitespace as-is self.depth =3D depth - self.stripped =3D stripped + self.stripped =3D stripped # Code without indentation + self.code =3D _strip_strings_and_comments(stripped) # Only the = code, skipping trailing comments self.is_root =3D is_root self.prop_name =3D None self.continuations =3D [] @@ -811,8 +812,7 @@ def check_hex_case(ctx): LineType.COMMENT_START, LineType.COMMENT_BODY, LineType.COMMENT_END, LineType.PREPROCESSOR): continue - text =3D _strip_strings_and_comments(dl.raw) - for m in re.finditer(r'\b0[xX][0-9a-fA-F]+\b', text): + for m in re.finditer(r'\b0[xX][0-9a-fA-F]+\b', dl.code): lit =3D m.group(0) if any(c.isupper() for c in lit[2:]) or lit[1] =3D=3D 'X': yield (dl.lineno, @@ -860,9 +860,9 @@ def check_value_whitespace(ctx): for dl in ctx.lines: if dl.linetype !=3D LineType.PROPERTY: continue - segs =3D [_strip_strings_and_comments(dl.raw).strip()] + segs =3D [dl.code.strip()] for cont in dl.continuations: - segs.append(_strip_strings_and_comments(cont.stripped).strip()) + segs.append(cont.code.strip()) text =3D '' for s in segs: if not s: @@ -895,8 +895,7 @@ def check_node_close_alone(ctx): LineType.COMMENT_START, LineType.COMMENT_BODY, LineType.COMMENT_END, LineType.PREPROCESSOR): continue - text =3D _strip_strings_and_comments(dl.raw) - if '};' in text: + if '};' in dl.code: yield (dl.lineno, 'closing brace must be on its own line') =20 --=20 2.53.0 From nobody Mon Sep 28 04:56:12 2026 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 19A703E49C0 for ; Wed, 26 Aug 2026 11:16:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787742997; cv=none; b=hI+u+kAMtS7bqMcfxG8k362SUogqXmnw+t8VV7iYl4JAy8W1UDJlg+mn8cnMdg2IViu0CQsJS7dTAiLtwMH4NqoidGow/4RpaPHjyTPNF6k4+ABQJlenTEDKS3Ebe9N7XjJW51XceJ9KGnR9HKTsdwW5AO/I+ARsPyoZhCjmECs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787742997; c=relaxed/simple; bh=+2ROCb6kqVvx17mUmZm+JMrsgCHyyS4gQ9bjeReqjas=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=L7F4AFaEob83EQt1x0xI7LZnJ/EjNIhQbUjYvLE4jNIza21W60uotiaCSF25BDxW5L1zP6Y/BL+NKPUUdFixgFu3yKG9J9G324WA/xnSaknsXSlT69dIvkdxShV6M+mxQam0PQpZN1tLlSIXe4n6sWPjliLAO4GKpwhuAVg7H5U= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b=L5ddki1H; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=NQrdwz65; arc=none smtp.client-ip=205.220.180.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b="L5ddki1H"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="NQrdwz65" Received: from pps.filterd (m0279872.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 67QAGq4A107582 for ; Wed, 26 Aug 2026 11:16:23 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= NdZFtBZ8aaJXcDnF46oSRjvRUH8o02DrQqlCp10tq1s=; b=L5ddki1HCjdvwZ2v WvXXuVauZ+00QmW45h2gDl6ENJcwoQ17Wk6Jb8XfAM6jzVIbSP2RgkJwgOXPdaKu W8MzPJp/Sz3w+oe6MxaVFpdnp8KKvNJ3b7BP3Lsw8CxzwtTSLBchnS0AC6Pbl7X9 oZGKx931eH2l3QalEL+555alkJVEVQRR+i8IpePoDmbOO/yaRgHTU6VH6bsPcg8f DF20X7opNUNPbmQmteZmxVKd+aq/fSxifHwWMK7180pYfJ1Hbdu/Tj3z9uiyphsn GihHVZ9hpeTxuP93Xrq2LhVoKeJgW5ONEpVdp+YEzS8sdubyljPzFi6yMXKHxajv LU28Cw== Received: from mail-qt1-f199.google.com (mail-qt1-f199.google.com [209.85.160.199]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4g9s9g9hjx-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Wed, 26 Aug 2026 11:16:22 +0000 (GMT) Received: by mail-qt1-f199.google.com with SMTP id d75a77b69052e-52769fc3f2eso11785671cf.0 for ; Wed, 26 Aug 2026 04:16:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1787742982; x=1788347782; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :content-type:mime-version:subject:date:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=NdZFtBZ8aaJXcDnF46oSRjvRUH8o02DrQqlCp10tq1s=; b=NQrdwz65Imaolx06dODY7fyYT6I/uc/ZO1MAff23oSjqYIeHRw8lnXoHs6NQqXyT2t WX/BROb+WYBduUKC1SHjwMMFFJJlb7F/dvmB3+DhkQ3YMo00oA6cX2WE0jgvkgFR46lO GisbMNMK2SqW2dk+PHvbiuizUsHuPfBvSzjQUAgixmBbg5V0LFL+8PIbQDM7QeJRBjyo XlqPQYaaIAbDmEnDXJ4S3mQxtpK9/uK+f+zEK3wXUMT/7ssuU1bygB2FuJJmv3zQ6wJ/ fHxeR3Snwm80lEFVExwRT2iyYbhjYsq78U0n+bUQBhosj4C8CbtsAKEqW+GpkoOH5J7G sv2w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1787742982; x=1788347782; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :content-type:mime-version:subject:date:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=NdZFtBZ8aaJXcDnF46oSRjvRUH8o02DrQqlCp10tq1s=; b=i10uX+is3NbqTwVIJHi2SNCCcXCR2/jrF96KcZhYMjp5wTFOSDGO3QJXptB+Fv86NQ uis7nsG4FN0seswi7sP4ZTCPta4RaEwmBNWk0WWGvQqzbGcxTsCxcTo2vkEsf8VU6vDm MNk4wVl/LsnnsiRBFyAUTp5uIqvBAL/y7VekPCfZKhkwNE9L/4iwLv1hNfxuAOxsbyPT EOcjntuqD2O7e/1EfAp/p7i7zC+US9LF/vQnjWfwiin8uaOujzfBHokGiHb0fBlBATor 6EWBSBwef1p+DSOl696Ch1jrELPN5AvqtZC1RT7hoBuFO5lV5oahHgN0Sa7iwJHAdGOK kN3A== X-Forwarded-Encrypted: i=1; AHgh+Rr5P9YsM9S8T19sKT383ft4JPJuXBPA2wN/HUoP5l0hPpLpQn6VRFxi047UzBPgYz+qhhGmQdCqO+Wqc0w=@vger.kernel.org X-Gm-Message-State: AFuF++nwb0bIPQls9DIeaFRIfQeg8wnlwjNyE5tO5MszWEm7KAqyCYsZ hHLWx3xBUkX3gPnNoB+VAdNWi1z+JRD/TIYd+GWbVp4zFto6sMRWZZANw83X87kr3c2+Nf4c3Qc BCffFIGLCcmOienBWAwFSfnv/rx9+1/BBGZE8u51Gv+rvWlePYd4CclJIWxVzWEMDD7s= X-Gm-Gg: AR+sD121QyzJTiQZPwCFp2VmvpRKl2bmoGgRHXObRnmRgfAUIhLEH++m130GcDAB5xC gEMCUfeF8KJiLZQTbxp0WXPZcf75/ZK/ZJpZIj8pE/L0KUioFNTNFycwjhrEW/V2dyAflHapu8V FBlSuguEgZCRsGQ/TChOCfIHRp5I+yju08SmhM0hmr7AYSofmdXrFdoQ77vKl+yyT5KD81g7d/s QBZPIeurvUQ7Pfs9hoXInG7DKpZfv0RFR8B1BgLe3WoytkZdI+T9wBVv66Gj54qewFsGQ1932R1 AnChqhdoaIGxFC65w851NAXtzJULCGwrt2i2xmdyE8ZOaBB5CAFScPXYrIc9vjRo7cIE6ClzoB3 hGyk6EvFFaH+3df/SYlW0R5s= X-Received: by 2002:ac8:594a:0:b0:52d:953b:2c25 with SMTP id d75a77b69052e-52e423cf77emr57101861cf.38.1787742982300; Wed, 26 Aug 2026 04:16:22 -0700 (PDT) X-Received: by 2002:ac8:594a:0:b0:52d:953b:2c25 with SMTP id d75a77b69052e-52e423cf77emr57101441cf.38.1787742981875; Wed, 26 Aug 2026 04:16:21 -0700 (PDT) Received: from [127.0.1.1] ([178.197.219.214]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-6a5de8ea6d0sm4577843a12.13.2026.08.26.04.16.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Aug 2026 04:16:21 -0700 (PDT) From: Krzysztof Kozlowski Date: Wed, 26 Aug 2026 13:16:00 +0200 Subject: [PATCH v6 08/10] dtc: dt-check-style: Add test for trailing white-space in DTS Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260826-n-dts-style-checker-continued-v6-8-f270b1e81f8e@oss.qualcomm.com> References: <20260826-n-dts-style-checker-continued-v6-0-f270b1e81f8e@oss.qualcomm.com> In-Reply-To: <20260826-n-dts-style-checker-continued-v6-0-f270b1e81f8e@oss.qualcomm.com> To: Rob Herring , Saravana Kannan , Krzysztof Kozlowski , Conor Dooley Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Krzysztof Kozlowski X-Mailer: b4 0.16.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1226; i=krzysztof.kozlowski@oss.qualcomm.com; h=from:subject:message-id; bh=+2ROCb6kqVvx17mUmZm+JMrsgCHyyS4gQ9bjeReqjas=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBqjsrzcXXLIdW5+HKR0+bFE9ukr+ZYYwGbbmpsh L04Nv6fxlqJAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCao7K8wAKCRDBN2bmhouD 10/UD/9MNR8EgV/C7oNIupAuP02wWuFOtKfCcC0zlaDFDMgqHdEVfxDLPiFu5tudyQRsT7x+TVy q42tIm9Nj9w3PairJFmqUDPJ4UdJj2RrUTjCJj8Nw/b67hHRrZDRzLZ9EFJi/4kqNiqkCvp7lqm XNSfNn5n8Hy2vYWXhVJRHd9vq4vVgHiMEMH3x2YHsxTUqTotWUv1J7wD/x+safpDkhHMULg7735 9Ci0L8OOou6hAHaD+9nObdqTSSfA5/BQfo6IqP3pEitQKor9SA2sNH+MY/79T7LN1b0spad5fyD 4JlHo/VJD8l+oOOcaFXveTwKHgsYdi7XyCIJ6720vG+jPxbSFyLsBiaFI6nmgxowHfFzOQSof9Q SMLKWoTmaytThYJm4QgVvCZNaAlP58FgYjtNBAI2qL3caE5KdIIFBnO0/Gtznb/XV9P7YFiXrOw r69xFLZeFDonwLz6bemYE1mHJ6IsaVYyi9CdVEwbJpYen2WpfJsJSZ6fgsex81UI8gd2nsAyKW9 UvGpX/TXNK3JR6UpdLMMoMKsOEOTVetmf3d+GRCpIgCoJokWl+O0jZHMnfET8qzrf+Q7NkmeBKO AuPDhLhF755ZlTrpCUDlcgq5h7rA57uB9vHsTafXXeqLJw3Do2S+YMD5baCEyTuafVNa7axIoKD osxWiYGj3yLYJnw== X-Developer-Key: i=krzysztof.kozlowski@oss.qualcomm.com; a=openpgp; fpr=9BD07E0E0C51F8D59677B7541B93437D3B41629B X-Proofpoint-GUID: BltHMAq62gZO_Djpfrb4PxdZh86a2oF7 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwODI2MDA5NCBTYWx0ZWRfXwN9EyKMmuxT6 +cHjZ4rc9fLi7cei2vhVBo0Dt9z9bqCEVgSp72vb5LyVLY6rluXQxt+FQYzj5o3LGJAzt9YjAsT f1Ke+6TF+NSMkWDKk5sW7p4JvDHkzQwnt000Zicfb8gYr8kd6SzrYrD+GCTQUHsngrmXOz4dDR6 uji0n6orM5/5h5aM+EN0B+rjVW8p2zExLQkaVVaR1mSztGnS2EIBd50SS0d3BhMw+iRgtFbfrde FoRkf+zfxsDBkp5IJ7l8qwz7R9MxQaahRD5JdaL7KAHhl8DYzhqzYyYlVDTlGuJfN70qvHF+R3D PteatoUv9NIt4+zPgpmpusVCVp5Otx7cw0JoMvxncUX2um1IDzTZD+/FIa1YTCPy6QLX5zr0Pzt 8zIvVbFEHnSGO6YpzK6Xd3UXlTLDwCkvy4Op+672jC0AFzdRTxNyKb6vEb7M7NCpCqOOZDh4XLX i6UcF9T89Y7n0RJ0i3w== X-Authority-Analysis: v=2.4 cv=Xfq5Co55 c=1 sm=1 tr=0 ts=6a8ecb06 cx=c_pps a=WeENfcodrlLV9YRTxbY/uA==:117 a=+bKQE0WJfmhK2875HamI0Q==:17 a=IkcTkHD0fZMA:10 a=Sv0fKeRqtYgA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=yx91gb_oNiZeI1HMLzn7:22 a=EUspDBNiAAAA:8 a=ZteHwOODggqzs_94cHsA:9 a=QEXdDO2ut3YA:10 a=kacYvNCVWA4VmyqE58fU:22 X-Proofpoint-Spam-Info: AW1haW4tMjYwODI2MDA5NCBTYWx0ZWRfX8RrSRow+9mnQ qsIBkt0AMy235tyy2zhe4rV//OoRYD3b7twRQKqVeLk6MxbzyIhW8czTSRiRVmu6gk1qHFwE0YE Pa7U8iDyizu1UbhxxM1DXiU+hP3K3Hk= X-Proofpoint-ORIG-GUID: BltHMAq62gZO_Djpfrb4PxdZh86a2oF7 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.134,FMLib:17.12.100.49 definitions=2026-08-26_03,2026-08-26_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 lowpriorityscore=0 phishscore=0 suspectscore=0 priorityscore=1501 bulkscore=0 clxscore=1015 malwarescore=0 adultscore=0 impostorscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606150000 definitions=main-2608260094 Add unit tests for expected warnings for trailing white-spaces in DTS (there is only one for YAML files). Signed-off-by: Krzysztof Kozlowski --- scripts/dtc/dt-style-selftest/bad/dts-trailing-ws.dts | 8 ++++++++ scripts/dtc/dt-style-selftest/expected/dts-trailing-ws.dts.txt | 2 ++ 2 files changed, 10 insertions(+) diff --git a/scripts/dtc/dt-style-selftest/bad/dts-trailing-ws.dts b/script= s/dtc/dt-style-selftest/bad/dts-trailing-ws.dts new file mode 100644 index 000000000000..1eb24d91c640 --- /dev/null +++ b/scripts/dtc/dt-style-selftest/bad/dts-trailing-ws.dts @@ -0,0 +1,8 @@ +// SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +/dts-v1/; + +/ { + compatible =3D "example,test-board"; =20 + #address-cells =3D <1>; + #size-cells =3D <1>; +}; diff --git a/scripts/dtc/dt-style-selftest/expected/dts-trailing-ws.dts.txt= b/scripts/dtc/dt-style-selftest/expected/dts-trailing-ws.dts.txt new file mode 100644 index 000000000000..94d9ae9d616c --- /dev/null +++ b/scripts/dtc/dt-style-selftest/expected/dts-trailing-ws.dts.txt @@ -0,0 +1,2 @@ +# mode=3Drelaxed +bad/dts-trailing-ws.dts:5: [trailing-whitespace] trailing whitespace --=20 2.53.0 From nobody Mon Sep 28 04:56:12 2026 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BB6E03F20F4 for ; Wed, 26 Aug 2026 11:16:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787742995; cv=none; b=UE1uGDd5zsldsKCj7muH4HJHiK9e+2OxoJOSpwZ20gCJ89cwsqzbGkaBS9jz8EisP4m95z8891h2B7/2WqLLozmradprROZ8BE7jwQvNfIQ+/ykLf1mwWpGio/8ieoH+xbf1ith+KB4QfLKWSa9Gf/djxGRmBjQB/wBLXpoyoKs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787742995; c=relaxed/simple; bh=JO+IzFZn+yaDfy6uNVzBpaE8MfXyIpmMMi+mY0p12Lc=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=Qs0/V2IMOmpTBR3fbt+vEMJNLhFy/cGXcaSFJWcWgxsfk6eeWaKmFUcF3b1gRp3P1Q0TW0GfRVrK8g6qKpf3ujaRJuE2SzlrDueR+AqEAXW2b5hjsJP51lsImMX7pNRqUlXoPGnLC6gWbMC7FYo7Pwm71chUxXbdiCqCfXFG9AY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b=GN686/px; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=XTwCyIiF; arc=none smtp.client-ip=205.220.180.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b="GN686/px"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="XTwCyIiF" Received: from pps.filterd (m0279872.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 67QAGpP6107577 for ; Wed, 26 Aug 2026 11:16:25 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= JfFq5wrpX8fufdvKRXSJaT/toW4GF1FW+U01x9e8DnQ=; b=GN686/pxBQCSZcfL LFXOKiu5kcBPbccdw++aq6ckNNb5V6NV/vFy8FWDFK0yjNo5ZbQqt1XT0KZ5rLYO 5psTTYsSHi/S7HH81wPsze03wbkfuzFzTe1UYxhtj6DaSpRYKLsVh48bfOlEiYvt kMsL1Owag8kccvVmkij8Utj5aqpYpIHi0BL+WkSJ3HksMGk1So92duP+zl3fb1fX q+vybc9GrwHwwGrQbjRYzBpkx62s/LS6Si5laH12iNKa7+OrZ+hMbC72dZsTidHh lcYJ81UQSm2DJDcbEFFdgZpYqt0TiAV0eyjRTthUCfUVg4+nZfOPwavt8tV1gfKy syV9aw== Received: from mail-qt1-f197.google.com (mail-qt1-f197.google.com [209.85.160.197]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4g9s9g9hk5-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Wed, 26 Aug 2026 11:16:25 +0000 (GMT) Received: by mail-qt1-f197.google.com with SMTP id d75a77b69052e-5174a236220so8053811cf.3 for ; Wed, 26 Aug 2026 04:16:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1787742984; x=1788347784; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :content-type:mime-version:subject:date:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=JfFq5wrpX8fufdvKRXSJaT/toW4GF1FW+U01x9e8DnQ=; b=XTwCyIiF2XHv2wiaO2jsN83sXNWGAjWtVbXYypTXsBYzop17qIIVGruzj8U2M7lyVC zmZvH+95Sg2Yaxi1V56htcr8IiRaQEO+/nM40cvi4DJHy/lVSzqXim7A5vby6uf9HdXp rALVYUeJ2cMoZqRqk3UoZUG2yL5j7BCbrfvdUuS4L9RZixCSNHxoOUWWo3GqqCAHzYrE GcPD55Zx4Kzo377RnfBfoHWGcUGw79f9VF9KH4EMa+RATaWI5R4axeJqJq0KnBrC/nr5 QjzY1U4Np9UVP2nqqbcj3hgis3vRwj4dqSHEBd5tfxtlmgALYjlK3Flh/O8iROGOKE3c wmRw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1787742984; x=1788347784; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :content-type:mime-version:subject:date:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=JfFq5wrpX8fufdvKRXSJaT/toW4GF1FW+U01x9e8DnQ=; b=F7r3W0Ufxqc5NDaolJ2NZxDvpYCI97/XdT5i9p+ksbToKn6S5RVWay9p5dI/GIQnUS Ks7t3045g/UaUfLmZ4kMPVa3SO+hiWVDum3kvauBq9T10JpTNjutcYG8C6wKnxpKMSrz jjLavcZ6ENLp9DXr5Ht1NSrBHFumeuFDUgON+jEGKKkOsA1ZpaBxvtK1EDV50uNlAzYL VtjCgM64tZ9zbPX4stXcetk6qUsyTDHsyKicV1MVZvVnmFHzMI67tyqa159gPBCNy9O2 s8sMuMr/shwUom2wrV3F60tMN0s6x58joVolfgr+BlL3OWLye9MzqvwFoK5oBmCHkOie Rs4w== X-Forwarded-Encrypted: i=1; AHgh+Ro6QJtgIcizqV2XzXzm0bXJyRFZaoyVQUnNhQaCD1v22n0XW9YLhk9AYbDjPpBbQH+yBdlLVrCvuTszi7w=@vger.kernel.org X-Gm-Message-State: AFuF++kTnEG86wLf4GLk3FOYRqKFDDQmnzTJlJeYbOn8GkLuYN4g4E1K 2e2RBEGR94qSgQ2EJ9bLNW/DNHD8fEQ8ELGaoKM7Qf4q9JxtjZc08uI724uKbZUo5djBIZUUqHI xLIJcRBi2eIRNr3HfHfKT8M6oxlTMjf15OMxb2j+4NW+H1WPs9cl+7A+/byZW49vNa8hjeaFE5J Q= X-Gm-Gg: AR+sD13dpbiCVY7nlmaHHY8nYxHdrE9ePVlZcxXMqRnLbcKSA83PZxNXCPoTHtl3UIF bbw2vzZ5cq0B0nL3vHzU7KnOfZFFny64etu9VorlDK7mYA5HCXRwyIJ66YSLhRMB3Ueuk0Caya8 9LO2V51b1wupXBY1FwGRr5pEbW+IFd0lG6xKf9/yBM8st8lu6uylEe9v7CAdsAfgznws3isYZlf JhYv7hTID266v4BjdX0v3CO+f5YJB5rHI0NPXZ0EynpaXJQP7/Aq3EkFxcS9Lys6c7xNq2dwwYz NLLksOUR4FjtThppyMQb37pHXoFYUoOUZ6FRRH/XJmMgz+2mbPKQ46Bl7SConryvWtNYZRz1ZPf JCMfxzhrJ614YoEt84n4NWnA= X-Received: by 2002:a05:622a:c84:b0:51c:ba4:d837 with SMTP id d75a77b69052e-52e422a1bb1mr58386741cf.18.1787742984154; Wed, 26 Aug 2026 04:16:24 -0700 (PDT) X-Received: by 2002:a05:622a:c84:b0:51c:ba4:d837 with SMTP id d75a77b69052e-52e422a1bb1mr58385881cf.18.1787742983593; Wed, 26 Aug 2026 04:16:23 -0700 (PDT) Received: from [127.0.1.1] ([178.197.219.214]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-6a5de8ea6d0sm4577843a12.13.2026.08.26.04.16.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Aug 2026 04:16:22 -0700 (PDT) From: Krzysztof Kozlowski Date: Wed, 26 Aug 2026 13:16:01 +0200 Subject: [PATCH v6 09/10] dtc: dt-check-style: Add warning for redundant white-spaces Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260826-n-dts-style-checker-continued-v6-9-f270b1e81f8e@oss.qualcomm.com> References: <20260826-n-dts-style-checker-continued-v6-0-f270b1e81f8e@oss.qualcomm.com> In-Reply-To: <20260826-n-dts-style-checker-continued-v6-0-f270b1e81f8e@oss.qualcomm.com> To: Rob Herring , Saravana Kannan , Krzysztof Kozlowski , Conor Dooley Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Krzysztof Kozlowski X-Mailer: b4 0.16.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=15521; i=krzysztof.kozlowski@oss.qualcomm.com; h=from:subject:message-id; bh=JO+IzFZn+yaDfy6uNVzBpaE8MfXyIpmMMi+mY0p12Lc=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBqjsr0PDo0EgzKDusjyEtZu2HFkQWfHLfOC6nFg 3WAZ9gUr1eJAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCao7K9AAKCRDBN2bmhouD 1yhUD/4uxn9TmweHMCUWkGOOmXhuszO2/FKvH96qMj1obGYqHxBCuRpTHAMk3l4BS/OaSBFgltC wZrVf54lDBNXdN/kKwoDhwaun5dbRSPCDVBFejcweMUFm3BjjTkTiZBujFetu2mYoStwgve19us 9b4dWolTUhOIk7rlPyIPE1/3siRa6svqvpgxGEtUvErN7txP+BQPk8MaMI7n7WtayUEyNMNKTJw A6j+OLW0kaRBqcyZ6U3R6ur83gAkazmppFgbWQLMp2ON3vfKzYastYWcug8Xfs1y7mTvkBOYMlA uTX1X8nCYPOUblaTF7zVIv2gypB/8UtBLI3XFmzwKPMoS3Wf/Vjit/tY1uPQRyDOIm5LdFN3P9y R85lqev7DSUyX3c7Y03fXHzlLeK0BzamL6nXAJOTnG4vB0lQIsJDR4OTjboHMoCrKbWbY6uJ2E3 a69RYUFL1yXPfOEFKPbFoZgYMVvRAfypXCWKYsvk8I3jdsnASBgDS+JGRz0IKJo6vcDE8dkOt3M RJDlnD7Snl/ValxMs8k/66gTu5q/NwYQND1uiUn8bo63bOkRblTbWYF8eJcfxrjQyyFEjL5T0/K NKhxJ92xYedgnYBw7MHlrhoNC0I8I0uOYTOeFDfltbWDtsezhjYugzt669Gpt3MYdy4RaKOYrHL J9BEqteDKhLMqTA== X-Developer-Key: i=krzysztof.kozlowski@oss.qualcomm.com; a=openpgp; fpr=9BD07E0E0C51F8D59677B7541B93437D3B41629B X-Proofpoint-GUID: STSRJeyHbokjCvRh9EpD3Sxx7j6lDHlE X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwODI2MDA5NCBTYWx0ZWRfX3vNkJ1nCwDyZ V2wmrpgtlg46QFwgczqUTSUFQNtnF7Y4cy8pj+OhSsbO1IGWavMBcVr202AaYO9EwRMrDcQE1EX jnyybalbY0fDN4xuvFY6HUDNQt7LLRoc07KaUx3QanyK/CELtmxZgy6z8ytPG9niuPaqTdj7EkU E7is/2+eAKtqKrZal67BFMyRjedLwLGwpd5ko0LRqVnu/TMrTdE3wGrnoAOaJKM5c4fdCES0TKz qtKUmwvW5jk/YNX/AiMepbcDziyqgBM4i1eovThwon6Lusr4VgR8OavE3G83hqXBh96rpOBjDKL c4wwM5hUxDyELevmr/QRN8Mv48gpFjaWsxKWibYW/eP82CL0EOLi+1eAmG6O16zsvVMW0p841Se Q4KzobfKMu8PtBBa+nFro0yXFGqAo4JvRLZZ8s1MwWy0s3oAq/tsR3QFUwp8F8MJECHNSTRZE0j vonG3EfiJ8hR7oc7nMA== X-Authority-Analysis: v=2.4 cv=Xfq5Co55 c=1 sm=1 tr=0 ts=6a8ecb09 cx=c_pps a=EVbN6Ke/fEF3bsl7X48z0g==:117 a=+bKQE0WJfmhK2875HamI0Q==:17 a=IkcTkHD0fZMA:10 a=Sv0fKeRqtYgA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=yx91gb_oNiZeI1HMLzn7:22 a=gEfo2CItAAAA:8 a=EUspDBNiAAAA:8 a=VwQbUJbxAAAA:8 a=m3j7uktoDPJKQtxIavEA:9 a=QEXdDO2ut3YA:10 a=a_PwQJl-kcHnX1M80qC6:22 a=sptkURWiP4Gy88Gu7hUp:22 X-Proofpoint-Spam-Info: AW1haW4tMjYwODI2MDA5NCBTYWx0ZWRfX4YAiq54mKnfi QHDMYZaNFOoJ3LbzRpPzsS2IPv8bqx4yXuASQOLYVwEdAexCQMhod8D/h7TNpB73R9yGy5iN9dU w+GYGKTnyPQvVz0YsBDFVZOIymyMIwA= X-Proofpoint-ORIG-GUID: STSRJeyHbokjCvRh9EpD3Sxx7j6lDHlE X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.134,FMLib:17.12.100.49 definitions=2026-08-26_03,2026-08-26_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 lowpriorityscore=0 phishscore=0 suspectscore=0 priorityscore=1501 bulkscore=0 clxscore=1015 malwarescore=0 adultscore=0 impostorscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606150000 definitions=main-2608260094 Show warnings of too many spaces around '=3D', after ':', before '{' and ';' characters, or using tabs for these. Both in-tree DTS and DT bindings have many warnings for the first case (too mant spaces around '=3D'), thus keep this one only for 'strict' mode. Signed-off-by: Krzysztof Kozlowski --- scripts/dtc/dt-check-style | 44 ++++++++++++++++++= ++++ .../bad/dts-redundant-ws-strict.dts | 27 +++++++++++++ .../dtc/dt-style-selftest/bad/dts-redundant-ws.dts | 28 ++++++++++++++ .../dt-style-selftest/bad/dts-redundant-ws.dtso | 9 +++++ .../bad/yaml-redundant-ws-strict.yaml | 31 +++++++++++++++ .../dt-style-selftest/bad/yaml-redundant-ws.yaml | 35 +++++++++++++++++ .../expected/dts-property-order.dts.txt | 1 + .../expected/dts-property-order.dtso.txt | 1 + .../expected/dts-redundant-ws-strict.dts.txt | 13 +++++++ .../expected/dts-redundant-ws.dts.txt | 10 +++++ .../expected/dts-redundant-ws.dtso.txt | 2 + .../expected/yaml-redundant-ws-strict.yaml.txt | 5 +++ .../expected/yaml-redundant-ws.yaml.txt | 4 ++ 13 files changed, 210 insertions(+) diff --git a/scripts/dtc/dt-check-style b/scripts/dtc/dt-check-style index 43069fc1fac9..487e76b85105 100755 --- a/scripts/dtc/dt-check-style +++ b/scripts/dtc/dt-check-style @@ -349,6 +349,42 @@ def check_trailing_whitespace(ctx): yield (dl.lineno, 'trailing whitespace') =20 =20 +def _check_redundant_whitespace(dl): + if dl.linetype in (LineType.COMMENT, LineType.COMMENT_BODY, + LineType.COMMENT_END, LineType.COMMENT_START, + LineType.PREPROCESSOR): + return + if re.search(r'(\s\s+|\t)\{', dl.code): + yield (dl.lineno, 'extra whitespace before {') + if re.search(r':(\s\s+|\t)', dl.code): + yield (dl.lineno, 'extra whitespace after :') + if re.search(r'\s+;', dl.code): + yield (dl.lineno, 'extra whitespace before ;') + + +def check_redundant_whitespace(ctx): + """No whitespace between brackets or other code elements. + See also check_value_whitespace() for more checks.""" + for dl in ctx.lines: + yield from _check_redundant_whitespace(dl) + for cont in dl.continuations: + yield from _check_redundant_whitespace(cont) + + +def check_redundant_whitespace_strict(ctx): + """No whitespace between brackets or other code elements. + See also check_value_whitespace() for more checks.""" + for dl in ctx.lines: + if dl.linetype in (LineType.COMMENT, LineType.COMMENT_BODY, + LineType.COMMENT_END, LineType.COMMENT_START, + LineType.PREPROCESSOR): + continue + if re.search(r'(\s\s+|\t)=3D', dl.code): + yield (dl.lineno, 'extra whitespace before =3D') + if re.search(r'=3D(\s\s+|\t)', dl.code): + yield (dl.lineno, 'extra whitespace after =3D') + + def check_tab_in_yaml_example(ctx): """Reject literal tabs in DTS lines when input is YAML. =20 @@ -1003,6 +1039,10 @@ RULES =3D [ Rule('trailing-whitespace', 'relaxed', 'no trailing whitespace on any line', check_trailing_whitespace), + # See also check_redundant_whitespace_strict() and check_value_whitesp= ace() + Rule('redundant-whitespace', 'relaxed', + 'no redundant whitespace within code', + check_redundant_whitespace), Rule('tab-in-yaml', 'relaxed', 'YAML (also DTS examples) may not contain tab characters', check_tab_in_yaml_example, applies_to=3D('yaml',)), @@ -1053,6 +1093,10 @@ RULES =3D [ Rule('unit-address-format', 'strict', 'unit addresses must be lowercase hex without leading zeros', check_unit_address_format), + # See also check_redundant_whitespace() and check_value_whitespace() + Rule('redundant-whitespace-strict', 'strict', + 'no redundant whitespace within code', + check_redundant_whitespace_strict), Rule('value-whitespace', 'strict', 'no whitespace directly inside <...> brackets', check_value_whitespace), diff --git a/scripts/dtc/dt-style-selftest/bad/dts-redundant-ws-strict.dts = b/scripts/dtc/dt-style-selftest/bad/dts-redundant-ws-strict.dts new file mode 100644 index 000000000000..201e3940ba1c --- /dev/null +++ b/scripts/dtc/dt-style-selftest/bad/dts-redundant-ws-strict.dts @@ -0,0 +1,27 @@ +// SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +/dts-v1/; + +#define SOME_MACRO(foo) \ + (foo) ? <1> : <2> ; + +/ { + compatible =3D "example,test-board"; + #address-cells =3D <1>; + #size-cells =3D <1>; + + /* comments { are okay =3D though ; */ + soc: soc@0 { /* comments { are okay =3D though ; */ + compatible =3D "simple-bus"; /* comments { are okay =3D though ; */ + ranges =3D <0 0 0 0xc0000000>; + + #address-cells =3D <1>; + #size-cells =3D <1>; + } ; +}; /* comments { are okay =3D though ; */ + +&soc { + serial: serial@20000 { /* comments { are okay =3D though ; */ + compatible =3D "example,serial"; + reg =3D <0x20000 0x1000>; + } ; +}; diff --git a/scripts/dtc/dt-style-selftest/bad/dts-redundant-ws.dts b/scrip= ts/dtc/dt-style-selftest/bad/dts-redundant-ws.dts new file mode 100644 index 000000000000..f6480ddc508a --- /dev/null +++ b/scripts/dtc/dt-style-selftest/bad/dts-redundant-ws.dts @@ -0,0 +1,28 @@ +// SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +/dts-v1/; + +#define SOME_MACRO(foo) \ + (foo) ? <1> : <2> ; + +/ { + compatible =3D "example,test-board"; + #address-cells =3D <1>; + #size-cells =3D <1>; + + /* comments { are okay =3D though ; */ + soc: soc@0 { /* comments { are okay =3D though ; */ + compatible =3D "simple-bus"; /* comments { are okay =3D though ; */ + ranges =3D <0 0 0 0xc0000000>; + + #address-cells =3D <1>; + #size-cells =3D <1>; + } ; +}; /* comments { are okay =3D though ; */ + +&soc { + serial: serial@20000 { /* comments { are okay =3D though ; */ + compatible =3D "example,serial"; + reg =3D <0x20000 0x1000>, + <0x30000 0x1000> ; + } ; /* comments { are okay =3D though ; */ +}; diff --git a/scripts/dtc/dt-style-selftest/bad/dts-redundant-ws.dtso b/scri= pts/dtc/dt-style-selftest/bad/dts-redundant-ws.dtso new file mode 100644 index 000000000000..01d94e14071a --- /dev/null +++ b/scripts/dtc/dt-style-selftest/bad/dts-redundant-ws.dtso @@ -0,0 +1,9 @@ +// SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +/dts-v1/; +/plugin/; + +&{/} { + compatible =3D "example,test-board"; + #address-cells =3D <1>; + #size-cells =3D <1>; +}; diff --git a/scripts/dtc/dt-style-selftest/bad/yaml-redundant-ws-strict.yam= l b/scripts/dtc/dt-style-selftest/bad/yaml-redundant-ws-strict.yaml new file mode 100644 index 000000000000..739c44fd7217 --- /dev/null +++ b/scripts/dtc/dt-style-selftest/bad/yaml-redundant-ws-strict.yaml @@ -0,0 +1,31 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/yaml-redundant-ws-strict.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Test fixture with redundant whitespace + +maintainers: + - Rob Herring + +properties: + compatible: + const: example,test-redundant + reg: + maxItems: 1 + +required: + - compatible + - reg + +additionalProperties: false + +examples: + - | + device@1000 { + compatible =3D "example,test-trailing"; + reg =3D <0x1000 0x100>; + clocks =3D <&clk 0>; /* comments { are okay =3D though ; */ + clock-names =3D "bus"; /* comments { are okay =3D though ; */ + } ; diff --git a/scripts/dtc/dt-style-selftest/bad/yaml-redundant-ws.yaml b/scr= ipts/dtc/dt-style-selftest/bad/yaml-redundant-ws.yaml new file mode 100644 index 000000000000..b2f51969b0ff --- /dev/null +++ b/scripts/dtc/dt-style-selftest/bad/yaml-redundant-ws.yaml @@ -0,0 +1,35 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/yaml-redundant-ws.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Test fixture with redundant whitespace + +maintainers: + - Rob Herring + +properties: + compatible: + const: example,test-redundant + reg: + maxItems: 1 + +required: + - compatible + - reg + +additionalProperties: false + +examples: + - | + device@1000 { /* comments { are okay =3D though ; */ + compatible =3D "example,test-trailing"; + reg =3D <0x1000 0x100>, + <0x3000 0x100> ; + } ; + + device@2000 { /* comments { are okay =3D though ; */ + compatible =3D "example,test-trailing"; + reg =3D <0x2000 0x100>; + }; /* comments { are okay =3D though ; */ diff --git a/scripts/dtc/dt-style-selftest/expected/dts-property-order.dts.= txt b/scripts/dtc/dt-style-selftest/expected/dts-property-order.dts.txt index aab048a0ba3b..0ab832ccf07a 100644 --- a/scripts/dtc/dt-style-selftest/expected/dts-property-order.dts.txt +++ b/scripts/dtc/dt-style-selftest/expected/dts-property-order.dts.txt @@ -6,5 +6,6 @@ bad/dts-property-order.dts:21: [property-order] property 'd= evice_type' out of ca bad/dts-property-order.dts:30: [property-order] property 'dma-coherent' ou= t of canonical order (should sort before 'status') bad/dts-property-order.dts:35: [property-order] property 'compatible' out = of canonical order (should sort before 'ranges') bad/dts-property-order.dts:45: [property-order] property 'compatible' out = of canonical order (should sort before 'interrupts') +bad/dts-property-order.dts:50: [redundant-whitespace] extra whitespace bef= ore { bad/dts-property-order.dts:52: [property-order] property 'model' out of ca= nonical order (should sort before 'compatible') bad/dts-property-order.dts:57: [property-order] property 'model' out of ca= nonical order (should sort before 'compatible') diff --git a/scripts/dtc/dt-style-selftest/expected/dts-property-order.dtso= .txt b/scripts/dtc/dt-style-selftest/expected/dts-property-order.dtso.txt index e9b3ac985718..9f2a00916329 100644 --- a/scripts/dtc/dt-style-selftest/expected/dts-property-order.dtso.txt +++ b/scripts/dtc/dt-style-selftest/expected/dts-property-order.dtso.txt @@ -6,5 +6,6 @@ bad/dts-property-order.dtso:22: [property-order] property '= device_type' out of c bad/dts-property-order.dtso:31: [property-order] property 'dma-coherent' o= ut of canonical order (should sort before 'status') bad/dts-property-order.dtso:36: [property-order] property 'compatible' out= of canonical order (should sort before 'ranges') bad/dts-property-order.dtso:46: [property-order] property 'compatible' out= of canonical order (should sort before 'interrupts') +bad/dts-property-order.dtso:51: [redundant-whitespace] extra whitespace be= fore { bad/dts-property-order.dtso:53: [property-order] property 'model' out of c= anonical order (should sort before 'compatible') bad/dts-property-order.dtso:58: [property-order] property 'model' out of c= anonical order (should sort before 'compatible') diff --git a/scripts/dtc/dt-style-selftest/expected/dts-redundant-ws-strict= .dts.txt b/scripts/dtc/dt-style-selftest/expected/dts-redundant-ws-strict.d= ts.txt new file mode 100644 index 000000000000..ac0d57bdecdf --- /dev/null +++ b/scripts/dtc/dt-style-selftest/expected/dts-redundant-ws-strict.dts.txt @@ -0,0 +1,13 @@ +# mode=3Dstrict +bad/dts-redundant-ws-strict.dts:7: [redundant-whitespace] extra whitespace= before { +bad/dts-redundant-ws-strict.dts:13: [redundant-whitespace] extra whitespac= e before { +bad/dts-redundant-ws-strict.dts:13: [redundant-whitespace] extra whitespac= e after : +bad/dts-redundant-ws-strict.dts:17: [redundant-whitespace-strict] extra wh= itespace before =3D +bad/dts-redundant-ws-strict.dts:18: [redundant-whitespace-strict] extra wh= itespace after =3D +bad/dts-redundant-ws-strict.dts:19: [redundant-whitespace] extra whitespac= e before ; +bad/dts-redundant-ws-strict.dts:22: [redundant-whitespace] extra whitespac= e before { +bad/dts-redundant-ws-strict.dts:23: [redundant-whitespace] extra whitespac= e before { +bad/dts-redundant-ws-strict.dts:23: [redundant-whitespace] extra whitespac= e after : +bad/dts-redundant-ws-strict.dts:24: [redundant-whitespace-strict] extra wh= itespace before =3D +bad/dts-redundant-ws-strict.dts:25: [redundant-whitespace-strict] extra wh= itespace after =3D +bad/dts-redundant-ws-strict.dts:26: [redundant-whitespace] extra whitespac= e before ; diff --git a/scripts/dtc/dt-style-selftest/expected/dts-redundant-ws.dts.tx= t b/scripts/dtc/dt-style-selftest/expected/dts-redundant-ws.dts.txt new file mode 100644 index 000000000000..3b2a989045ed --- /dev/null +++ b/scripts/dtc/dt-style-selftest/expected/dts-redundant-ws.dts.txt @@ -0,0 +1,10 @@ +# mode=3Drelaxed +bad/dts-redundant-ws.dts:7: [redundant-whitespace] extra whitespace before= { +bad/dts-redundant-ws.dts:13: [redundant-whitespace] extra whitespace befor= e { +bad/dts-redundant-ws.dts:13: [redundant-whitespace] extra whitespace after= : +bad/dts-redundant-ws.dts:19: [redundant-whitespace] extra whitespace befor= e ; +bad/dts-redundant-ws.dts:22: [redundant-whitespace] extra whitespace befor= e { +bad/dts-redundant-ws.dts:23: [redundant-whitespace] extra whitespace befor= e { +bad/dts-redundant-ws.dts:23: [redundant-whitespace] extra whitespace after= : +bad/dts-redundant-ws.dts:26: [redundant-whitespace] extra whitespace befor= e ; +bad/dts-redundant-ws.dts:27: [redundant-whitespace] extra whitespace befor= e ; diff --git a/scripts/dtc/dt-style-selftest/expected/dts-redundant-ws.dtso.t= xt b/scripts/dtc/dt-style-selftest/expected/dts-redundant-ws.dtso.txt new file mode 100644 index 000000000000..5f9a63061709 --- /dev/null +++ b/scripts/dtc/dt-style-selftest/expected/dts-redundant-ws.dtso.txt @@ -0,0 +1,2 @@ +# mode=3Dstrict +bad/dts-redundant-ws.dtso:5: [redundant-whitespace] extra whitespace befor= e { diff --git a/scripts/dtc/dt-style-selftest/expected/yaml-redundant-ws-stric= t.yaml.txt b/scripts/dtc/dt-style-selftest/expected/yaml-redundant-ws-stric= t.yaml.txt new file mode 100644 index 000000000000..fbf323832c91 --- /dev/null +++ b/scripts/dtc/dt-style-selftest/expected/yaml-redundant-ws-strict.yaml.= txt @@ -0,0 +1,5 @@ +# mode=3Dstrict +bad/yaml-redundant-ws-strict.yaml:26: example 0 [redundant-whitespace] ext= ra whitespace before { +bad/yaml-redundant-ws-strict.yaml:27: example 0 [redundant-whitespace-stri= ct] extra whitespace before =3D +bad/yaml-redundant-ws-strict.yaml:28: example 0 [redundant-whitespace-stri= ct] extra whitespace after =3D +bad/yaml-redundant-ws-strict.yaml:31: example 0 [redundant-whitespace] ext= ra whitespace before ; diff --git a/scripts/dtc/dt-style-selftest/expected/yaml-redundant-ws.yaml.= txt b/scripts/dtc/dt-style-selftest/expected/yaml-redundant-ws.yaml.txt new file mode 100644 index 000000000000..a162967e4336 --- /dev/null +++ b/scripts/dtc/dt-style-selftest/expected/yaml-redundant-ws.yaml.txt @@ -0,0 +1,4 @@ +# mode=3Drelaxed +bad/yaml-redundant-ws.yaml:26: example 0 [redundant-whitespace] extra whit= espace before { +bad/yaml-redundant-ws.yaml:29: example 0 [redundant-whitespace] extra whit= espace before ; +bad/yaml-redundant-ws.yaml:30: example 0 [redundant-whitespace] extra whit= espace before ; --=20 2.53.0 From nobody Mon Sep 28 04:56:12 2026 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DADB83D522C for ; Wed, 26 Aug 2026 11:16:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787742999; cv=none; b=aJAjFhlGcFs8QV1ROsD7388EOX/P0812gcGLm31o/ln4KHhNYzPMF5mM+x7AVknYOilmdpknX+qNnrxTap0ky9DXd1ySTTkiNKo8MmmhWJTXtuH8PQh/6BrDcKJQHK1pkMuiXgj3DxRmm0M+mGPMtYQwwnI5rb+oQnpQQO+ZTBw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787742999; c=relaxed/simple; bh=dKa0bkhQNHGF3ECM0RaphHFXMQfLxiwcJfDby9lcfX4=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=H+gTF/h1Hh28wkFjyd0JK4s1ZzTBTrPAAF1gPVo5KyVk8foH0KNG6ITtxPbxfhifCPNqbr+YWMp/TMkbJqx+om1M40hxgvtrWXHZVAWqew6zQtYwBMGB7Vf8p8dpfMUm+Hq6sbIB231xi6FokXpjPiRRo7MRCptWARtfVhNja3w= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b=YDq7aLM5; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=CA0xa5s0; arc=none smtp.client-ip=205.220.180.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b="YDq7aLM5"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="CA0xa5s0" Received: from pps.filterd (m0279872.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 67QAHKgv109095 for ; Wed, 26 Aug 2026 11:16:26 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= 9iZ9pKopk4L7oAcIHq+UKI461gaq/BVhdXcIs0vKk0Q=; b=YDq7aLM5P3X6qlvh jN5UBGJlXjcq8KY8QAOgB9r5d7iCs9NWk18Ie4MgNDeJkiPfnO2uLyskwFgxyN4e kO3ltYQIW61sGnuV+OZyT66Y+4H8Usc/GUY51F5Ix4W/S0BxnlQjthW7G68IQYZy 3xKMRiUBV2CMnB9xj1bY+qY366afl6dS34W+7nsm9ZDItHQzeS+TAsBCsTjRiQm5 W8lBeM5gP3Wg/S7QMwe5e10z8I4qpa+bz6k4x8+NUYNK5eoQdWdYiG/yDtXGM/to +ct3ggNKGtnMvvj0Tn4WajUi19+wKZd3JTULFTNfAPc//AwgOtv5GPExgvuSuFnN ITXrFQ== Received: from mail-qt1-f198.google.com (mail-qt1-f198.google.com [209.85.160.198]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4g9s9g9hkb-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Wed, 26 Aug 2026 11:16:26 +0000 (GMT) Received: by mail-qt1-f198.google.com with SMTP id d75a77b69052e-5283df62d68so9969931cf.0 for ; Wed, 26 Aug 2026 04:16:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1787742986; x=1788347786; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :content-type:mime-version:subject:date:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=9iZ9pKopk4L7oAcIHq+UKI461gaq/BVhdXcIs0vKk0Q=; b=CA0xa5s0FKaOI92cGk1Ifu9Un76o6ogefC32zG3HtezfC4PJGeiV1iaxvOJdsxAzg6 j1PnaTi2/znL6mPlgN92enMIeCrcxVRcbj8q0IrXDP0HMgAxlsUitArSuvBrpyOiWWry I+NEaF9ibUEoJ0ROr6m7oap+KxUqvla3uUnGZQ5P/s1NFGoGS5kAv6ALUIP/cwBRHp9o k24YQ2nwI1X5i/axZ9Ksnr9pYInEoGmyXuiUUePI/InbD16Jk/8UWrJRY0Pi9cErpPq6 soRRU2/hI6Mwrb2kv0c5gaTdQUjbuWKqvEh3GpYvs6Y/GhF+nPn2hhhFOsInH3XxUTKB E/LA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1787742986; x=1788347786; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :content-type:mime-version:subject:date:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=9iZ9pKopk4L7oAcIHq+UKI461gaq/BVhdXcIs0vKk0Q=; b=pdUU6mI0HUZtl0WWtVqBzYu4/VZCUE+0e80fKq09y2A+0jRehQmQLLZrMw8RbpZBoW i4gEuH9RtmiIi9RlXoam9DokiWSpZCI3+F/ZzG1TiBxAIpB3qXAAcJi4ccVhIO8EuLBe e5xCNAkU/9oDgYt9zaWuT9aWz0QktPyWuoYLz88QniKMZqra4CXbrRAEZltru89PbjTM jm0M2a6IIqGWKHp5c5jnej4HWU840/z6URvnFEdi9OdYPERDk12qvK+go8+5yJu37Saq LpismKWcnloLRX2X25TmfTEM0SlT1VmA48447oekB0MCH2Qe+zMzWbCN92uU8xGoNswL pupA== X-Forwarded-Encrypted: i=1; AHgh+Ro2034Zi+epz9/pTFIzswDH/IaRRhafg+xkWItwgxYVeIFOFB2Z6vmCEnH9mgQNjg3atQWdOzMxAAUzhqE=@vger.kernel.org X-Gm-Message-State: AFuF++n5DcbzVFCa5MKRPifbPIY3EQapa2pD3CxhqhJt8j4QOvYDHgIb 5PvHrqIF3R6iWqmvdtRQZ3fPFA7GTF1czcfquno0mU/W6LFQ4L+GMo3M4ezwqtQr7LXUYL83zSe F05xKN/7+rtY0djJCgN+Me9zgk0Eycgm3Mtv/ccDIVyQxeFYl0Nq+Y4OezoX8fLZj2I0= X-Gm-Gg: AR+sD110+TNNUdFKQeJbrBhEP1AUKktb5Wi9MNGBMDIj+RKccb09oY9zp1gsrMQJQQi RXI5+br1Ds2246c2eRCH8TBUPlQeAHTCnQZWz/Na4Yig0dRme4zqn740oMCxnToEEBpPSvfrrBs y65xXGfStx3ugk94onO9/b/gc9tlVVgY4ZbPJmbNKbhh0uoSc/RjIXqlq5ilShRiDMkFeejCH6v dkx2t/pLmhAO/DNxIxgFrKdCdsyjs88p4ngrxprEAJhI8RWDflsL+k1MZNGHNnFMKNY8TpOttTd hVqpvVjVrlXnvffpMSvefwRIpJyUqCPwlfpORiW4UfhGJWtgxFsM167Hq84EUxBasjQP9RqyEYz d8H9pB7dJJ8VZ48Byv+et8nk= X-Received: by 2002:a05:622a:13c9:b0:517:7e26:36a4 with SMTP id d75a77b69052e-52e42377d5amr46460421cf.34.1787742985741; Wed, 26 Aug 2026 04:16:25 -0700 (PDT) X-Received: by 2002:a05:622a:13c9:b0:517:7e26:36a4 with SMTP id d75a77b69052e-52e42377d5amr46459861cf.34.1787742985277; Wed, 26 Aug 2026 04:16:25 -0700 (PDT) Received: from [127.0.1.1] ([178.197.219.214]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-6a5de8ea6d0sm4577843a12.13.2026.08.26.04.16.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Aug 2026 04:16:24 -0700 (PDT) From: Krzysztof Kozlowski Date: Wed, 26 Aug 2026 13:16:02 +0200 Subject: [PATCH v6 10/10] MAINTAINERS: dt-bindings: Include dt-check-style in DT binding entry Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260826-n-dts-style-checker-continued-v6-10-f270b1e81f8e@oss.qualcomm.com> References: <20260826-n-dts-style-checker-continued-v6-0-f270b1e81f8e@oss.qualcomm.com> In-Reply-To: <20260826-n-dts-style-checker-continued-v6-0-f270b1e81f8e@oss.qualcomm.com> To: Rob Herring , Saravana Kannan , Krzysztof Kozlowski , Conor Dooley Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Krzysztof Kozlowski X-Mailer: b4 0.16.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=825; i=krzysztof.kozlowski@oss.qualcomm.com; h=from:subject:message-id; bh=dKa0bkhQNHGF3ECM0RaphHFXMQfLxiwcJfDby9lcfX4=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBqjsr1909//R6zVsjNOrrTfg30ItAEiN/ACIMHe w5g5T64MDiJAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCao7K9QAKCRDBN2bmhouD 1+9kD/9WmOX6fI0ItOVWHDtMjEGNbamAIdvbyWI32PhuHv3K9TGohZ570QX6hAc5bXhst+sXeWX xLqy2cw0iKEClcs7fctBvYTT9HvRK1V7n+TfZ3vQUV6VLqqeEOM+tZosRWhGVZIF3S2hhvFTQTv w5cM2N4ampahDJcdeypVmH6A6DfJ263GODrE6KLSP56H4Sl9pxzNpq9xrgbp/pIM90x2uv8DY6n 2/66AMMc5dXgRWqUrzno00m0yM/9Jn1bpf1XlvMp8UWsJsL/gX/RfncZmwgOStXP6Lpkyvv3jdE Ri4nK2TeZYx6C3hFAPZ3SHvO7ug63T1xF6p97KkdXqPHPafY1l4RUi0qcoEWVLobumaCw8yDlLU 3p6S2mhd6aFl7zQjSc5KlC0VjyOB1yBuIQ4LgVQpzcJHdMvPRhPFY67yb5MZU97hnosBgWtlvq5 6O6cCh1eGtLEhNwvCbusz/ISYkOSAbmnH6KR+EVjN9Xl8q/T9e8jGbvNFNhGkv/hE2VGy19VWwz PlTrC+Q6zrxhAsadfb7dUEpXSL9v9wRAZTWTNrok59x/33pDreDOVxLmMEq509Vs2XGFrldVPHg UrTOgyS40rUgduG7wG+Yl7tTyTd6jPJ0ZZHHphTYkzPZ14h+bfyFDXJq34sTLa0fOxCDC8sxTIS QdhVPnlkgb+A+rw== X-Developer-Key: i=krzysztof.kozlowski@oss.qualcomm.com; a=openpgp; fpr=9BD07E0E0C51F8D59677B7541B93437D3B41629B X-Proofpoint-GUID: d8QNSzvmgYsqyGNZTdfn10eVI8OqDpAb X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwODI2MDA5NCBTYWx0ZWRfX65hjEtQ+Ftl3 9xaHE3oBmeLiWficCBRPvOUo82u4p2qYPtnp6Hs/Dkaz1TbVxr5+ByIkh3tk50AZ9IbEr8js299 CSr1G0FQOTTzQU+x4iB/7yeyNTQtAM3/jTh/mMmui18B6i4i9ZKeblueXxwcVlNN5dBfdn5Cy4w btGu7TIBNEZSJ9rfkEDNmx586UI+N9GRoGQu/j9iqIoRDLJ5ewPTg3F16ZpuqFeVPPIeLau3jB1 Aex8qc6E0rugXWnr9D1u7Wq1alzERJHMPIr0pm9J3sspAF6QGTJyBe6AjdP4diSMhD3gtRwfXRD XeyuVgILTGsJPHaoDt8rPCgrM1V4XFoQaTbWio+6zNpsU3pfu1sO98fbACtS8k4Z3zQwv7WN83H DgSmlSyMKg5sTxTwZ0zJL7r9YVMVzg3Y1OSazXqV+g7e7+p22HBiK0aHFdy3aq5C7Q1o78+otS6 sd1j1IcSMPOgPcmgxzQ== X-Authority-Analysis: v=2.4 cv=Xfq5Co55 c=1 sm=1 tr=0 ts=6a8ecb0a cx=c_pps a=mPf7EqFMSY9/WdsSgAYMbA==:117 a=+bKQE0WJfmhK2875HamI0Q==:17 a=IkcTkHD0fZMA:10 a=Sv0fKeRqtYgA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=yx91gb_oNiZeI1HMLzn7:22 a=EUspDBNiAAAA:8 a=hdCJvu6vi-O6ykQZt0QA:9 a=QEXdDO2ut3YA:10 a=dawVfQjAaf238kedN5IG:22 X-Proofpoint-Spam-Info: AW1haW4tMjYwODI2MDA5NCBTYWx0ZWRfX0TsMunS/uiEA qNSP4WYYQduQk9/2XL1FL7UpALn5YH+c58iTQjzkrj/oylCTMlm5L6s2b6EX9i1mw1IHT8B8wKJ IZXeLJx9IyckPtwiwqdin5CY47ZLO6U= X-Proofpoint-ORIG-GUID: d8QNSzvmgYsqyGNZTdfn10eVI8OqDpAb X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.134,FMLib:17.12.100.49 definitions=2026-08-26_03,2026-08-26_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 lowpriorityscore=0 phishscore=0 suspectscore=0 priorityscore=1501 bulkscore=0 clxscore=1015 malwarescore=0 adultscore=0 impostorscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606150000 definitions=main-2608260094 The dt-check-style tool is in interest of Devicetree bindings maintainers, not only the driver OF-core (where it is covered through "F: scripts/dtc/"), because it covers the DTS and the bindings. Add it to the DT bindings maintainers entry. Signed-off-by: Krzysztof Kozlowski --- MAINTAINERS | 2 ++ 1 file changed, 2 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index fe10d29b7657..59ec34fc9682 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -20488,6 +20488,8 @@ F: Documentation/devicetree/ F: Documentation/process/maintainer-devicetree.rst F: arch/*/boot/dts/ F: include/dt-bindings/ +F: scripts/dtc/dt-check-style +F: scripts/dtc/dt-style-selftest/ =20 OPENCOMPUTE PTP CLOCK DRIVER M: Vadim Fedorenko --=20 2.53.0