From nobody Fri Oct 2 09:22:00 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 C279F3B813C for ; Mon, 3 Aug 2026 09:03:34 +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=1785747816; cv=none; b=nCI+FV8aNIcvyTEcTuog6HaLM7Q38KP/Ea/vROKaHbwr7o4kgWXpGQ9LwXiTy5NPuY8wN8rwvVXt6q0WWPjxX3TprZhICp12E/SPvASCA+MYOVRYned0Af4ZKScHegGj9pE6z5wnQFZ6cGcH1ho/HTCBxtzaYdSwZxxvrl/XvEk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785747816; c=relaxed/simple; bh=ZFlLG3z3MlcszCNrY5WmDudqd49xElNAGFD9EIWF1s8=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=BS7JrXoToHLQIRJBdbk1RAKh6tWaTcA9/ONWGfKdU2UYJ68zPvLTE4wIRF6LRPb+MmB9nOo0nX9Am+izEavqZ4EuClPzT0gmqZC7VdIGH6ewVfPkviKuRE1GZooXV85rfDL85PHNaJ/qEuZumD283Qnwv363f0rlJH3UCdg9WtE= 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=VerTOP8n; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=JsmARsTq; 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="VerTOP8n"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="JsmARsTq" 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 6736XMrm3929490 for ; Mon, 3 Aug 2026 09:03:33 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= Nit2svKmSnKek5KgwJ3n2a8gERZY/b5GYApAabo7+j4=; b=VerTOP8np1qt1NWd W95iVTI3nzvMkzUqzkCL+7TKpWrV2HLkECtMeILdfsraPF8bs5Pss4cCuYn+YlXm +k5W0luSlJKM5BdGjIut63Ol7sYxeLwcgerVgpA4Xhe5jXsaALIez1P0Kpj8J5Xn vu+IH5w2HfhfS+0V+gTuQrTWXrbHgyo6vkkjv3up8jOFmELrbIeFijCcKVYWPLSC LVxUVZYligBXEIWIkcTF4tu0lpN236ROSqC1FE1DxFMRCZ+FgGgM07QQLUFkiMnX kSPnTyweRBiR2NhaiRDk6l3urmROO8InPqPVe6nGL+Q54XMgBY89oO+4u6fcHVlI JU2YXQ== 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 4ftnhkgqrs-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Mon, 03 Aug 2026 09:03:33 +0000 (GMT) Received: by mail-qt1-f200.google.com with SMTP id d75a77b69052e-51c26012cd0so26541051cf.0 for ; Mon, 03 Aug 2026 02:03:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1785747813; x=1786352613; 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=Nit2svKmSnKek5KgwJ3n2a8gERZY/b5GYApAabo7+j4=; b=JsmARsTqbX2Tar73BM4Mh8il/EM8IXeXtCPGeIBDvAL3kLOXOFuS6H4MFmYnVAliE7 lmrnlU9Qe7JKgir3Qtdj/mrqVm8KjQ3LgoPhEgNP9hO4x9C1SxvLFfgJP5hn/CxccctL nKBCSg9+O+mjoY+X8JpM0mg2WCVvvtEjR4Z/uLcHDtjeYkpVpFjO4URXs/JG/Amnd+qS HnJyuHOCyAl29wSs3gy2dNEMAKy8pfRwv6prdJRym+bEm9qcAUq/ax2MdUytMO/qb3Cw A0SG1jBO46y0HD4bHSLqT9ZZS26AifBY2GPoCEIkmF8vKJXkBwYpyvyGVPVizU5S3VV3 3eVA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1785747813; x=1786352613; 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=Nit2svKmSnKek5KgwJ3n2a8gERZY/b5GYApAabo7+j4=; b=q2EfZi7DuTrPVBRVvATo49Mcso3+SXZsN2CJGusavG4hfzITEjEA6dIZqoRXEQmI9I q1kRHI7Pw6SW3Ud8OvFyHWaBOgfl802bzJkM/VPO8DcOlzCCuDJeefERaddl3gyfqkV7 xG4AN9elQZ0BNf9w222pVRr/5SGTmWb1085/3QzpCkfDh9MSiommefiD5a0WAwGdpg6K uo5zvI5A/u7Gz3cX4ij2wY8VwioV9Rdj1lpB3oU8Zyr80wbk0Uolw16nbuywdA92rBe8 sAa3A/C+Wnz4zxVeHcs4p60GDYuUD8nLs5K3vquO169DcFvKCfWapCqKUiqffzlzJdwd hIag== X-Forwarded-Encrypted: i=1; AHgh+RpYXJBD0Lv8fT5d4gDWZGgzY3R4+IsTVOA3XfzTwIs4QVpTbo/UpYHwYLVZTmJBuQIKbQp9e6Blz1dQgGk=@vger.kernel.org X-Gm-Message-State: AOJu0YyXC1CcZeE4R7IOOFXmoepN9nihjwxHJqjp4+BMOJHqNtyRWRex 8nQcU1SwfZGhNPOHXK/onZ+CbKFMX6rWNdoC3FmqoKXYHj9GZytvRvWhMguKrwHDrxLdylS9rsT xUfcSQrUL2qY0zgB9rRGGSeMp1OGevR6Cyks54NtbSJhkzMWIsPz+q+PN6AkuTdrDSxw= X-Gm-Gg: AR+sD11ytGc5alQt0isEqGd5SrIJutqzZ5jiMJfbQuAwgNhMy5fkVYxLMpiI3UPLWdZ r6jb5jm51KniaDcwWYpCa4wf3XFHVHERyARUO3kKQAWsRJGSVlwliizLame4f+dWP2aGvEUH0AI nQDriEh74ax6J1KP2ccos19fKe91RKuHsJtLsT8JNw8xPxq5Z8niF76E1kre/3cNTpayTm9jqza UPojldzg+pKKhcy1527WAVNGeXvlV/W3ITjyBVQ0j37z2iT/M3KZn1UY/zl2bte7QIT8UOLn0BE /su+w30tlatGKxJs5E8Wv5/eFpKLJ0xocqtwQJpyRl+ybx8zt9CUp85x6WaliiU8dM/GX4TwsP0 k5t/i3cwNYAy06UL8y47vmtEp X-Received: by 2002:a05:622a:5c17:b0:51b:ee04:5a4e with SMTP id d75a77b69052e-52b567bfe2bmr192444051cf.31.1785747812699; Mon, 03 Aug 2026 02:03:32 -0700 (PDT) X-Received: by 2002:a05:622a:5c17:b0:51b:ee04:5a4e with SMTP id d75a77b69052e-52b567bfe2bmr192443511cf.31.1785747812249; Mon, 03 Aug 2026 02:03:32 -0700 (PDT) Received: from [127.0.1.1] ([178.197.219.214]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-47fd456a6d7sm31858493f8f.19.2026.08.03.02.03.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Aug 2026 02:03:31 -0700 (PDT) From: Krzysztof Kozlowski Date: Mon, 03 Aug 2026 11:03:04 +0200 Subject: [PATCH v3 01/11] dtc: dt-check-style: Add missing /dts-v1/ to few test cases 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: <20260803-n-dts-style-checker-continued-v3-1-6c9776928cea@oss.qualcomm.com> References: <20260803-n-dts-style-checker-continued-v3-0-6c9776928cea@oss.qualcomm.com> In-Reply-To: <20260803-n-dts-style-checker-continued-v3-0-6c9776928cea@oss.qualcomm.com> To: Rob Herring , Saravana Kannan , Test User , Krzysztof Kozlowski , Conor Dooley Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Krzysztof Kozlowski X-Mailer: b4 0.15.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=6705; i=krzysztof.kozlowski@oss.qualcomm.com; h=from:subject:message-id; bh=ZFlLG3z3MlcszCNrY5WmDudqd49xElNAGFD9EIWF1s8=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBqcFlWxW8fBa/Ti67XvOv7zPD+bkxr6wu7lnFBV brAArUoX2eJAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCanBZVgAKCRDBN2bmhouD 14pFD/98MNpLEYoxrhSeZpIAd4cc7khbphgBMrhgGfYIdFRO5J6hg34qlozIG7CyiYi+PByZHkb uiCjpPIZiMY1u+kS4wRhxn2SXKpLcj992qHSj4H3eURSMLdMxuLrMS15Ac5eTSPyHuGJchn6w4X Eob+iYsVKIq5tqITuhUxWvy5pAa1UWCYsZc5F+xARUny0pfEvxLZuosuMyjRneR9a1AKVgD+LAr gUPIZOrZODKvlISDAFDGf+ypQh8JTcn+goZ53qWV0cmVO4eK7f/3rq13sOwoqoWoFpcadVUCeA9 lUFw/WaeptIohJGctdF4PqUNd4F7UGrX+ii4ZNwmo6Uefj+06d1NjPMG/EYApyzq6ah+ks4jSJh fmEu30YkykVBviSf4+KXsOEM6G9xufGu8TmJEHgnFvCG/1djB8nno2ig7RnyQLrd1OXU6VUaJ6A VDK5fJoFVVR9gjTAjVyVCnRZtiqZGlvM2jk1Vg0arskNrbT8dAJQVeQ89hkqy2VJWJrWe5CePG/ NpamaK355SyA2zv16wqiXnVdHVgT9gDONBFhev/4N4IH5KF/9ou3XlTw6LvPMOY7qNuwMU/dp00 vh969QjQxLFQU2OZpsO/guz+L1sK4WCnAw5ybkDStyvRhGp7YMbXmDKIEfkd0gDgIVvEyz7r6sr 4EONsV5ZGaTkBSw== X-Developer-Key: i=krzysztof.kozlowski@oss.qualcomm.com; a=openpgp; fpr=9BD07E0E0C51F8D59677B7541B93437D3B41629B X-Proofpoint-GUID: ZV2VngWCvpQkmk4cdZPqpmLCHHOOP7S4 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwODAzMDA4MCBTYWx0ZWRfXyK6RAIkM+k+y mID+N6/i8n6Tw0ldLVZazr5eN39OjCjgDWWvHKtW1atsU8lDOy1XqJAAzgA4WRxZdrEQc4Q8asT VCVDZDz71wHPChBZTv+Eip687ACZrnjjFByYlImRPsgMGtSGvNbAtVhomGFm4p3Q8Vcx0Xyi9YB CXdw+OPBvU8DY2t+rmb/Hm/ryfhqJgiLquaDvcUJmUrJYRsU4JY2J97Q8wRhV6KBCe1spZoMw3k LeqdJ6df5ldL6cXVdToXiJVNW2YZQ+38v/pU2vALZu8Gmem0UZUtYlumKXoluaggXFPhiP02yCD CSDE0U8vn3RtXIvTkggLnn49dDdRi6MnfuN+wIGoZPV8AgDZwQR5SeC9B3+APJERA1YwMMf2/RI e+LA/IJs6yB9lSey2iMSpTfUo92vft+Z+R1h0yg/AavRgA6ReJJB+/j4AeKM8TDXtPbFPdMnMO+ QHik4/FMYzqreg1n7zQ== X-Proofpoint-ORIG-GUID: ZV2VngWCvpQkmk4cdZPqpmLCHHOOP7S4 X-Proofpoint-Spam-Info: AW1haW4tMjYwODAzMDA4MCBTYWx0ZWRfX22PpJ4unqDDg MqftscczLrUXW7aRx78sUxpP2FG0G7eBXbzzkY5jlt7iEqVHWCTlA1ZleB0iorP2RhyL5AanHzd Iv/3jnFieqrGVPHNFYuMV9qk7312f5k= X-Authority-Analysis: v=2.4 cv=UIjt2ify c=1 sm=1 tr=0 ts=6a705965 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=rJkE3RaqiGZ5pbrm-msn:22 a=EUspDBNiAAAA:8 a=bazDI84LfyIabikLn_YA:9 a=QEXdDO2ut3YA:10 a=uxP6HrT_eTzRwkO_Te1X:22 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.134,FMLib:17.12.100.49 definitions=2026-08-02_06,2026-07-30_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 clxscore=1015 priorityscore=1501 lowpriorityscore=0 impostorscore=0 bulkscore=0 adultscore=0 spamscore=0 suspectscore=0 phishscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606150000 definitions=main-2608030080 The selftest DTS should still look like a real DTS, so it needs '/dts-v1/' marking. Signed-off-by: Krzysztof Kozlowski --- scripts/dtc/dt-style-selftest/bad/dts-child-name-order.dts | = 2 ++ scripts/dtc/dt-style-selftest/bad/dts-extend-node-child-name-order.dts | = 2 ++ scripts/dtc/dt-style-selftest/bad/dts-extend-node-digit-node-order.dts | = 2 ++ scripts/dtc/dt-style-selftest/expected/dts-child-name-order.dts.txt | = 2 +- .../dt-style-selftest/expected/dts-extend-node-child-name-order.dts.txt | = 2 +- .../dt-style-selftest/expected/dts-extend-node-digit-node-order.dts.txt | = 2 +- scripts/dtc/dt-style-selftest/good/dts-child-name-order.dts | = 2 ++ scripts/dtc/dt-style-selftest/good/dts-digit-node-order.dts | = 2 ++ scripts/dtc/dt-style-selftest/good/dts-extend-node-child-name-order.dts | = 2 ++ scripts/dtc/dt-style-selftest/good/dts-extend-node-digit-node-order.dts | = 2 ++ scripts/dtc/dt-style-selftest/good/soc.dtsi | = 2 ++ 11 files changed, 19 insertions(+), 3 deletions(-) diff --git a/scripts/dtc/dt-style-selftest/bad/dts-child-name-order.dts b/s= cripts/dtc/dt-style-selftest/bad/dts-child-name-order.dts index 49c5c10c92d7..54be9f07b680 100644 --- a/scripts/dtc/dt-style-selftest/bad/dts-child-name-order.dts +++ b/scripts/dtc/dt-style-selftest/bad/dts-child-name-order.dts @@ -1,4 +1,6 @@ // SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +/dts-v1/; + / { #address-cells =3D <1>; #size-cells =3D <1>; diff --git a/scripts/dtc/dt-style-selftest/bad/dts-extend-node-child-name-o= rder.dts b/scripts/dtc/dt-style-selftest/bad/dts-extend-node-child-name-ord= er.dts index 575dadd03c38..296c58a545d5 100644 --- a/scripts/dtc/dt-style-selftest/bad/dts-extend-node-child-name-order.dts +++ b/scripts/dtc/dt-style-selftest/bad/dts-extend-node-child-name-order.dts @@ -1,4 +1,6 @@ // SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +/dts-v1/; + / { #address-cells =3D <1>; #size-cells =3D <1>; diff --git a/scripts/dtc/dt-style-selftest/bad/dts-extend-node-digit-node-o= rder.dts b/scripts/dtc/dt-style-selftest/bad/dts-extend-node-digit-node-ord= er.dts index f3ffc47365a3..813900e3393c 100644 --- a/scripts/dtc/dt-style-selftest/bad/dts-extend-node-digit-node-order.dts +++ b/scripts/dtc/dt-style-selftest/bad/dts-extend-node-digit-node-order.dts @@ -1,4 +1,6 @@ // SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +/dts-v1/; + / { #address-cells =3D <1>; #size-cells =3D <1>; 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 86b1de9bd654..e2eea0862102 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,2 @@ # mode=3Dstrict -bad/dts-child-name-order.dts:14: [child-name-order] child node 'bar' out o= f name order +bad/dts-child-name-order.dts:16: [child-name-order] child node 'bar' out o= f name order diff --git a/scripts/dtc/dt-style-selftest/expected/dts-extend-node-child-n= ame-order.dts.txt b/scripts/dtc/dt-style-selftest/expected/dts-extend-node-= child-name-order.dts.txt index e3d8fd367e09..b6e74e6f923e 100644 --- a/scripts/dtc/dt-style-selftest/expected/dts-extend-node-child-name-ord= er.dts.txt +++ b/scripts/dtc/dt-style-selftest/expected/dts-extend-node-child-name-ord= er.dts.txt @@ -1,2 +1,2 @@ # mode=3Dstrict -bad/dts-extend-node-child-name-order.dts:20: [child-name-order] child node= 'bar' out of name order +bad/dts-extend-node-child-name-order.dts:22: [child-name-order] child node= 'bar' out of name order diff --git a/scripts/dtc/dt-style-selftest/expected/dts-extend-node-digit-n= ode-order.dts.txt b/scripts/dtc/dt-style-selftest/expected/dts-extend-node-= digit-node-order.dts.txt index 525081867bf7..bf252e4d9815 100644 --- a/scripts/dtc/dt-style-selftest/expected/dts-extend-node-digit-node-ord= er.dts.txt +++ b/scripts/dtc/dt-style-selftest/expected/dts-extend-node-digit-node-ord= er.dts.txt @@ -1,2 +1,2 @@ # mode=3Dstrict -bad/dts-extend-node-digit-node-order.dts:21: [child-address-order] child n= ode @10000 out of address order +bad/dts-extend-node-digit-node-order.dts:23: [child-address-order] child n= ode @10000 out of address order diff --git a/scripts/dtc/dt-style-selftest/good/dts-child-name-order.dts b/= scripts/dtc/dt-style-selftest/good/dts-child-name-order.dts index d2a278763c3c..af0adf5abf70 100644 --- a/scripts/dtc/dt-style-selftest/good/dts-child-name-order.dts +++ b/scripts/dtc/dt-style-selftest/good/dts-child-name-order.dts @@ -1,4 +1,6 @@ // SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +/dts-v1/; + / { #address-cells =3D <1>; #size-cells =3D <1>; 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 d2bf5861c3ee..cdf3f91ebe01 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 @@ -1,4 +1,6 @@ // SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +/dts-v1/; + / { #address-cells =3D <1>; #size-cells =3D <1>; diff --git a/scripts/dtc/dt-style-selftest/good/dts-extend-node-child-name-= order.dts b/scripts/dtc/dt-style-selftest/good/dts-extend-node-child-name-o= rder.dts index 47fe5455edfa..97d468051f25 100644 --- a/scripts/dtc/dt-style-selftest/good/dts-extend-node-child-name-order.d= ts +++ b/scripts/dtc/dt-style-selftest/good/dts-extend-node-child-name-order.d= ts @@ -1,4 +1,6 @@ // SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +/dts-v1/; + / { #address-cells =3D <1>; #size-cells =3D <1>; diff --git a/scripts/dtc/dt-style-selftest/good/dts-extend-node-digit-node-= order.dts b/scripts/dtc/dt-style-selftest/good/dts-extend-node-digit-node-o= rder.dts index 0c292fefa52a..faf49962faf2 100644 --- a/scripts/dtc/dt-style-selftest/good/dts-extend-node-digit-node-order.d= ts +++ b/scripts/dtc/dt-style-selftest/good/dts-extend-node-digit-node-order.d= ts @@ -1,4 +1,6 @@ // SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +/dts-v1/; + / { #address-cells =3D <1>; #size-cells =3D <1>; diff --git a/scripts/dtc/dt-style-selftest/good/soc.dtsi b/scripts/dtc/dt-s= tyle-selftest/good/soc.dtsi index c60274469555..deec1a973c92 100644 --- a/scripts/dtc/dt-style-selftest/good/soc.dtsi +++ b/scripts/dtc/dt-style-selftest/good/soc.dtsi @@ -1,4 +1,6 @@ // SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +/dts-v1/; + / { #address-cells =3D <1>; #size-cells =3D <1>; --=20 2.53.0 From nobody Fri Oct 2 09:22:00 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 06DD73B895B for ; Mon, 3 Aug 2026 09:03:36 +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=1785747819; cv=none; b=nwCtUYxEhYVbOLLkPBHotFO3YBM99QynNI17J5+iKLGMw3Qo18jZfPzuRt7eJr+sbolPYy3tSAaiiDNa2HZ9XklfLxp1LxyRs4hsnlWD3QgT6R3Hi5MuTdpmeijca3Gd1FZSge1PftGL5pAUZorVa2zSeOI3XiaueUyoihTC8Js= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785747819; c=relaxed/simple; bh=LjkbmCe6vn81FFu+ZMtn1oaw7c6HMT27qU1FnMtVjvE=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=YzaxDGN5/P69/IVICXbAcxZH5mJjC7/4tHmwmb4Dn7bVMVaFK4xnHG+bkKlDqJ0NS7TpBATT0cddcAFipcHVFHGdOZKssEJ8RFcjSv5XACUTb5cQxbOW8SaC7QIn5+BMfJ0jeAwxt6XJ4W13446kJXie58nhV4GlpYaSZ3lWW34= 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=Bcy+8QSf; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=FvtqocVa; 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="Bcy+8QSf"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="FvtqocVa" 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 6736sSSj3790719 for ; Mon, 3 Aug 2026 09:03:36 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= fnX+Bhb9Lb7raNVA3JPHSL8HRf4LFQTpLNpp44RNZTM=; b=Bcy+8QSfYHPu0TsH 0UXAdFWoQ/JZT4q730JwAlc/9yrmCJfzYm0sd4MEsFCjoaoKhPKI3Q/UY6oYFIgi AR8l4N9BIlP4+4i4KGGTD/Oo7iFyhtc1DH3Fi0p7bOF+enmuZnM8cELP1IOrOP0i fYTqNVxPP92jOzRFLrOBbRZ9CdDAraNZAiZA6jfuQfpQttzLKJe+FsBVPUgCZD3b C7jakTwC2JhUW8tNKnHE+YieJiv2JAqO46BQpG9xRNvpzOpL8l9BmBNPW84thdim OLUq+lNbuSubS1Q4Cdu8pwwpEp+BpvhCJqDJ9KU2zV77vIIhpdAyf2MjiZ1uLyh0 n+4X2A== 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 4ftp4r0ke8-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Mon, 03 Aug 2026 09:03:35 +0000 (GMT) Received: by mail-qt1-f198.google.com with SMTP id d75a77b69052e-51c1c7f135bso56854341cf.0 for ; Mon, 03 Aug 2026 02:03:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1785747815; x=1786352615; 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=fnX+Bhb9Lb7raNVA3JPHSL8HRf4LFQTpLNpp44RNZTM=; b=FvtqocVaSFOEgyWFcfeJAQ1cMw9seRuJ1pePIWUSF4BpMMLHV3J4+5QIAGfRc8m32n OIJT1sDcul7X0bfs6x7b4rPe80HXaqCfKKHobMwdrnFPdhMJ7rZxgqO7IrrM/en/VWq+ SXqPfQ5yWvhfMngRUz/SBwQvzS9Qyr/IV/O61RDygbgY0a2g74bIfXi9MqhaMo52bkgz XrAaTKpzlNJINhZV3CxUDFRndXUXbur2Yn7/FzOFIRECa4HrgdetsVok4bhqbKz24MFE dB782V5dmeaitt0mwu6BSv4N7WeANLMqmEP3e+HwsnvDIWAKwczpbxsxI55mBajOcD6p ZU5g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1785747815; x=1786352615; 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=fnX+Bhb9Lb7raNVA3JPHSL8HRf4LFQTpLNpp44RNZTM=; b=VN7HKRAct77t1+jjzZgkczyilnm1Bqf13FTRMIL8qNKT7fZ5acuQtqoi3sWkkmFmLn uWzQKTjWZplKVm/pUL7wMwLGWaD1Xkslen7ZQFQVZbmOxoAK3Sv34fKTM07TpRGk5rlC 1XxnQKPXJWI98RF4Wuhkob6ZZ8pabZhP66MSfjCs2aAcKcTiex8/XVI+GZ8JPG+r77wu JsgiUXGTCEUSgETJAJE9H3CRf79xZsnDho8BsobjSv43WDvcdsqs9jJpNrpeysHj80nF 4IRyx9QFi+apf9hqv+Wxr9Ge0YGYLxpXzNfvarlW4Di/d+bYjKUCcVWRpHNxGwKQI/L7 K6qQ== X-Forwarded-Encrypted: i=1; AHgh+Rokuq7K3qKTIkQBhfbl+zhkvStk3VUnCwm4DevDPNOjx328eFZGBtNOmaKO/vbM15BNENNwrPnQzEKu3O8=@vger.kernel.org X-Gm-Message-State: AOJu0YxbHm6ehdL+1VxK+edCx8F9uLUJrUs+CBQQu+0UX1ZnRpSO+5ET 8cnrnw1xPqzF/NXx5oUPx6vVQHfZGHUBf/P5WwVQuWUuvpXwIGfjX5FciPEGLTWz/JdXU6LXZHf uYOYTPRRi0hAHzk3oAWVaheS2rdIF6rGG41/jIt+BlEs0rihwd4Gh9XG9um05TFjrV/E= X-Gm-Gg: AR+sD13NXgZ2dWLhqUnc2F657j0uzlJzO1DdWK65Ex15b061FTqXutXm/w/8QVn+oIO rmF+eOYpMb4c9bxqJMmSnKPGIjtZi8+1tcpFZAG1Jz8IWY3h0/e7LumPDICrCBtXBHdoLF3iNqg GGw78hjwX85SxaVpvR4p44x1IDb+NgsrfdQXcT0aSkFumqm5F83xdnMjvFASNk5a5fBbQ4iwI2+ /LS/l+4Iim75nuSw9wWUIK/wfMRKf+RBZZanz542KBY+uTGUdlTTPmjDuWARW18vLhoqyEYkHTe tNarDAeP4AfL9kEpjem+6YSxgXQwK6UZxym5CdWClVwFQsNqI2KSFK3nCFrz/7kNCYmlM34k6qx K0j+A79f8GLZ6SXSNR39VqUQQ X-Received: by 2002:a05:622a:480b:b0:527:7d0f:709c with SMTP id d75a77b69052e-52b567d0f3emr181101201cf.42.1785747815226; Mon, 03 Aug 2026 02:03:35 -0700 (PDT) X-Received: by 2002:a05:622a:480b:b0:527:7d0f:709c with SMTP id d75a77b69052e-52b567d0f3emr181100751cf.42.1785747814785; Mon, 03 Aug 2026 02:03:34 -0700 (PDT) Received: from [127.0.1.1] ([178.197.219.214]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-47fd456a6d7sm31858493f8f.19.2026.08.03.02.03.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Aug 2026 02:03:33 -0700 (PDT) From: Krzysztof Kozlowski Date: Mon, 03 Aug 2026 11:03:05 +0200 Subject: [PATCH v3 02/11] dtc: dt-check-style: Simplify setting depth of DtsLine 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: <20260803-n-dts-style-checker-continued-v3-2-6c9776928cea@oss.qualcomm.com> References: <20260803-n-dts-style-checker-continued-v3-0-6c9776928cea@oss.qualcomm.com> In-Reply-To: <20260803-n-dts-style-checker-continued-v3-0-6c9776928cea@oss.qualcomm.com> To: Rob Herring , Saravana Kannan , Test User , Krzysztof Kozlowski , Conor Dooley Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Krzysztof Kozlowski X-Mailer: b4 0.15.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=5042; i=krzysztof.kozlowski@oss.qualcomm.com; h=from:subject:message-id; bh=LjkbmCe6vn81FFu+ZMtn1oaw7c6HMT27qU1FnMtVjvE=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBqcFlX7rP3/bps2wQR5+1Pp5z3NfWThWrh63kxX Rm19NVuXiCJAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCanBZVwAKCRDBN2bmhouD 1zKBD/9nP/0DnnPL/v76mDdbXbBi3vnwkdAhz8N1oYlhQp3Nco2lylxN0vKr9qiWd5hXHFWMHKN L/9iX3W1b/1GATb2SRJV09Z6Uvz174t+qJ6Qe7GMqHe2DBXJJ2D1/KxSmc7aN+Ij89rltsf59zk 1+YMKQzFWFw+VVB8QSZjPU9cppwujl/0+AYt5Hf8neW6QavFsEYjZBjxotBMzsH6D7YkdtHzK3g fr4DG/kdPm0aRNWIc0OTC8p4CAxc8+kzl9+SE+qTlMa9bAwCgW/SwL3txjZz69TfHJoXw1lFg8i 1QFJ0NOeIA/7HBEttq0xTkLKz4xd74QbhSHqjUG3GBu9aeDyJK2AhVtGQi2WPfF4c7wKdk/D5XF bh634bV0+ULCcvqH/K/ImrsqNn40z1odHuPsPLtOxFtylpIWngflx7PXoSj/IW3AQhDGunl5lLY HzNsOZFJA1JBxfnzYM+H6jzzGprysEtqnkgZE9Q9d8/vjRHrEAg2az2Jw2cyESrSQPnEgkbRkch oJr7QE7Ys4GxDOV4njYAiXAEQF/Y9mtpLcUyJ5aWSs6P0IGr0OF0eI1HGU20PGdmaj+0KsGIV59 CQEAzYTjP2CUqpZYhocZbHPFk4SRsSJ+cWnPJWHkdDt1UTpU7u/Zf1ix296GnOc3IDROlFRF6S0 AmUt2xRe6hEXBMA== X-Developer-Key: i=krzysztof.kozlowski@oss.qualcomm.com; a=openpgp; fpr=9BD07E0E0C51F8D59677B7541B93437D3B41629B X-Authority-Analysis: v=2.4 cv=X9Ri7mTe c=1 sm=1 tr=0 ts=6a705967 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=8sziXlxsN6MBhN6jAs0A:9 a=QEXdDO2ut3YA:10 a=dawVfQjAaf238kedN5IG:22 X-Proofpoint-ORIG-GUID: gFc9OuGravo8h6wre-ze5GtNXAPvXqua X-Proofpoint-GUID: gFc9OuGravo8h6wre-ze5GtNXAPvXqua X-Proofpoint-Spam-Info: AW1haW4tMjYwODAzMDA4MCBTYWx0ZWRfX5QcBkEzuIo3w YM+zCP/m+6DjZ2N9lgbOYIqnS7j07Nj5Kg0z6YFPRIa5WF6whILO2Ifj/0pbVVVNRiVRn2SWwnQ 7UQ9cOWaQHdtW4J+blnuk2O1D2sJQcE= X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwODAzMDA4MCBTYWx0ZWRfX+vUBrVIyp3Y2 6cFzy6Mg6dw+YHLFEKU7kqO+Hyrne7ApTmj7sNF7qTTS7LmDMM2eLB680KemyIvP5YeiC7Qb4Xc eCXCdXfd5ISh6c5noigxXx5GWGO6O+UEy4RnYnC3C4I6PvCp1J5MgH4v5crnbhKUU+EpxsESuLJ DP5u7sBkUTy/A9qYSPPU2tI/09jCrQIxdXzKgNlkigVJYjmOuajuRourGkBsL836KodnCBkfw4D sEhcBhihGlnYuCCVYJWRaMWvB/rxSFvTMP/rd5Wm9lBgggUHu5t+sd+5IhYkdJPFWpZmSqQkBJo 9bGIyNtD7ocOYgiMnQeajjsBfE3eC/ANMI6+A2Mn0iFn6cJ0oeadNBv4e3KwrzmL3IH+DQViXtK /FHeeFCHRFT7QsW+/ll3Fi5K6OLmduyTgreeDSlq79Nw5nCTCUags2ENUKkEQdqkwqn75Sw5zT6 LVG29hJjM0VQKXeqY6Q== X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.134,FMLib:17.12.100.49 definitions=2026-08-02_06,2026-07-30_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 impostorscore=0 bulkscore=0 malwarescore=0 priorityscore=1501 phishscore=0 adultscore=0 spamscore=0 lowpriorityscore=0 suspectscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606150000 definitions=main-2608030080 When creating new DtsLine object, pass expected indentation depth as constructor, instead of assigning it immediately after, so the code will be easier to read and explicit (depth is not supposed to change during DtsLine lifetime). Signed-off-by: Krzysztof Kozlowski --- scripts/dtc/dt-check-style | 31 +++++++++++-------------------- 1 file changed, 11 insertions(+), 20 deletions(-) diff --git a/scripts/dtc/dt-check-style b/scripts/dtc/dt-check-style index 3985923622e8..96deffc0d8a7 100755 --- a/scripts/dtc/dt-check-style +++ b/scripts/dtc/dt-check-style @@ -82,11 +82,12 @@ class DtsLine: 'node_name', 'node_addr', 'label', 'ref_name', 'depth', 'closures') =20 - def __init__(self, lineno, raw, linetype, indent_str, stripped): + def __init__(self, lineno, raw, linetype, depth, indent_str, stripped): 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.prop_name =3D None self.continuations =3D [] @@ -94,7 +95,6 @@ class DtsLine: self.node_addr =3D None self.label =3D None self.ref_name =3D None - self.depth =3D 0 # filled in by classify_lines self.closures =3D 1 # count of '}' on a NODE_CLOSE line =20 =20 @@ -162,16 +162,14 @@ def classify_lines(text): # or a blank line). if in_cpp_macro: dl =3D DtsLine(i, raw, LineType.PREPROCESSOR, - indent_str, stripped) - dl.depth =3D depth + depth, indent_str, stripped) out.append(dl) in_cpp_macro =3D (bool(stripped) and stripped.rstrip().endswith('\\')) continue =20 if not stripped: - dl =3D DtsLine(i, raw, LineType.BLANK, '', '') - dl.depth =3D depth + dl =3D DtsLine(i, raw, LineType.BLANK, depth, '', '') out.append(dl) continue =20 @@ -180,15 +178,13 @@ def classify_lines(text): else LineType.COMMENT_BODY) if ltype =3D=3D LineType.COMMENT_END: in_block_comment =3D False - dl =3D DtsLine(i, raw, ltype, indent_str, stripped) - dl.depth =3D depth + dl =3D DtsLine(i, raw, ltype, depth, indent_str, stripped) out.append(dl) continue =20 if (stripped.startswith('#') or stripped.startswith('/')) and is_p= reprocessor(stripped): - dl =3D DtsLine(i, raw, LineType.PREPROCESSOR, + dl =3D DtsLine(i, raw, LineType.PREPROCESSOR, depth, indent_str, stripped) - dl.depth =3D depth out.append(dl) prev_complete =3D True in_cpp_macro =3D stripped.rstrip().endswith('\\') @@ -205,14 +201,12 @@ def classify_lines(text): # structural classification entirely. if not code: ltype =3D LineType.COMMENT_START if opens_block else LineType.= COMMENT - dl =3D DtsLine(i, raw, ltype, indent_str, stripped) - dl.depth =3D depth + dl =3D DtsLine(i, raw, ltype, depth, indent_str, stripped) out.append(dl) continue =20 if not prev_complete: - dl =3D DtsLine(i, raw, LineType.CONTINUATION, indent_str, code) - dl.depth =3D depth + dl =3D DtsLine(i, raw, LineType.CONTINUATION, depth, indent_st= r, code) out.append(dl) prev_complete =3D (code.endswith(';') or code.endswith('{') or @@ -227,26 +221,23 @@ def classify_lines(text): if re_only_closures.match(code): closures =3D code.count('}') depth =3D max(depth - closures, 0) - dl =3D DtsLine(i, raw, LineType.NODE_CLOSE, indent_str, code) - dl.depth =3D depth + dl =3D DtsLine(i, raw, LineType.NODE_CLOSE, depth, indent_str,= code) dl.closures =3D closures out.append(dl) prev_complete =3D True continue =20 if code.endswith('{'): - dl =3D DtsLine(i, raw, LineType.NODE_OPEN, indent_str, code) + dl =3D DtsLine(i, raw, LineType.NODE_OPEN, depth, indent_str, = code) parse_node_header(dl) - dl.depth =3D depth out.append(dl) depth +=3D 1 prev_complete =3D True continue =20 # Property (or first line of a multi-line property). - dl =3D DtsLine(i, raw, LineType.PROPERTY, indent_str, code) + dl =3D DtsLine(i, raw, LineType.PROPERTY, depth, indent_str, code) parse_property_name(dl) - dl.depth =3D depth out.append(dl) prev_complete =3D code.endswith(';') =20 --=20 2.53.0 From nobody Fri Oct 2 09:22:00 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 565083B893F for ; Mon, 3 Aug 2026 09:03:40 +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=1785747822; cv=none; b=BYUcqWVZS3Zabt4MszTMIuxulDOp+4Tmaqrzp/TLfGVfy70ObJO2+tapgOT9zdCnbgZKXkWI0lTxl7DWjS/9dk+P4YUyI5lRCloSas1mV3PTT/ziL6hIpGZxWU8EpiX9PZNT7OXq3Kc97RpaSYGoaZjuOKMOGwUUPSdcDAOgV5E= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785747822; c=relaxed/simple; bh=bxJfZeWHN8d9xfT0Pz6+sjsZZT55J2s8dKumTqudY5k=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=Cs0uLHSnbnCPZOLbRBRMLLsq4e1VNjlyxIpAdBq4uQlAZCp4K3RnD3vECQnycPRqoy4Q8RIPIfymd0Wi65+etKuys7lAih+Fv0xhcJTOcYC9FTiMZLqmrO9XyoSKwVe2L6eBK1jLtbCDu9no0Y+cz6TrIyOmQXnyz7wpxhUdJ34= 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=SEJoxLQs; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=MX78WdxB; 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="SEJoxLQs"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="MX78WdxB" 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 6736F37K005862 for ; Mon, 3 Aug 2026 09:03:39 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= re2yLNzdC2NiAT0YKDMOTDWap4+skaHoSOY7mUAbLN0=; b=SEJoxLQsXiESUNGl Fu56agj4rksp/e1HWHnMnYQLKWWkNHwRBpdG9l+A++GC6fFYLPPlHYIjxLHVjA3i 6zQrWUOQw+b2dN6XOZOHht3OVSnU0GfnKKCPjrwBGtk7ggPsCPbjwGp9I2e73l0y 7JXxchNMIXFWiK6fM0OSUsi/YnIn+D6wee6q9p+hSIVX5GkRnMRh3fwYGK3dSRyC HTpIe2tR/yxN3/8k+B98mBbyfydfBJi7JpmlzU8ITgEuZphGJbN0IPGZA1F4F2No kA3sAiDBWMZZvrC24bFYOzDPgJDc+huJwM33QhZ5tkXTYeNFw7YvtUE0sBerJBwE pCZgeA== 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 4ftnj78q35-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Mon, 03 Aug 2026 09:03:39 +0000 (GMT) Received: by mail-qt1-f199.google.com with SMTP id d75a77b69052e-520a00c7a03so58197121cf.1 for ; Mon, 03 Aug 2026 02:03:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1785747819; x=1786352619; 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=re2yLNzdC2NiAT0YKDMOTDWap4+skaHoSOY7mUAbLN0=; b=MX78WdxB84cATWE1nq3xd4lCRx+9xZEyV+Ts1QbTHOk/koLMCR2ix9rDnrTIQQZaQP DysYPFIJW1f/2haON+8WSBFyShqoLC2tbGCzHQsIdd6btBAvUBI1yguGB3XsOa5bXNJj whw3k6/gCjCUWYkqzbJKWQsEgBq/lFgH3SvqfxIbJWW/hFgMZ60wQ2fXnp9hHsPDfInz yUNzHGQuLB6JnV8YiksSaJ+GBHKXTxDG/6ZJoE3yucYTqo0zF+Hx8YQELK/mqeSZzHHZ xubsKN/7jdOjTGUlD8hr6uFAuY9gpJZhDs1oPICfOkeDTGHDELkhu0QH7WKhpLZOepHc G3Kg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1785747819; x=1786352619; 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=re2yLNzdC2NiAT0YKDMOTDWap4+skaHoSOY7mUAbLN0=; b=eQgDt0OW9JtV1GlLfYDP/j4o6b/uZkPIZewRvaOHLs4b5Z7gfk4jTWzeA0KCHzbZtm U8MFYdZ9CQ09/KwDh05NEO+aTuCgRjAIXuTwRbcfJ6zlKfJ4k/Ic4MTy/6eqJ7kqNQ4L 0Fxeqm2fzVb8yU+bAmqbC6RnwZJQIF/nvWc+fmEVDJN6UXbT+AhAcIitLITtWhfI1h7C zeC3thBEg7qTex4DB9UYuWV8RjNij/INYxb/JzEevjP8g+8c6FCIxWNQHcFAiC0wl1l0 vD+TnssUfoVy2goG7EhKe1InZ6ZNJboM4qyds3g7YTUA06CopiU99MV1qU67Sr6AZRBD jOCg== X-Forwarded-Encrypted: i=1; AHgh+RoHO0bdg35ELoWzbyELiX4RoobQ6YKlhUgzOe1ys8fMXxHuBSy4rpzvElElzmcP4xfrNJXGRqNGMvU2RSw=@vger.kernel.org X-Gm-Message-State: AOJu0YzVybeL++8w22n+LOWqnI5JLWAQwnVWX28lACUTMhJYGVYSZCHF n6tRbHJz8rA3xoGy6FTIwXqZ1/HcPzXxU7ulLH+10gu6sXNU6KwwTTgcmbr6KGayNOn0oivXE/G VQmNqG3NSw/7EFAXbYviraBLErhsPKKtEkpQKmprag97zhuydG5EL4fK9lS5D+MvBivQ= X-Gm-Gg: AR+sD11Tqm+CiFELbSjTmUObPSkM5OpBUJUoxVfgR3XkVCsxvE1GFGLLGZFyZ4v+lBg 7MmPCyjZ8Q/skacGbamuR5R30ypWdvt38+kYk3EyO9o4s758ZRjYxRCgeG6pBr+SMSZclH6LwjP iS8wF0NWxZ8MygozU0sweyheVG2McjA77W81K8qBuicJ/KfDgW9aIGgexVjP+fp3dyVkEERg5ed VP/dkg59ch1psxCzuEMCoiKFVO2o6vFuLm2ESrGo5H48KJWF7ApHfIw7wUxP8ZL8i5fdM8ydqpY b39VlZt3ts8PQyWVYVfaBTvak4F48FNG9Qs8266oGm51hN54gbyhtKJUZo36JcMb64+RQp33/HP mjLoSc83uwiKhtexHHU9rs7Qh X-Received: by 2002:a05:622a:c07:b0:51c:1132:c7f7 with SMTP id d75a77b69052e-52b56770802mr198512191cf.29.1785747818399; Mon, 03 Aug 2026 02:03:38 -0700 (PDT) X-Received: by 2002:a05:622a:c07:b0:51c:1132:c7f7 with SMTP id d75a77b69052e-52b56770802mr198511391cf.29.1785747817760; Mon, 03 Aug 2026 02:03:37 -0700 (PDT) Received: from [127.0.1.1] ([178.197.219.214]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-47fd456a6d7sm31858493f8f.19.2026.08.03.02.03.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Aug 2026 02:03:36 -0700 (PDT) From: Krzysztof Kozlowski Date: Mon, 03 Aug 2026 11:03:06 +0200 Subject: [PATCH v3 03/11] dtc: dt-check-style: Handle root node in overlays 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: <20260803-n-dts-style-checker-continued-v3-3-6c9776928cea@oss.qualcomm.com> References: <20260803-n-dts-style-checker-continued-v3-0-6c9776928cea@oss.qualcomm.com> In-Reply-To: <20260803-n-dts-style-checker-continued-v3-0-6c9776928cea@oss.qualcomm.com> To: Rob Herring , Saravana Kannan , Test User , Krzysztof Kozlowski , Conor Dooley Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Krzysztof Kozlowski X-Mailer: b4 0.15.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=5489; i=krzysztof.kozlowski@oss.qualcomm.com; h=from:subject:message-id; bh=bxJfZeWHN8d9xfT0Pz6+sjsZZT55J2s8dKumTqudY5k=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBqcFlY0b76TIfd78UN23Icd/FRa9UNqorxI87uS TTdNKyI14CJAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCanBZWAAKCRDBN2bmhouD 1448D/49DfH0G0G/HbH1eiOJwDNcMzIlZiPPy8tEqt9C2xMe1WC4JPDuEKnz4t+qitCDUDuCi3U K0p03VjHrsSAvd/4cmYqe9oRmnyZWD4eq1gNAQfrPDoVbu6q5cwjbxn92xyuSDjhxglgcpkPSDH smtmaesKPzdtDRkI6YNTPB7n0pG+JEc34iKiaiiqzx4BafKeNxlkfoGxl7ivp5OwfeJskZUnDoU h4ROAajKk+2MP1JeclWtf+00sOzr5UZB205yzqm2qmoJtdWsrVSev9X3rqbETXDdBSfrowiAwG+ IdZr72bzVgmJCYnY2vNxYY7cngIUAtZXf8NyFPOSj2WXM8XEi511B7rYBphhZbdJCgb5LnLIjln JRtaT6Zfj7rTUffbNclqTCtptDEDc+ZCWi4T9TOVzAfUldBv2+N42VD++wNxiNANu3wb7Juk8mh eoXx60yTkkcsn0LLOxSecqqja4DjdeY7YMuHth0CW0YIUXWxsMbIlkygxfTsNe2CF88uEbr5SHt 5nCENBDF9K4bhqjaCv7BSspTyErJTVKKrxXkhjMaHQNTF7uPdDB4QINzyAQIwDGgyNubGjoE/Kd h3KEe6NHMeVdvd8i3XGnFbuxT6OzfPQbUigTrKPOmngLklezicK8XI3qerQCGDq2mMQqmtgLsiz zDzUJsNN5x+N1dw== X-Developer-Key: i=krzysztof.kozlowski@oss.qualcomm.com; a=openpgp; fpr=9BD07E0E0C51F8D59677B7541B93437D3B41629B X-Proofpoint-ORIG-GUID: 2k44IPiDC5OPl-Nch5dAzzAl5mzxCwbt X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwODAzMDA4MCBTYWx0ZWRfX2XUjJmacYpNm 5eI6FITHdnUXB/jbli/KoZhP1/QfbJPz6JTtCoyPTPtUAU113nPFyZpeYKQPM4HWr4zEgzfToBk D+SJXyYv900Nxd3t6iO1SL++lGmSamRzDbEFH26lfNzl3Ff3/ISolZKIvM9NlBIISYOCMH3Z9bc u/dhbmiHQPEDULYV9y3G8QtecpQ9DZWXwBH66gP7nvwKeq2qkiHhm4VFOgGg7OnOkc8EI9Bqj/Y fsOS9OTUs1J+HrbIVpY4vWM3GJL4rp6+4P6eqVXKa2l3dT8gPZ3fBIjimq+ryEa0GZqxiQvatFN PRyzZsMByjfZEa6ZI8x3QPWhI/80rZROoUdMxeqWvHP6zzKhU8r3ttDMP4AmKUTma34hG3BgqxG wNxEMep+fT49GFopaX08x6N07lYjRBQOsnhNTL2Mn3tvhOoq3xJzeqBvFXzsPa/f0VGz2Y3ad+C pWp5gAhjPDhYtNub7Gw== X-Proofpoint-GUID: 2k44IPiDC5OPl-Nch5dAzzAl5mzxCwbt X-Authority-Analysis: v=2.4 cv=PqSjqQM3 c=1 sm=1 tr=0 ts=6a70596b 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=_glEPmIy2e8OvE2BGh3C:22 a=EUspDBNiAAAA:8 a=TW557SpARfm4JLRhbCUA:9 a=QEXdDO2ut3YA:10 a=kacYvNCVWA4VmyqE58fU:22 X-Proofpoint-Spam-Info: AW1haW4tMjYwODAzMDA4MCBTYWx0ZWRfX48ukXMgz/3gs /4mxT7uj4G8WYSubdNa2oYAusVH0RisaiqZvdK8l6r0HJQB51K8dwBIQ19VnTmflXRGIaEhrj7+ AlVD9UWV/U+rhf/F4WmMV6NsT9uhwZQ= X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.134,FMLib:17.12.100.49 definitions=2026-08-02_06,2026-07-30_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 phishscore=0 spamscore=0 priorityscore=1501 adultscore=0 clxscore=1015 impostorscore=0 suspectscore=0 bulkscore=0 malwarescore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606150000 definitions=main-2608030080 Detection of overriding/extending a root node should be a bit more complex than comparing node name from regex, because overlays use often '&{/} {' notation. Check for expected syntax before creating DtsLine and store it as 'is_root' attribute for further logic. This fixes false positives for property order for root nodes in overlays. Signed-off-by: Krzysztof Kozlowski --- scripts/dtc/dt-check-style | 14 +++++-- .../dt-style-selftest/bad/dts-property-order.dts | 2 +- .../dt-style-selftest/bad/dts-property-order.dtso | 49 ++++++++++++++++++= ++++ .../expected/dts-property-order.dtso.txt | 7 ++++ 4 files changed, 67 insertions(+), 5 deletions(-) diff --git a/scripts/dtc/dt-check-style b/scripts/dtc/dt-check-style index 96deffc0d8a7..d9f76d6d9179 100755 --- a/scripts/dtc/dt-check-style +++ b/scripts/dtc/dt-check-style @@ -77,18 +77,19 @@ 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', '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 @@ -228,7 +229,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 code =3D=3D '&{/} {' 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 @@ -550,7 +554,9 @@ def check_child_name_order(ctx): for c in children: if c.node_addr is not None: continue - if c.node_name in (None, '/'): + if c.node_name is None: + continue + if c.is_root: continue if c.ref_name is not None: continue 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..782cd55ec283 100644 --- a/scripts/dtc/dt-style-selftest/bad/dts-property-order.dts +++ b/scripts/dtc/dt-style-selftest/bad/dts-property-order.dts @@ -5,7 +5,7 @@ =20 /dts-v1/; =20 -/ { +/ { cpus { #address-cells =3D <1>; #size-cells =3D <0>; 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..81ac2b092b96 --- /dev/null +++ b/scripts/dtc/dt-style-selftest/bad/dts-property-order.dtso @@ -0,0 +1,49 @@ +// 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"; + }; + }; +}; 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..a78b8c042aa5 --- /dev/null +++ b/scripts/dtc/dt-style-selftest/expected/dts-property-order.dtso.txt @@ -0,0 +1,7 @@ +# mode=3Dstrict +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') --=20 2.53.0 From nobody Fri Oct 2 09:22:00 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 72B353B95FA for ; Mon, 3 Aug 2026 09:03:42 +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=1785747825; cv=none; b=REvLspy47uSfk49eXom3G6u9vl0IoQGOh68H+luqsS0CY/2qXsP4J/Ris9WhaJWgBbRYUR+uMYTMXYf30h1m8Oeveg5DfuY8bOfSTSHaBGRAzxVlCTSvp9x+pTAltsKeGFlXth6tPTCL6rmYMvo79m6s60eJPz5ZHIHa/J+lDlI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785747825; c=relaxed/simple; bh=+ehgfCq88a330bC4aVlKBlM7axSaqvHg7R8ENeXWgqE=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=KFEqwvQomB2YPbD4HgkgxfZHe2crv0BZl7nkW8aoSUJANq3CkhRsvS/9HNjYYjmfDnAKvrcgGJVGuESm0NAlq8lZR8LiqemapmJQjUcb4Nt9I9CT1D5WjtDqm+gk4TfhjFX90OHKU+sfd03AORaMvGxG9kK9U7Gf0KyT5/BmbUQ= 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=H+OsUYkw; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=dJSaWiJR; 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="H+OsUYkw"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="dJSaWiJR" 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 6736EuNq005466 for ; Mon, 3 Aug 2026 09:03:41 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= qfS7xPNcUV5R2reXYO78DYUur2fRiq7mPGCcABscjcY=; b=H+OsUYkwa4nO4n0B 2b9+1QXRraWlpJbV63HPmm1NGR0nsiGfErttlcetNB63Gp0hmANHlNmcaY1vHfRp 9dRuGfH/pnhZSlyjJZNBgXOEzlrN3qkWoshBzy/fkieob7ZeCEsUwCP8TKx6kH/Q QzThXyksNWZNNm/1Vsx9qbokmfUiRbHtKL2gHPraBVo/Z91PaJpHvssIywx7ie/N t3BinxHVJ2JXBJ5TzLT1/zPE6QxCufr2TKy/8vLu4eEddVWRjCCUBIz7XdXjZqfc oB2sEFuirEkYo/zK11LgO0fGkxi1nPD3P1iTh+KOMuheXbitOcqI1KWvjER1tsjQ HR0a7g== 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 4ftnj78q3a-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Mon, 03 Aug 2026 09:03:41 +0000 (GMT) Received: by mail-qt1-f198.google.com with SMTP id d75a77b69052e-51a8db414c7so44304451cf.0 for ; Mon, 03 Aug 2026 02:03:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1785747821; x=1786352621; 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=qfS7xPNcUV5R2reXYO78DYUur2fRiq7mPGCcABscjcY=; b=dJSaWiJRwWNN4wUXaMOwNIyAF4u2dbUKvp9DlHha0S2ejhUHYO4x9Sf/GlpWHfg7Pg FdWqpP2hxnMx6q+8TgPYExNSk7iOPchk6yBMFH5Sswoq1CwHw3QIDEq7kQ5ilczFe0BO ngHlACYnPU+pI54rPQ7ckcoMbfatSrwgJiRCnb3xKwXzdR3mZHefRfmCk37gE5M5hLlE 5N/QFZ/un7woGT5AU72qZkYKnnXYqQ1IG3PKry6mRHOsIx2k8bDn1fEd09XPmiQs/kRo IMulmcgH5AbME0PCJmP58n1XRHGCdzAJrHyC6Qd9zT2FQY742SN9nHZNyEhvJgL+hgOv nPLQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1785747821; x=1786352621; 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=qfS7xPNcUV5R2reXYO78DYUur2fRiq7mPGCcABscjcY=; b=ljgSYk+UqDn8PbeHuPnRnYoHzgxG4pMTDliKzQS1DI/RhEbSfO6PApelnb4doaFSlI +fMDj9p5QDSAgaE5J2t5xa6dxUz4eXfzy/BBgDPWsp9+x0XnkO+VuMv/SU03E/g+es4X axVlqeSJMs5tj7o4asBRGAATuJFshlyAA7fwCoS/jy04skDo9u0E0SDqzX3TFs1Cybtv nJycIDZm4EiK/mDhJCg0YDanTzRkemzSMu/w7ZfEl1p8Z4q2ab+GM89Psoci55+Lsi9j vOcBoVgzUtgBpzcNWruIFyO0imcaJHZsVKWzjFOSn7lZA3XgWY2ZFWO5ggmoAVEofcLW 9ZTw== X-Forwarded-Encrypted: i=1; AHgh+RpPjCz0O7w0k1WXltaj+2Gs9tmux10/K38RJS7bLNXpFWNjyqy7CDbsfaZ08LgVs7RylSju6UBA/duVpnM=@vger.kernel.org X-Gm-Message-State: AOJu0Yx6UuvY1/noAsXV8UVI01SJnOJpvnIe+M8dFP24HLUDHGGt5EKL PF7fJvCJzFfcAGWXUPfYjCe8NK0izPZl5Wuy5ipdAz4r7KQEFwr0uzzxYdKpi9oHSPsHHk4YRgW Mi8OxnuRO1+ulSAnHl1YcaPonMZd1UDAduC/N6o9X6ZDph8letMXk1tPhScw37mhiFVztyxefqh 8= X-Gm-Gg: AR+sD13dQRJv+iN4/q3jKt4v3LNEDOpH+VCdttC0B6MCZMlTKNxgw1VmIBG6C/ea1Uu 5tQoPbyKZRhTGFd9scraGHNCksGT1xT7rmfkES8E0kgzP3uUxu9b1MiyqA3GNFnLUsUxzOXTtX2 F1x92+E84jcnwnTLMDWAOvHoFRoPnDMatEe4PSKdsX8SFvXGVWvsMCV1w40M5fasrP6Xdbiv9AP fsk3Y67zrcq03svBWMAJ5lxCBtBYWhPplDUz7FJTU38jrLCfFNiRKCX8639umnuaW5/bz2ovi+8 ukV0oO4AvMpW6/3TvP7+WfehctAbjx/kXUtTMIf4cv1FsxE5chtGsUWzil7PMKVR/e0DmglKEl3 g21CRQ7XIaWCge4Fj1YtQwBL3 X-Received: by 2002:ac8:5808:0:b0:51c:511:c5 with SMTP id d75a77b69052e-52b566abe43mr168063421cf.16.1785747820280; Mon, 03 Aug 2026 02:03:40 -0700 (PDT) X-Received: by 2002:ac8:5808:0:b0:51c:511:c5 with SMTP id d75a77b69052e-52b566abe43mr168062891cf.16.1785747819725; Mon, 03 Aug 2026 02:03:39 -0700 (PDT) Received: from [127.0.1.1] ([178.197.219.214]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-47fd456a6d7sm31858493f8f.19.2026.08.03.02.03.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Aug 2026 02:03:38 -0700 (PDT) From: Krzysztof Kozlowski Date: Mon, 03 Aug 2026 11:03:07 +0200 Subject: [PATCH v3 04/11] 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: <20260803-n-dts-style-checker-continued-v3-4-6c9776928cea@oss.qualcomm.com> References: <20260803-n-dts-style-checker-continued-v3-0-6c9776928cea@oss.qualcomm.com> In-Reply-To: <20260803-n-dts-style-checker-continued-v3-0-6c9776928cea@oss.qualcomm.com> To: Rob Herring , Saravana Kannan , Test User , Krzysztof Kozlowski , Conor Dooley Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Krzysztof Kozlowski X-Mailer: b4 0.15.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=20420; i=krzysztof.kozlowski@oss.qualcomm.com; h=from:subject:message-id; bh=+ehgfCq88a330bC4aVlKBlM7axSaqvHg7R8ENeXWgqE=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBqcFlYHwrGUFNm8yI94HF1GbHn5Kv7cMIgH4uXX 7D2+mjMniaJAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCanBZWAAKCRDBN2bmhouD 10TBD/45mUJmowNJwo0RfTjffS8itme6lHJJJhTOz2KCl9BjPwMm3dFHCRyqtfw8fo4IrioeT5O bPcFI7FXKZLub+0MCtm9+5KH1GZV63yH27H8j5JPC55FEj4dFisH6anZSXi8sixS1SxECebNjPE OpSvUQHfMSb7CQMrxwdiIylsZ3VtLpGSq2H5+QPrIhxH5PANz0ftRXEnyem9SGs9tx84f29TgxC 8Pz68Ol6b4D+/nm3hFU7g8o3eBhI6U928HBMZgYvPEpZkwKF6GxYf+p2LM5GP7f71RrvE295Zrk l14PBCgMwitWkKP7nRJrHYecjJB2mj1bWOs1y9wJ8GTDl6eMHFcjFJsxCaM0hhLwYcyswMObSm/ yJ1l9a7vzWtYAC/Z6IhVfzIQlKJOue16nM+1Jr4MM2B0riQ3vuN6lUiClYAT/cC5D3t2svzUM/S JbNw6yuDIaLSyPchBHV0FA5GorWB+bQpFRSA/QsHlB8VRxbw5DqSRDqcM0PTa4PlboIJ2GFFeec MEiHu6/GVYqgU+AAJ//q/1JJCk84SvOxJzrtfh6St7Fsvw5lcgP7aJWJ8Zs63qUVrCLarxatK+9 eISaOxgFOHSVYQyTWtSqphyqj++Wu/ASXe4gE4DyEZonmh/PfFrvx9UqeNCO2P7NGmkkfLK7Ey2 UFvNSEZGNdOx30A== X-Developer-Key: i=krzysztof.kozlowski@oss.qualcomm.com; a=openpgp; fpr=9BD07E0E0C51F8D59677B7541B93437D3B41629B X-Proofpoint-ORIG-GUID: Wja0Za2-WFRNheOwblX6o_DOZMV42390 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwODAzMDA4MCBTYWx0ZWRfXxRzOHsE6g5Av NSavZRAEfDwqNTDb+Y1f6yN6htcBAHaPVZ6iXJtEyfunVfrX7LIhoPecn43Z+KkFqY8ZuHGn208 Xg8V3ps6YwOVAwJdlCAVwEocDYqs4y/1dSdqveTTwPVqReE7M/BgqqvXRpTjnvdoTwx6EhUbsW9 CcyZjKrLZuy3uKVAv5NtKpkb26OI2V3XG4zZwZmGg2Li+6fkgfIWlwd96MVbSVKgMZCr67P7nNz LCsk07NVKMr9Rk3hBB2SLdyBeg3gh7rYgByrahAZH3I47+N8gVmoki4M89Cn/kROx2sysfNxhOx 4R9eI58a8aBAXAPvm/LDozPPI19ngGhFKy8ykaxIrG9lKt70Fg0fkSMP6qpdBiDAeXf0oitBWwC bYNLpx5AAQSO8ja0hIom8dvLcq8Bp10O/IQsXmWWVv0/68EH+tRbGfFLSOV8OfKtYAXkA+ESKCR Vn2XhXcWE4xCKQDJqBQ== X-Proofpoint-GUID: Wja0Za2-WFRNheOwblX6o_DOZMV42390 X-Authority-Analysis: v=2.4 cv=PqSjqQM3 c=1 sm=1 tr=0 ts=6a70596d 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=_glEPmIy2e8OvE2BGh3C:22 a=EUspDBNiAAAA:8 a=M31IkpsM9wu0Ilc1mG4A:9 a=QEXdDO2ut3YA:10 a=dawVfQjAaf238kedN5IG:22 X-Proofpoint-Spam-Info: AW1haW4tMjYwODAzMDA4MCBTYWx0ZWRfX6ZM+Yr0JI1ui LwiiqMWVLzhgpEjDJuKW8fO6UJAwK0LuZVmy/Y24ognlkT0LCCBsawfGIMZETBuPeANkQFodOp9 toxEIxdqRKaJlL1r0taKx7ysaKtfMH0= X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.134,FMLib:17.12.100.49 definitions=2026-08-02_06,2026-07-30_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 phishscore=0 spamscore=0 priorityscore=1501 adultscore=0 clxscore=1015 impostorscore=0 suspectscore=0 bulkscore=0 malwarescore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606150000 definitions=main-2608030080 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 | 60 ++++++++++++++++++= +--- .../bad/dts-child-name-order.dtso | 33 ++++++++++++ .../dt-style-selftest/bad/dts-digit-node-order.dts | 40 +++++++++++++++ .../bad/dts-digit-node-order.dtso | 41 +++++++++++++++ .../dt-style-selftest/bad/dts-property-order.dts | 5 ++ .../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 + .../expected/dts-property-order.dts.txt | 13 +++-- .../expected/dts-property-order.dtso.txt | 1 + .../good/dts-child-name-order.dtso | 33 ++++++++++++ .../good/dts-digit-node-order.dts | 3 -- .../good/dts-digit-node-order.dtso | 41 +++++++++++++++ .../dt-style-selftest/good/dts-property-order.dts | 5 ++ .../dt-style-selftest/good/dts-property-order.dtso | 47 +++++++++++++++++ 16 files changed, 315 insertions(+), 15 deletions(-) diff --git a/scripts/dtc/dt-check-style b/scripts/dtc/dt-check-style index d9f76d6d9179..f9e5762862a5 100755 --- a/scripts/dtc/dt-check-style +++ b/scripts/dtc/dt-check-style @@ -79,7 +79,7 @@ def is_preprocessor(stripped): class DtsLine: __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,= is_root =3D False): @@ -96,6 +96,7 @@ class DtsLine: 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 @@ -495,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: @@ -525,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: @@ -548,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 is None: continue if c.is_root: @@ -597,6 +616,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 @@ -633,13 +676,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 @@ -674,7 +720,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-property-order.dts b/scr= ipts/dtc/dt-style-selftest/bad/dts-property-order.dts index 782cd55ec283..e675e5e05a46 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>; 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-property-order.dts.= txt b/scripts/dtc/dt-style-selftest/expected/dts-property-order.dts.txt index 4bc21328625f..29283f3451c7 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,9 @@ # 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:8: [redundant-whitespace] extra whitespace befo= re { +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') 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 a78b8c042aa5..124183fab2ad 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 @@ -1,4 +1,5 @@ # 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') 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..477b13b1ac2e --- /dev/null +++ b/scripts/dtc/dt-style-selftest/good/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>; + + 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>; + }; +}; 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..79ea2deec789 --- /dev/null +++ b/scripts/dtc/dt-style-selftest/good/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>; + + 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 Fri Oct 2 09:22:00 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 D44323B71BF for ; Mon, 3 Aug 2026 09:03:44 +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=1785747827; cv=none; b=Am148Dh2pe8ami4V8PX9fHSQscfHc9UneYe4lCA2gf8R1MyKF7DbMiAnHLTkN8I2baw0t6Hp3+e22x8rdmsS+doEEt5JmvdJf7SNiWooTwSXnVEbMU9Zv6WSFb2edwaShcLoP8cqxQV2MZlqXvz4YdhbFDQ5fMeOw1S38AiV1dU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785747827; c=relaxed/simple; bh=263fUukRd2gsqjs2cR1CVrD9tSdbDlq0XbC55hmW6lQ=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=pk7ULpLtJZaxHgCyCYHyCtXl2SqsU7Q3410OoC7H4cEM8Yx9DCq64Xmw5h/wKiraLdwsY4ItvLfSv0MmFC2thDoSf03Hci+JJDzUXUWZx2oRCaRrNUlM6hpvrzPEYbOazVOwabFDeh4gQEHdOtwTiEP5zskQLAop4Wqigj0BPFc= 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=QAd6K3ha; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=jmC+B5Mk; 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="QAd6K3ha"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="jmC+B5Mk" Received: from pps.filterd (m0279868.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 6736bHiN3956974 for ; Mon, 3 Aug 2026 09:03:43 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= SCscGo3iB2rU9+PbHk2eXj0coifmdmrexj0FZjknKa4=; b=QAd6K3hacASZebKZ qiT0v5xwdYmNwOG0dzQk1DRPjGs/6VM00xR78euV5p7WPLNgXl+llyFbGKvrL/4J Ra21dpqCz82ju4pvYqEVvq/OAgL/mUbTn2GT5dTn9PTJPlJxUjLi4ixqBQRMGTq2 Q11tCGyvVXcykDrm3q60u/zS7q96hD+oJo7qM+UiBOl+MAuWyZMiT89lZEX5E/s3 t+DZnOOddkz0SZq3E/r6aSwWesvo65WDT/t5gBaZM0+q9bWH2wDzVsl6jSikJjkH EAxdtYGVboxJILMmEtVN6YGSY4KVF0/cwiobcSAbcgBUuUE+YBqKPZKODaK8rHj/ vJemhg== 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 4ftnvngnc2-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Mon, 03 Aug 2026 09:03:43 +0000 (GMT) Received: by mail-qt1-f200.google.com with SMTP id d75a77b69052e-5174a236220so27270271cf.3 for ; Mon, 03 Aug 2026 02:03:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1785747822; x=1786352622; 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=SCscGo3iB2rU9+PbHk2eXj0coifmdmrexj0FZjknKa4=; b=jmC+B5Mkwad1667MpR3Ek3UxHv9DDHz8TXR6OHIgPtaqFXTgORXDIJItc4Q8GjzujU XmndXzJwDK3SYctsdCseeVkMAlYJD2rXW7hRyNErOLwrYRT7D3uDlTlGBEmWNzp71DXu jMvvr5MpsZ0bJadTwozR3KZRT/cBfELezw51MuBUB7wkW/XjYbw/rCNoYXyzy1O6zhAJ maJRiHcZQyU1QeSaH6C9bl/4oqB+tXpV8gsjgE44H7DqZDoK7g+9LlNvqI805gH6fIPB BOcbZsnpLQJ+OomLyddL9G4F7HNXeb0KHFde6H0uXTvB5J3lPCXtEIBlQPjunT+GttRT wXGA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1785747822; x=1786352622; 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=SCscGo3iB2rU9+PbHk2eXj0coifmdmrexj0FZjknKa4=; b=ckhnbm9wDVZG38ut8tyBxTLOUibS1I3P5R7512G2VI6oqIQyI9ABnvMe6CkkjmA+t4 K9+AKBFkz7jM1FtH1l0RgpZA35tuNYV/n0xBffnvM8h4yKhkcUOI53H6hbNYE4tIlrbu TDe2pC7SUzjvH8k1n3lvEEfDo7w7qo4BXj4s39qYHJgu2F9DnldAfhhZ/B1Y9eGEhuP/ AWTsck8QfKtZPt9714EYAHDnvuEzUPtJq4KmlOUWQ7u8wiuyJ5bimKpC6ahL6A6BwWA/ V+XlQzvaoW6fzjfaZ9XENjSPdJEHp64Ww/qo4i66stOUBzjjxfIuW+mpdecZTtnT3Z15 l1iw== X-Forwarded-Encrypted: i=1; AHgh+RrgBEMB5HSKuhmVzz6nFTqeCHbm2eBfNsy/0h5bmsKF5D2VRtivs70XAhL2A/Eg7AlC9sM/R3MFiJqyAn0=@vger.kernel.org X-Gm-Message-State: AOJu0YxNUPDdVz1pUiGf8n0Pkodf0cqgOPFtdVtd6wIx/oLXBPuuv8Kd paOe+xxWpZLNlMmkeYaN3d0BE02yvGqIUq6ja7HxzT1IAYuZTLdP+e2fPziCfuvyD56AgBCsin8 afqnVexDVuuR3Gl96A+vJe1C9jzVDK7m4rWV1OyCAojy+Cb8sV5vzKtqYxM0iKPEYZO1ojXJkFI E= X-Gm-Gg: AR+sD10HfXA1TVW4vDufFDJqJPMY08sneVYuQq1QM5jhiJXsld7WlzKZZXFN7sTDc3a bN2URHbL9fCSTWID6QHnyDJhP7YUDMMEIcy8KnTbcN9fZORuN1naq0O/WUIXRgA2sdj3lkmWvQ8 l/0zPrr0Q6dR4QE/r4LiPIPN739K2WVK4f7+hOJwbXjiciS1xwKMSRVlPLwONDnoAZlzooS4/OQ F1ooNWZHfKYkiB6eGPkz7X3hl0m4vWgTMwJs3oOF42vw/HCAtzplYf7EWr9fn+/U9svf5H3oEx7 FeEwxcZev6Rt4isIvpY3TRN82FtbWZoYhfDfGjmFkvTqTMs4/Nv5utU1IaIXhduCqH3xYmqHQTH 6zBA7qeMu6zdnHnUqssV8bf0v X-Received: by 2002:ac8:5fcb:0:b0:51c:e14:87ae with SMTP id d75a77b69052e-52b5686a056mr179805701cf.34.1785747822521; Mon, 03 Aug 2026 02:03:42 -0700 (PDT) X-Received: by 2002:ac8:5fcb:0:b0:51c:e14:87ae with SMTP id d75a77b69052e-52b5686a056mr179805231cf.34.1785747821990; Mon, 03 Aug 2026 02:03:41 -0700 (PDT) Received: from [127.0.1.1] ([178.197.219.214]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-47fd456a6d7sm31858493f8f.19.2026.08.03.02.03.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Aug 2026 02:03:40 -0700 (PDT) From: Krzysztof Kozlowski Date: Mon, 03 Aug 2026 11:03:08 +0200 Subject: [PATCH v3 05/11] 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: <20260803-n-dts-style-checker-continued-v3-5-6c9776928cea@oss.qualcomm.com> References: <20260803-n-dts-style-checker-continued-v3-0-6c9776928cea@oss.qualcomm.com> In-Reply-To: <20260803-n-dts-style-checker-continued-v3-0-6c9776928cea@oss.qualcomm.com> To: Rob Herring , Saravana Kannan , Test User , Krzysztof Kozlowski , Conor Dooley Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Krzysztof Kozlowski X-Mailer: b4 0.15.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=1667; i=krzysztof.kozlowski@oss.qualcomm.com; h=from:subject:message-id; bh=263fUukRd2gsqjs2cR1CVrD9tSdbDlq0XbC55hmW6lQ=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBqcFlZTqEgqBHKTJSmVkfUHHgk2riBi3eHoo06u pD+jd+asduJAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCanBZWQAKCRDBN2bmhouD 17MnD/9FOsCSB/vQcQhhaCL8cdCRXZm1vqJH8d1b2Zrw77HnoFrLzbkXgkifcVzWTF31ZXRXwKn VeaDC+b4ItU6h55jvNzNOeFqKtyM2zkKxPTHVV/LLwPiOoHIcJtrfTmmih9FZ8gA2Tg31HghMfB eZID90qMkeMfncLKAn6NTrEs6ULdsKxb5Gd/Al7Qp7TnmFuGB10ufZ6xLPHQefTijahjPvelmqH cEa4aNt7AU5uQzpQfsZ7JLM3Yv9O+VwmRyvWAJ3LKhwNaLnkgbsI+6OqEzOtKkN/jLmDJ+gApSQ hfAkE7ATfdCTgEwqI6k4aMCiwVwF3uDnE3ZI2V0nyqO7fR+SYUwVlKYuusVlo4+ApiRj1VbEQQ6 h0ECxgqd0WL7qQSBFRob5PRB32lr7ZHIy5bSSgtNwQk7ycOkkUP5Dlz44M/4gVdMXCAvTmjObNa CIy/g233Ucj5Hobwl/23a9YpdGY9wnFL+S5/FzMEcepWNsf1jkiMUV2JoXUl15EWVkW1c5JnquC STixg/fop0N499WHNFL34Ra9z7ZX4Gx6puTB01X3Dw7H9k83AcWrY+CAQifYYJUVFH5kZP19JQX iQvp/CJJuD4Ywux7+9WwWq7OQpFamsLOHmvelvxlNVgtY8pUmElmToi412xNW6+3xa6ipNki62H UjY5Mv1z6w/zdMw== X-Developer-Key: i=krzysztof.kozlowski@oss.qualcomm.com; a=openpgp; fpr=9BD07E0E0C51F8D59677B7541B93437D3B41629B X-Authority-Analysis: v=2.4 cv=aoaCzyZV c=1 sm=1 tr=0 ts=6a70596f 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=ZpdpYltYx_vBUK5n70dp:22 a=EUspDBNiAAAA:8 a=oYyeLu5mwHFlQtcaYCQA:9 a=QEXdDO2ut3YA:10 a=uxP6HrT_eTzRwkO_Te1X:22 X-Proofpoint-GUID: aNgPnNQ_Xaddg-FrrDQlNpmBd4OCxHKz X-Proofpoint-ORIG-GUID: aNgPnNQ_Xaddg-FrrDQlNpmBd4OCxHKz X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwODAzMDA4MCBTYWx0ZWRfX32C2sRNZra0N o6FGCkNHQxCk98LmkF5X2wHHbF1RMLgqrjVQbPPdYYjTPWzOeNURaDT9xc9S2tV3hC9flYhf2+T HRrMY6zgjrrpsADHgMaCymDTD72rVKPyKy0gy7JtmAl8mbqmUxgD4y29y6rFoeiaGI/CmE4TOPt sLWEGWFTPKLGYrCJMIxTFA3ru4PgaFK0MQiTY1eSVV/F7ioxjx7aYiMsfK9r6ewjutn1LpohXX9 zgfrmIbXr8DdW7il9pkSX45P/borhfyBRzjENpXzCurETTuuxy7TUCiZp5JWqh4+XrKCbySaR86 LRNqJjcgtKYTuj6JEz6D/RFL/x+CL3DTGLexawjLXwoqnJtGYuuIjGxFs4ZSDIHSs+LZtC0riKM +lC/eXbvRI7by6P2x69FpPkwKPjw3anvCXESF18yJ3LuA6alO1xxcEBZjijIpLaTMXnDNFAhvT5 m9epS2a5l18tjkPKgRA== X-Proofpoint-Spam-Info: AW1haW4tMjYwODAzMDA4MCBTYWx0ZWRfXyy3qB+l79FiF G2p51gh28HlHOWg8PzbglOtt1ce4JnNa9WUMeYrB8eYyWgo/Vrbs6jbmpNZBacwsxzQHiIPAeAz ZcFQPx0a5umMzcGloxv23Wq/CI/2VY4= X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.134,FMLib:17.12.100.49 definitions=2026-08-02_06,2026-07-30_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 bulkscore=0 suspectscore=0 priorityscore=1501 adultscore=0 spamscore=0 lowpriorityscore=0 malwarescore=0 phishscore=0 impostorscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606150000 definitions=main-2608030080 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 | 2 +- scripts/dtc/dt-style-selftest/expected/yaml-cont-align.yaml.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/dtc/dt-check-style b/scripts/dtc/dt-check-style index f9e5762862a5..bdf36ba9e274 100755 --- a/scripts/dtc/dt-check-style +++ b/scripts/dtc/dt-check-style @@ -950,7 +950,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): 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 Fri Oct 2 09:22:00 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 83F6C3B895B for ; Mon, 3 Aug 2026 09:03:46 +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=1785747828; cv=none; b=ApQnTtXV9xEFnJjq/S4fQlUGmTgN6Cn9HLcWlkLfaX86hkHNdEcoE6DpvKhrqCNGM8PAlwU6igP+BsCOEMOJ3QDYLNkzEupXX1FelGK82WuSa4OQqUvNpyTl9WOn3YGeMnSgzVikVALlgMTfL+9SP7Go8+mp9eoN8ln6kjN7Duc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785747828; c=relaxed/simple; bh=Av2HS7fUExlNg+81qDfD4hRHsNSti9gi7XlyddTlo28=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=tCK0cQkCGfPiikK52CN5AD9NH9+2Zm3ja3iUBapkcuAIWSbzlRI5E84Sih/ej3u1YXzcmcSp/C4eAeYzegx/ShPVmCTa+Di6gTpNuIO6eFfSG22dFreGdTRobDaED9h/C24StfXSN2wm+oo8ZbgqPtKu3veSvFVPERIF1WhaEnQ= 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=jmyV86ei; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=jB8Odrc6; 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="jmyV86ei"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="jB8Odrc6" 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 6736sSC33790715 for ; Mon, 3 Aug 2026 09:03:45 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= NPks+x60BCYOO8XRSEJcDRXMlkEPWzK7NZ574fiVVUk=; b=jmyV86eiwh/zujTK E/6s63FsAw76KAW56f0Qlk+TN/CC/L2Z1lICEcnVzxjgTokr8bdNAyTaM/vfMSlP 8DDQ7uXvnxFq304+nPYWa5ECQXj0Q/XIaGnYk6E9phGdffQDPsRcJguiGHXK9Bl4 7N/i7+LGkj0q4Br14hE6lD0+JS7s54DabIwh0Yu28D77mBagnkXswYiq+jAmYvXs 5frjF7ZtVvSSrCx7Lbe8ZGIVF6rXty7BRezRTEMi4Iu/yuGSdIRmjPg9PNFzLLtQ x/0TT3QdiP3GF2ooELD9OAoCa5nHQZLq89gZCOF475cWAX6izrTsRNcAdT/2+IRc KHcKdQ== 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 4ftp4r0kew-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Mon, 03 Aug 2026 09:03:45 +0000 (GMT) Received: by mail-qt1-f199.google.com with SMTP id d75a77b69052e-526da7e3c9dso27322201cf.1 for ; Mon, 03 Aug 2026 02:03:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1785747825; x=1786352625; 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=NPks+x60BCYOO8XRSEJcDRXMlkEPWzK7NZ574fiVVUk=; b=jB8Odrc6g+TU2eJtQPDGwuhbScx2R7L6/Ti4/yGOf9PThxfGGpyS8FPZBPqQfNRHDW AiP9w0Zf+C9MJbfYUmTntvbAnU4wQNxsGJ/JU8wdHqeVxUTg/0DbCHzfRbxEiPqubjia jwY8TKTod9dXkqanN42XX2n+flS4jQ62mz6GMWqJuyDg1eRPTMCmp9stqkXynmUfTrTJ x0/xQAvJiRTYOyXnLE4f+FPUH12l+zPp5lU7S1FRp+d8ujdYJmPgozmiC7k7H+Xi20Dh VfG5bCciQBQNaj0CgewHuFeASv9Vc0QA+/Q/JY8Ij2rb74PEahU5rLfg7Deggl2Skykw DA+w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1785747825; x=1786352625; 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=NPks+x60BCYOO8XRSEJcDRXMlkEPWzK7NZ574fiVVUk=; b=ZYye8B+mF5vAlO+jh/7+HxXif32hdwelfEKDEP3uzDpTAGqtccfxg0tZuCmrIj9yO2 zPY5UBroYBB5XRUk13jHjV+RfFsC9Zq3XgYp5X3D6AIFNC1zygOxGXlLsbtZr6MEP2mg xFW5sz2mbBRAUET1wrNqgYqmlNRnz4yDxxP1yqTsKU4cTMwD1fSrmp0fSpr6zR7rb539 wEsq63bSAdPxdJ4BzpYW6pbmy3rKvgZIsyupiBU5WmFXDNVZLb4kAkQAqutnvMCTLtDA p+pKdxXvs9MFp6GwsLLcdms2BTDWHCih1a4/rv+mButDTVXTN1ym83PDipY593IjnUEl FsCw== X-Forwarded-Encrypted: i=1; AHgh+RpM/nJyhFX6YGylDgpJgROmvNpvpLD6Aw6t0MLfw3Sl+TKbf5YV3Wsdn3tF85KK/OQq4xWrbXxkwR7m4Ks=@vger.kernel.org X-Gm-Message-State: AOJu0YyicFdnmQDvjFV12NCk+cWX1w1gOxGBRP/vvPVEb3iLywsWIDQL ztRv7ZVQVLqkhW7CmfbqVoo4qd9xrZQze0hTicyCaZzQzdc7bxZrAJnR2JxOekP5riVkfrW+4nn 5E8L+S401HpoLUxTQ5y68CceeeuJYdicLpiKJlU7B4PnESLKNoMsbtnZQQiHQJq4YdPA= X-Gm-Gg: AR+sD10vkqBNs+UddYcCyrgRSPRI0y+xW0VIKvTLZVxjdPJjE89NILamRa7DiL4Gmx4 RZcMWSV0LuNoHb8fLO8XqAJZ5TUc5qnsmvvYFgY5FoSCNsbALJo5TRWNX7l6fERw7vKwq78NN8T zHgCpe0cjFXJQJa9DqOs9KRqJ2zc1D5zEc/gw5eEKOevtJYnrpxK+pWFLkkT/nXWxLAuMPjJImx MZy53D5DcG7dJYMEunsZOzC/7Wo7aRiMdbVIl15JNrTfTcvsk+ykzQz207IW5hKoR0UW8XCzErT c46xi8IfBBcWqzPhlorXwjIMzEhKbON/8tdiHtSV6SmaUjhIPGfTbPr1r9d8F2vQtuB3GTJllad ny8iq1xh4c+EXObyVPouxbnli X-Received: by 2002:a05:622a:1aa5:b0:51c:a8:51cd with SMTP id d75a77b69052e-52b5669ddc1mr165929801cf.1.1785747824600; Mon, 03 Aug 2026 02:03:44 -0700 (PDT) X-Received: by 2002:a05:622a:1aa5:b0:51c:a8:51cd with SMTP id d75a77b69052e-52b5669ddc1mr165929121cf.1.1785747823851; Mon, 03 Aug 2026 02:03:43 -0700 (PDT) Received: from [127.0.1.1] ([178.197.219.214]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-47fd456a6d7sm31858493f8f.19.2026.08.03.02.03.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Aug 2026 02:03:42 -0700 (PDT) From: Krzysztof Kozlowski Date: Mon, 03 Aug 2026 11:03:09 +0200 Subject: [PATCH v3 06/11] 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: <20260803-n-dts-style-checker-continued-v3-6-6c9776928cea@oss.qualcomm.com> References: <20260803-n-dts-style-checker-continued-v3-0-6c9776928cea@oss.qualcomm.com> In-Reply-To: <20260803-n-dts-style-checker-continued-v3-0-6c9776928cea@oss.qualcomm.com> To: Rob Herring , Saravana Kannan , Test User , Krzysztof Kozlowski , Conor Dooley Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Krzysztof Kozlowski X-Mailer: b4 0.15.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=8500; i=krzysztof.kozlowski@oss.qualcomm.com; h=from:subject:message-id; bh=Av2HS7fUExlNg+81qDfD4hRHsNSti9gi7XlyddTlo28=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBqcFlabo1mGLd1kMsbMy7hsvPDJ+y0EDPxuDvA7 qk5d840DvWJAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCanBZWgAKCRDBN2bmhouD 12fOD/wPklfAeaGs8rQgVKCU3DVZZAWG2K4v2B5mWP/M/vkeA1cz2mseX8+bzv+bKtQcm10GH0J NkSO/NZ7pVH6BTqL4/X9p2WdiR3+S08+4NSVIMN2oc0il8jrPObV9lCPEsX5ZLFzB0zDvP+nCvy E8Mnxlr1uxknccv/3lVSdQl70jdJGGpT71lkaLB6NFVmpbkpYGRfKy/wUsXWJVXAvlZaM8bhjLN ulDiWO63/FUsbZkb2ba8pshj4M+zjKfLXl7qa2M7cJNlWW4K/mkS0kBdiV3UNlTlcHNZb5bYWRe QM31jlXZJqas855set4b7BvMEJxllUvHXqVJ3ZcL7MbGRGK2fBhDtlNBsvtyPxYEZ+vc8IU4Q7T kEQIOQM4lK+zrL31KihK3mnSyDCQVsHbF1uM7Nnbj+5xkhAeHVZT/2sN93feW0XXQxEIqMnl4g0 BBDHHmqpbMU9jJL5BwVV/r+VYtrd8XNX5y1iNTTz0U5DxMQUgDYFaZHLnGJ6bIpo5MUdm9emm4n fo8StmG8rtgaJa4eA2LN6nnN0Ux88BM6m/TM14qe1e1hICNd4hWuYHDB5rpFOE1DDYMguArGH1p NldkK+KmOaEg+4nq80AKTEqcs+FiGxpKZagHru7ifOizKUmCnDoFiRU4DAZsTb0JzBzWqvl9Rbf zExG06jLXs8veqQ== X-Developer-Key: i=krzysztof.kozlowski@oss.qualcomm.com; a=openpgp; fpr=9BD07E0E0C51F8D59677B7541B93437D3B41629B X-Authority-Analysis: v=2.4 cv=X9Ri7mTe c=1 sm=1 tr=0 ts=6a705971 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=JHzK3u4RkIQMqoYOWxQA:9 a=QEXdDO2ut3YA:10 a=kacYvNCVWA4VmyqE58fU:22 a=sptkURWiP4Gy88Gu7hUp:22 X-Proofpoint-ORIG-GUID: d1HtWmTWWq3YWNfqOC0lLi4EIGCZiiPT X-Proofpoint-GUID: d1HtWmTWWq3YWNfqOC0lLi4EIGCZiiPT X-Proofpoint-Spam-Info: AW1haW4tMjYwODAzMDA4MCBTYWx0ZWRfX55oHGpeG2DoE FKaSZMoSRxhbXhbQV8vIqyVFu1FEz0hZ2RJreWIZ/zdLfrfCtkLo8OS5WTD0bwQsJW1PdXrXFaT l9hDhOh1vVEC9gjebr71ATOBAr6anZ4= X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwODAzMDA4MCBTYWx0ZWRfX0QiWIsoy96LU KABqjHkzt3y4DbHSs1HuTWGcKwUhcaGBOeqhxvlProG4nxyHDKFkZHRHURvvmdMdAAJVRc69LoY 6HTXXfUjWb9aAnfwo8B8JLBowQN0LDBFzhoqMc3+QrFv0s+hfLEFefukaPcAmudvbs0fHImDdpz nRtVdGLOieqjLiP679m39Tyz2sA5NXGs0nk6P1w+r06G0Js3l1HCMr13pxZe54VUZOZW0lSWnb3 k5MhHYy7JWy1hgV+foiGvRfSqDi5NUGDVBnmCDdthRcMdoW+LR6Wpxn5SZfER0XP/DOrZ60x2R8 Vt4n3l5PehHKElIPDdrKU2C0RybW4L8Q2wLMIummbbeVC3DrJihM6I9PxnJwXrBqb9PK8thPMxJ dxL9mygWI+ds849vDgZpHM8s98QRuVf8HMNT0eu8nvl1DsBi/rIl8go1zFXxX9PAfubFr1ylgje gfy4HOYBTlcKqHxfwEg== X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.134,FMLib:17.12.100.49 definitions=2026-08-02_06,2026-07-30_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 impostorscore=0 bulkscore=0 malwarescore=0 priorityscore=1501 phishscore=0 adultscore=0 spamscore=0 lowpriorityscore=0 suspectscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606150000 definitions=main-2608030080 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 | 22 +++++++++------ .../dtc/dt-style-selftest/bad/dts-cont-align.dts | 23 ++++++++++++++++ .../dtc/dt-style-selftest/bad/yaml-cont-align.yaml | 4 ++- .../expected/dts-cont-align.dts.txt | 8 ++++++ .../expected/yaml-cont-align.yaml.txt | 3 +- .../expected/yaml-value-ws-multiline.yaml.txt | 1 + .../dtc/dt-style-selftest/good/dts-cont-align.dts | 11 +++++--- .../dt-style-selftest/good/yaml-cont-align.yaml | 32 ++++++++++++++++++= ++++ 8 files changed, 90 insertions(+), 14 deletions(-) diff --git a/scripts/dtc/dt-check-style b/scripts/dtc/dt-check-style index bdf36ba9e274..1c67348fb526 100755 --- a/scripts/dtc/dt-check-style +++ b/scripts/dtc/dt-check-style @@ -928,10 +928,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 @@ -942,15 +943,20 @@ def check_continuation_alignment(ctx): continue # First '<' or '"' after '=3D' rest =3D dl.raw[eq + 1:] - m =3D re.search(r'[<"]', rest) + m =3D re.search(r'\s*([<"])', rest) if not m: continue - target_col =3D _display_col(dl.raw[:eq + 1 + m.start()]) + target_col =3D _display_col(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 re.match(r'[<"]', cont.stripped): + 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)) =20 =20 def check_unclosed_block_comment(ctx): 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..2087dac23d96 --- /dev/null +++ b/scripts/dtc/dt-style-selftest/bad/dts-cont-align.dts @@ -0,0 +1,23 @@ +// 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>; + interrupts =3D <1 2 3>, + <4 5 6>, + <7 8 9>; + pinmux =3D <0x01 + 0x02>, + <0x03 + 0x04>; + power-domain-names =3D "foo", + "bar", + "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..d4662acc7b8f 100644 --- a/scripts/dtc/dt-style-selftest/bad/yaml-cont-align.yaml +++ b/scripts/dtc/dt-style-selftest/bad/yaml-cont-align.yaml @@ -26,5 +26,7 @@ examples: foo@1000 { compatible =3D "example,test-cont-align"; reg =3D <0x1000 0x100>, - <0x2000 0x100>; + <0x2000 0x100>, + <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..a4672206859c --- /dev/null +++ b/scripts/dtc/dt-style-selftest/expected/dts-cont-align.dts.txt @@ -0,0 +1,8 @@ +# mode=3Dstrict +bad/dts-cont-align.dts:13: [continuation-alignment] continuation should al= ign to column 30 (to < or ") +bad/dts-cont-align.dts:14: [continuation-alignment] continuation should al= ign to column 30 (to < or ") +bad/dts-cont-align.dts:16: [continuation-alignment] continuation should al= ign to column 27 (to the value under <) +bad/dts-cont-align.dts:17: [continuation-alignment] continuation should al= ign to column 26 (to < or ") +bad/dts-cont-align.dts:18: [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 38 (to < or ") +bad/dts-cont-align.dts:21: [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..1a1c07c09a41 100644 --- a/scripts/dtc/dt-style-selftest/good/dts-cont-align.dts +++ b/scripts/dtc/dt-style-selftest/good/dts-cont-align.dts @@ -18,9 +18,12 @@ interrupt-controller@10000 { interrupts =3D <1 2 3>, <4 5 6>, <7 8 9>; - pinmux =3D < - 0x01 - 0x02 - >; + pinmux =3D <0x01 + 0x02>, + <0x03 + 0x04>; + power-domain-names =3D "foo", + "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 Fri Oct 2 09:22:00 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 AC1ED33F598 for ; Mon, 3 Aug 2026 09:03:48 +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=1785747830; cv=none; b=U/sXxh5NeR4BxztDA0kaWQdrcSSmg6jSvoJkuiMbQanOWU1CyAo88bOkxfg3nq7/bYa4ZQrgw9oFKLduNMF73+xRRKmXJ47DWkCtJ6Q7xx7sCt9SAwHRSqf9MGBSgyWsY0nBmFwAhrkkLyZrWMi49WptWb7ixiHbr4udJwdRwwA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785747830; c=relaxed/simple; bh=cBtimW4GeUT2bq8Z/kkjmsXWhphuDQBBWyDRZP70Z/Y=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=QysbblhAezcMbUwwqQCe90d82FPfadEo1A6s4Ci1srnF9pEnRYCIpUzZ397BunD/YVtmfna8hybmsbPZqw+Aj9i/Cmstt8ECLFH1Enn60FIDta+gIvWNa887SFuqPHGB6w8J+40fAPGpeNCdBxYVsKnJ3llzoXfcD+npht2PgFs= 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=elSf+vz7; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=HQmt+3Rl; 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="elSf+vz7"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="HQmt+3Rl" 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 6736S0T9051604 for ; Mon, 3 Aug 2026 09:03:47 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= 8ihYme2F+ZG8mNB7ktOuMv3VhK+M5a9w23lt4w64r+E=; b=elSf+vz7q8pfuoAL UplnHgRJ4RWSearQFxzy1fcb4PqpusiUN3la/UAhdff1nXyW8UG/im6AxUUmthz+ gW4MfL+cdj5uI7gJvc14ALMMHSCWJ5cmLnOGTngzhB/ca12AlC4SA5XZr0ybNa8l kuBZZMSpReaS8/KeD98JII8GrEYuGXTQ17Gt3JOzPZN9MPhdt0gLQ20qqawHdCjb sP9QrwOS9BqC41o2R026ER2cLQqhyyzNwZSY/x1GeXnPrir4SAY9x9pGObPUKO1Q jM50MBPae8PSzMv1T+eIY5qdkPZpzekTYg7q58QYGE3a+/vaIuXRO8jlx+ts1p+l c1HDkw== Received: from mail-qk1-f200.google.com (mail-qk1-f200.google.com [209.85.222.200]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4ftnrb8p1h-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Mon, 03 Aug 2026 09:03:47 +0000 (GMT) Received: by mail-qk1-f200.google.com with SMTP id af79cd13be357-92e8004d60eso650867885a.1 for ; Mon, 03 Aug 2026 02:03:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1785747827; x=1786352627; 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=8ihYme2F+ZG8mNB7ktOuMv3VhK+M5a9w23lt4w64r+E=; b=HQmt+3RllGUeE7vJH6OVsPQK/ElGKZhgLvXir0WdUEEZLU0jO8rBnZzefBrr5hsXRe h5/z6P5uPPvRR+mXKTxkswuaHdkCotOBbBCESRQ3MEkPoCXOb1WqqwsUOMy1oJC/T+T1 pgw+TQJIEl4K0bWSmiMXPhXADlLzvV8WtfDXJ9Im8EbU2sWOQpQK4uknVbwDzB/8dGWZ VXLi9U09u+DBC+U29P/hbxTKAqITHs4QgAX0yP7MolIsLGiNmAhXgb5VTAyL2b0OspQi KAL34/8ecdkGJs8R08A85Vn6k98uyknhEdHZaWZ8LCYXS7r0FQviboY3mg/pCbTdls8n 4h7w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1785747827; x=1786352627; 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=8ihYme2F+ZG8mNB7ktOuMv3VhK+M5a9w23lt4w64r+E=; b=TsVCRXbr2GYTgBN1gHWJKXbOT0ZWKW2AM1sE6A/N/QUvbBgEr8CBKwTmOlivq4JEIz jSCCCI35D/Y/iSLpWHNKnfD9wzszHGmB3Dr3kiDDbwda1yXVX1hRhYEYLNE0am7U/oGO KCKSanDU8VUNUT2NZhxmka+hH4Jj9yvKW/21pUnxICuVHjrYSTsd5CCARJmWSv+9cC2/ YaGrMNCcfiKfcsVFNXi42wwnZtZV4NM/FjGWL5Jo/BDxEeXh2O6CaG5hHqwnO/nHCbAe C1FewZ2WujsRC3369O/ERbia6H3ikZpx1Edmw67DADZfkjnmZmp8HQj0660n9k0EQ48Q /7hw== X-Forwarded-Encrypted: i=1; AHgh+RqGb5G04KPLCwzue0e/Z563Wh1XSd3xKzIvvv7mNCkGQBkf2Fpmg+F/H5nhWdVy4IgTYVRSi2rZtsVLrh4=@vger.kernel.org X-Gm-Message-State: AOJu0Ywd/8ah6k7quMelw1ZZZeD3DZwYKCtqwN0TNxtXNUpN6SlvEu6W jdgBuGt9z7cxboSz2iKEGB6vwMUrCZoN36ysBsDQyOPOj0ZEOhK7fRqifXBHuM16yOunAGpeI4f 21JvrIZbBH/SUnMQzHhuNMTg2XoxfLGOmjG8B6UHZUbRo2FiDhV/gWqTe39PuzAhzd/Q= X-Gm-Gg: AR+sD139/DpfJbferJt8Sf20X83H/wl51Qa0Gpff/enObmldsdi6P7n8ugJaIJ0d2VM 7vtU1GQzEd1V7BlSgNJ+q9mNyWWQIUumqR1K5F9f8D2HtXjMp73c9GpK+HiAmpcd67X04Eb1fUu TNMGALs6bm+P+I7TZamlaZJuJsApLgQHyVU1yFTbxc0cfwSlysmdO+O5/+qK7S7I6p157p2i6u5 GtWAiICd8/A8YCmWBndPvEYsKZlW6t9QVftppEgj1UW7TjJ4y3y1XAT41x9yhTy767uPkHQTH/U A6aT5r3m4z8ZlfN4jqU66w4JUIwM2rDip8T/YUM1kUhXwyhlN4YZO3RMLhqg0WhWbXyP/oO7B0V z3YT7rZZpZxSPwTIO2NTL3tNe X-Received: by 2002:a05:622a:1353:b0:526:d595:c7fa with SMTP id d75a77b69052e-52b56791b0emr183613701cf.31.1785747826619; Mon, 03 Aug 2026 02:03:46 -0700 (PDT) X-Received: by 2002:a05:622a:1353:b0:526:d595:c7fa with SMTP id d75a77b69052e-52b56791b0emr183613091cf.31.1785747826153; Mon, 03 Aug 2026 02:03:46 -0700 (PDT) Received: from [127.0.1.1] ([178.197.219.214]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-47fd456a6d7sm31858493f8f.19.2026.08.03.02.03.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Aug 2026 02:03:45 -0700 (PDT) From: Krzysztof Kozlowski Date: Mon, 03 Aug 2026 11:03:10 +0200 Subject: [PATCH v3 07/11] 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: <20260803-n-dts-style-checker-continued-v3-7-6c9776928cea@oss.qualcomm.com> References: <20260803-n-dts-style-checker-continued-v3-0-6c9776928cea@oss.qualcomm.com> In-Reply-To: <20260803-n-dts-style-checker-continued-v3-0-6c9776928cea@oss.qualcomm.com> To: Rob Herring , Saravana Kannan , Test User , Krzysztof Kozlowski , Conor Dooley Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Krzysztof Kozlowski X-Mailer: b4 0.15.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=3656; i=krzysztof.kozlowski@oss.qualcomm.com; h=from:subject:message-id; bh=cBtimW4GeUT2bq8Z/kkjmsXWhphuDQBBWyDRZP70Z/Y=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBqcFlbI0eGsvqlDNd2OqQ2r7x7k/qx4sagRzV6W UD0rR6tKtiJAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCanBZWwAKCRDBN2bmhouD 18EUEACTZoExoN5OcQfd4ZGWV7WjkxqezN8p9B9lftgb4iRcKUWQc3O4UU2Ciy54iaJBF7nfYOj O9zX6QcTwI4IXAFcHPAxddjj/te7k//lJb+2WXNAI3I0VCvG2/++3FfpdGNpTfNLKgyD2WJ3gRC 6DQfzMBEFrCJwgAztQX0RJCOP11HY8X2KSbaZNTvJhNVk4LvLOva+GEM6Jp2Wn5yqseLRDeGDCc wn5nWdG98UD3+QrSPO/QJjTjB4Ak0+g9SliXy2JiFAJB22dOc5prcZB4kKqP7832wtKeGRqSoW2 xriZ4yleh5eua8sK3ZAttRdXufDehwx9E+irBjtDQ6ERWf69ytdVvwJWsySnx9HBLnK5aZEYYYT 4Po1o+BrKZ6+C6RvXMVBdoBlvBb6V/gy/zp4jsp9gHtwtdJdxgfyhn5K/LGVi8ISy2cigGrwV5P U3FSpmElrTVc9wVmhkhZPJj4CY/TvVBHsIOr3BPNGnKb29lxkp+AHaAlIndMOXS4b3MeB8iQhE+ ZF6r63S3QnZ38JAPM90mZAY+ohZ+KBl5/aqNxwPo60zVR7YxoOVR0lGutjjkQdC8Reb8kpARX1C yqImVrgPXtxsW/+LKXQflAjylsHKSKebQPfgdweaw1eIYD1dZ/t5z2NNprhc4Gsd4mQ/hIL+aro HpkGhALQSqnFNJw== X-Developer-Key: i=krzysztof.kozlowski@oss.qualcomm.com; a=openpgp; fpr=9BD07E0E0C51F8D59677B7541B93437D3B41629B X-Proofpoint-Spam-Info: AW1haW4tMjYwODAzMDA4MCBTYWx0ZWRfXxyG8Eyck9/Do NhNiCmQwUTOM5ZSzbWfxEWEn+d8CTG+Xb8oc2B5Tdx3/SoAJlVM+taB7T4jeE1npgYANo3i9lLY ZUW3iO6fCeyYh9f2IxUti9VoiArCMGg= X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwODAzMDA4MCBTYWx0ZWRfX5GsXG1GcJTcz /MwV2SttI+/JXPADMelVXKDCUdysarkxGk0oyqL1YZtMzFp02Mn40dfvoObQnJEEI3PdJoONs9R eQ6o3MVHXjTFonAkbaYqFzQF9WgVwM0spY+b/bXUJNSTibtMeFqJRHq2aus40f1pqenMHSYj5Sc BXBauiJ+BYL3E1znIXhcFK7Sx2Ae/qmG6XQQU6JFz9rdHos3Tg4h1HEJFYDWJr+2AOd0xHSXh2i ZcyCwQDl+452ixsX3+N7qXJ5xpoPejwVZ3HB/BljXU4fKeYf+11pkYReFTrZ2uTvOGj65aqmdFC +k5OPaRNi4weExZBA+vAvpi5OL+wr5U/40ry/bKInTft7SJWAmPZZ5LAGxb8Mwvr4Se6LeYXJYi H+EvIw7YDYJEYMn3DXIvZUMbdQAneKu5elFT/bLAA3RNCcGOv0BHFImdiGPyIf/mtSeKE9GmkZ+ 8eIEPUQgDnJO9JQDkTA== X-Authority-Analysis: v=2.4 cv=RNSD2Yi+ c=1 sm=1 tr=0 ts=6a705973 cx=c_pps a=hnmNkyzTK/kJ09Xio7VxxA==: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=6JaV1sFd9OF9Hac_-DgA:9 a=QEXdDO2ut3YA:10 a=PEH46H7Ffwr30OY-TuGO:22 X-Proofpoint-GUID: n9GeEb2ohtqTs5Tup6vvmN4D73SDvqba X-Proofpoint-ORIG-GUID: n9GeEb2ohtqTs5Tup6vvmN4D73SDvqba X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.134,FMLib:17.12.100.49 definitions=2026-08-02_06,2026-07-30_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=0 clxscore=1015 adultscore=0 lowpriorityscore=0 malwarescore=0 phishscore=0 impostorscore=0 priorityscore=1501 bulkscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606150000 definitions=main-2608030080 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 1c67348fb526..e3adaad1be63 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' @@ -1069,14 +1069,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 @@ -1086,12 +1086,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): @@ -1148,7 +1148,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' @@ -1168,17 +1168,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 Fri Oct 2 09:22:00 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 5F0783B9D83 for ; Mon, 3 Aug 2026 09:03:51 +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=1785747833; cv=none; b=SJhqdLJTbUt6MQ834adPDsBT9czFiw9MJVAtJtoU8oBMOXLMc/q84RN9F6GZdehbrmGlcQUWWntEz2R6YNU1EjWtvk0dALTBE3AtuMS2KkbMrKyVqPU0kHv0DdjmCx2Wyy/0Wlg4Vb9CxDv/fv7QFi6Jhh6+vCsCzv86FSSB50Q= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785747833; c=relaxed/simple; bh=CzfpFIb56BTA1MD8PYGLw3B1Wg3oKe6z9y1NI0KLVxY=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=UYnSO3CYSJB8QeBPqTY3bNo4b3cFKG5a43IXh6qEwkJ2fjDbUsPAG1z6z6UQ0gfsMcxedk3OgYCWuh4QeTUzrPgp/FLXH4AsQ1VmyQwXaZ8soqtmGeKMB/fTB+/xRKG83oN4FZkgaAkzoizIFa+rMgBTZ4OXoobODhkUSxSh5w0= 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=LW81/z5n; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=TrXHbGSo; 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="LW81/z5n"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="TrXHbGSo" 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 6736F4m5005963 for ; Mon, 3 Aug 2026 09:03:50 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= ifxXees6xj2l++WoYb81ui9QOjZbwC21AyE9dOKo02w=; b=LW81/z5n78ykEscV zrgRnLG/NW+ez4MPGRAwLPP+CZnnbtrw9FfgBxGGiPCMQJxj/rD3j7DirWnpP+v2 YPrP64ihJJdIAWXDyAZ2ZtrRXheyRARAtdYrrRq4sdzcVf3F12J8h3cqprtumGzr Hx5iOhHceR3pWuemDsU3kmco4ttjFYUoa6evII6OrgM10MQzWU0h/x2mT7sPhKaJ UQfOufwrOIJcC6bbbecPNiRFUIt1l2h+fgqfyABulrvPB6s1cXq1ayBw2Uqs3Tu9 +tYMnclCsqgtwXlMviC0lMoAogypk8BCc5rSA4Jkt7eD7AQZovPu4wa/1bhc0iHR Uiq29A== Received: from mail-qv1-f72.google.com (mail-qv1-f72.google.com [209.85.219.72]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4ftnj78q41-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Mon, 03 Aug 2026 09:03:50 +0000 (GMT) Received: by mail-qv1-f72.google.com with SMTP id 6a1803df08f44-8efad04d884so67975146d6.0 for ; Mon, 03 Aug 2026 02:03:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1785747830; x=1786352630; 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=ifxXees6xj2l++WoYb81ui9QOjZbwC21AyE9dOKo02w=; b=TrXHbGSoOTtzeTrtsvmEY2Wypy8j97zPkxPtSV1huveReUNLLHepzQBYpdcoHRBFcv NZIgb01hsCKQq0YpE98kmLyrhwONrs0yEwnd7pnmC4nSHh6b3qa8NmZ6jGizYZA9Syak HrushIAggZP4q4jlmXQU7JuGuNXoIXJvudER5fHK96h6yTmeojGQ+Vj3xhkE1ERtWIqk /iLmg2D849FEVVMhuQ9m5qq1aPWCOxbdTQIwFj5Bq0vqErIF8fc1m/XoKthkuF2TPAZY uBqrzaRXfuvogWS/bfqvKoW3bc+IK2zk15xaDhaHJzdZVAzIveTDuZlGvBcPs92tSuYu xAJA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1785747830; x=1786352630; 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=ifxXees6xj2l++WoYb81ui9QOjZbwC21AyE9dOKo02w=; b=dSHoHD+KoBdUfTLBAw0czeszu/nfT68G3sc8HmcjfxEZ9otui7DP6THneuopCp49QQ bAXD/QnoS5ra7HPVosyQUhQE9fqdUbh2C8AId+IOVv24F/v+6KUUBWr34/gu96hVqwvk /6z3BV289SbzMhYCsZzKH1/7rO2HRyAspeB9HnuckSHbR1SiPIJ9TD4m7yWdg8NpYgkQ xenjUO0G2z8FRDRZmaOr5An33UqQGwwisMXzl2mTrZF81n4jnYeBzYAWJPnZtradIUsP f+ATnX8lrVxe18ZBavw3npgc3mwsKpKTyLAe0AWJ+0oTPhnEzZkndSW+F0+oTlfJBaL7 EYAw== X-Forwarded-Encrypted: i=1; AHgh+RoyO9XmkiH7z3QPyhbS9cWvfADqel0ofcZlNUuts5z8h01yGi2PkTYrBX0vPtsufWqGurMM9sISYy7G9Fg=@vger.kernel.org X-Gm-Message-State: AOJu0Yx5AW/DUsH37/X+j1jrtLcJh+6bg1brXb+sSU9GJVAk0X+WdYgz xnhXFTqRTWEZ1X5cqjhOxWq3NuZVeJPdzmFBGUJ5GaHdDjPuUcZmJDOckVkyjSCD9NDEC/G7hPi E8m1cHox33fpz2Sn2Nqe5SlO3Xc/xYFRM4SxtUjZEnV8+XKQgPz2+O+BNIGtdyTipeE8= X-Gm-Gg: AR+sD13PYf8dxq4x87E+jeljhcLwxwvEGMgUD4UCyYBamjyuYAzArj6RLWpfwYNg2/M xfKW7vYfQQHwqSeiC2Gg10vvMsVxsj1UQWp1YULovHEeB6JSXLGep0DyqZIWQ8HBFcrO8aFZEjG 1Yn6nt4CylxD+g07RLPHiGFXiI32LhoPHZDxWdIQkjjhSj290PROVa2Dby2IRr7VDKCYFuYz1Gb EZ38CyaLkZIzltHJtyJbyCA844KosBtEF4aYEsiKhqEwtBk/RkHUD2YfUp4aFW88UWjpI6yY3zR pSS8nt4tT0fvfqVhi1zvF/nKfvWUd7K+2068Fswi0Lp2y1t09OGbT0iDgV1Gn1jYow47yBK4VTg bn776irCl0CJxhbt9FIGDkLlg X-Received: by 2002:a05:622a:1cca:b0:528:3b5a:67c2 with SMTP id d75a77b69052e-52b5666d931mr185586031cf.1.1785747829531; Mon, 03 Aug 2026 02:03:49 -0700 (PDT) X-Received: by 2002:a05:622a:1cca:b0:528:3b5a:67c2 with SMTP id d75a77b69052e-52b5666d931mr185585251cf.1.1785747828941; Mon, 03 Aug 2026 02:03:48 -0700 (PDT) Received: from [127.0.1.1] ([178.197.219.214]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-47fd456a6d7sm31858493f8f.19.2026.08.03.02.03.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Aug 2026 02:03:47 -0700 (PDT) From: Krzysztof Kozlowski Date: Mon, 03 Aug 2026 11:03:11 +0200 Subject: [PATCH v3 08/11] 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: <20260803-n-dts-style-checker-continued-v3-8-6c9776928cea@oss.qualcomm.com> References: <20260803-n-dts-style-checker-continued-v3-0-6c9776928cea@oss.qualcomm.com> In-Reply-To: <20260803-n-dts-style-checker-continued-v3-0-6c9776928cea@oss.qualcomm.com> To: Rob Herring , Saravana Kannan , Test User , Krzysztof Kozlowski , Conor Dooley Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Krzysztof Kozlowski X-Mailer: b4 0.15.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=7464; i=krzysztof.kozlowski@oss.qualcomm.com; h=from:subject:message-id; bh=CzfpFIb56BTA1MD8PYGLw3B1Wg3oKe6z9y1NI0KLVxY=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBqcFlctvOKe86dSS7TbLN7Je+5UfpJk1YmhEU+e QkWEqZaZu2JAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCanBZXAAKCRDBN2bmhouD 1wX4EACEW3B+xq8hmtx6/2VdoFSeEEUoxx/VYUF+AgcmyKYf/YBRlSghenEo/QZNM9arDa4uw8x LbslnTGBqSSbiNFv8MSdaqclC9dG2gZkD+Q+wyVCtbzMYS4krbKXyFkT+4VnzG9NzMMWzMehW36 lXvQ78IItW0rMeVaWfPKe1vcPd/WsLQBSB1q5kY6h4U0CysSkQbv9GHxW+EC2m5QntZjHDQ26w6 daM/3g3YNyfkY0rNnvfeHAKWnMDx32GLuMzRDym4TBsL/Gy9e58SeP2ibvjUHu1lsTzOaZLO7OI ov3m+V4Nk9x9DJYqOCd8cRZJ6m19qSmOrMN6kU+Cwk0NQuOULQEbl7MGeH1zBvPrKc9ogrfYZm8 zCsmmGQs7Y7SMc/mLA3ZgB9H42KasfDp+jgVH0Iso4NwbMWa3QvNcoD5qL1cBC+VXGqzwVKVFyX /JzzXczWA2gmnENbeR7JSweB0tZdBawu3BcV8NtdaC977lGWTXMNgO1pWDQIbBRwebHUApIKnzt dhP9KEc7CLgX5eQbpN19VjbhjgB5W99gAlq16SIW69wwVtVoGm/AOlvSBkvYpEuNQJkj5QfPj8X e3jjKae7jSMccJ9jC5pxzGMDn5T+eHU9kmhhVRrtPaRmF+MiX39FervgcrKXFiafkv8CFkO1ML8 /WSChdATdIA0BpA== X-Developer-Key: i=krzysztof.kozlowski@oss.qualcomm.com; a=openpgp; fpr=9BD07E0E0C51F8D59677B7541B93437D3B41629B X-Proofpoint-ORIG-GUID: 6ysm0K1WDnSWqFJTSzV20cbaQ2ML57N9 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwODAzMDA4MCBTYWx0ZWRfX3mNy1QDZ/JdV DCEt6IZ+nMCdAmP9rEzuqZTDclf6XxF75mE1toayGLaV9hy8qWRiSdM96DrC+A7pFHft2YbZ52j iVpKW5PJA4BLI4HmGRrcvUXQjEnVpDp9t8H5MJmExCO8gDHGIAMghpv7wqGz28fjnaObCjjNF7p 4EZ88Abyl+T+buLmEwNeDy2BrrY0zayrxDZNrl1dlp+FFWJzj0DTfiQnxIKxU2tUrekFkcj0yDk 7T+4UarZjmdEiLWWqR661+FI0wEUtWeYAVMFaVwDRkRBnqHnNaQeIw6F99T7Q86A3mTD9WzLuzN fqKHVjfQoetG7lu/w6Lls6ouAnvzeJ/DTo/OnHPATTqqOHJuCrPwxXiWReb4rub6ipt8mVkZeZV 9Y9xT1NreIwh/jt8QD9JOnFGVRlL02MUgAdp9HSxHTP8gVHMtgpe+2o+3GHdJhm1HhN9Spe8ZGV I8kWLUNKNZ8Ucg2z5oA== X-Proofpoint-GUID: 6ysm0K1WDnSWqFJTSzV20cbaQ2ML57N9 X-Authority-Analysis: v=2.4 cv=PqSjqQM3 c=1 sm=1 tr=0 ts=6a705976 cx=c_pps a=7E5Bxpl4vBhpaufnMqZlrw==: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=WUDqnpqoxdndseS9DjUA:9 a=QEXdDO2ut3YA:10 a=pJ04lnu7RYOZP9TFuWaZ:22 X-Proofpoint-Spam-Info: AW1haW4tMjYwODAzMDA4MCBTYWx0ZWRfX3PlD1gbbpejN vZw22Mfc0U9w8Fqoof+93Ua8a7NQDgAVUZVH55q/44E8RFQsMfz1dlyHm1EcJ18mA26e0Kmj6QQ rFHAFjoD10sylJxPSBCGMOWGu6qR9JU= X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.134,FMLib:17.12.100.49 definitions=2026-08-02_06,2026-07-30_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 phishscore=0 spamscore=0 priorityscore=1501 adultscore=0 clxscore=1015 impostorscore=0 suspectscore=0 bulkscore=0 malwarescore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606150000 definitions=main-2608030080 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 e3adaad1be63..1430c675bd95 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 @@ -1058,20 +1060,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 "\\""', 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]: @@ -1199,7 +1208,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 Fri Oct 2 09:22:00 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 4AF5F3B9DBB for ; Mon, 3 Aug 2026 09:03:53 +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=1785747836; cv=none; b=TFchu7S6ZIuYO0DUY7iF+kzCcXP2WOl7YMRwQieFt4cjJ762Dl6GMR4oW2Vs85TWL5Mt7dRa3doth4eu6jTrRcNlzzhSm9smfEI1yMbnWuT3lfG78eabi1yNOxxqE4OhfATiHTIyEVd5Q912GayBJyco/WKTWsA9FyQXvBbUS90= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785747836; c=relaxed/simple; bh=+2ROCb6kqVvx17mUmZm+JMrsgCHyyS4gQ9bjeReqjas=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=Ti22XQkiNNSsazzicsSFZEk+KM/Vig9SicD2iuAlRDmhlobEtU6TYYHIwPQWSxAyKYDIE/c01c4Ok3Kr8IssT5wqueL5lVZ+nUEVovHqAteAOezDdRL5EJ2d7k+XkkjoOPbBGeWTPz3MtAJpABCzNALvbYvYH5ujpTHUAjHo2fg= 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=m62+xJNL; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=WUZwMCft; 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="m62+xJNL"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="WUZwMCft" 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 6736TJ2D4015800 for ; Mon, 3 Aug 2026 09:03:52 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=m62+xJNL5T5bRnM3 usoFldlEBoPKV7hqAaUXtow9nZ3lYXrY+49HPqbP8w92hJfDBJId6KdGGls4AhkD yCSMRaYu1u0eUWADsfXhQTi89uFJaenOU9FaJoX/hw7GQAaDOsZd2ykEbAYJnxs5 Ve2zlUOcfpgKDlALx+5WKsiE1yc3UChK9VsWtQjGBeaaklKyGugULSI/E2vjPp66 YL/s5TKU66SC4Ihc1jk7VTchlfRVYN2Z4k2WResebU/pbRV0ylRicpKMSAfNP28X W9mAQgo7lWo/68jQsGvQDsUDqTnPTllweDiD4suy3yur3VtoxyajoHZyd1Ci72wE Qg7ETw== 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 4ftnrt8p54-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Mon, 03 Aug 2026 09:03:52 +0000 (GMT) Received: by mail-qt1-f200.google.com with SMTP id d75a77b69052e-51c12e43b98so31681991cf.1 for ; Mon, 03 Aug 2026 02:03:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1785747831; x=1786352631; 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=WUZwMCft9Bfsq3/bXFSDirIZcftCWOED1vmaY6UBXv+H41eo35x+4IkMnWZXREKxSa 1KiahKR8wvyBBpIVLGsHSF5odiBRo2EKuzsiiesVTrq2xPOpk+8+6aOagZUqNzkO2iU1 KyMGfE6ivZ1mY8k3HoCbMJ7skZ1n6sngRnjkOViWDgBF8iZEyqPAmvhN/BPVB8lP11HO mkNvcaMMOVrM8o/F9zanKQgWsHqHPowvnSCRdzuAJUenCO4GcI+wRu/72NHQ2Z4zoCl+ 82UnPd7IGk0tZeSrmWoP8JjQkjU6q8OVdKgJKZYPIR9g8OhVfVsaSJ+bHqBNT+vc/heO u7QQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1785747832; x=1786352632; 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=Mog8aO6VsSUYn38FI4wL+nxub9BHlEV6qGLVlkCG9wlBjjTsnhSv+7TX3/DbOoSTnA mxwkvBoLl8TKvKMP+CkVpCpC44AHkMutJR39lgoe45JzBxfSZFskY8/XV/rpmo2qcqFC CipJWMJ6YP42Af0JovRfkCwocVAscWGGxsG7qhsXAY43Oa3dfc0n+6SLQquZDuebywj6 p3TV1xl184Zkj0x7179mE/pZEIxEtZrcBkABpcxZJkyBr24bvMTyQi75rfamR1MMDAap 2ToHm5VB4rYyYT82e0Ejgk2mOz4xOWlDmSiyHcJtKVEmRZ9hFkWTeiQnkgzX45B4PkVx j5Nw== X-Forwarded-Encrypted: i=1; AHgh+RoZSpM3WAsrq4ogOpinJZ85O/d45Cxrfks+lElh3VsveXyO4QgzfUgMSolS28mFF+fKjJ26PcCo/wxBcHI=@vger.kernel.org X-Gm-Message-State: AOJu0YzMq/Q3khi54YTy5r0mQjjaQmxfz4pHCXIFBV9rA1gw7vHI/fYS NIdcRyLNWsYGujN0TWFAdIQe0UBsZegBkZ60ToXR5vJ1STjI6BV+mChpJa/9XyH4KyvTKrAQcOi i6W1RY2Yvf7dZXSIRAX+d6oWFRPzcbp3kcn5i6DLkyZzP9CNu9O/tVzxGDX2WCPBJeaE= X-Gm-Gg: AR+sD12ceEyc3vVM09fYeKI8qvZL0xquWp1z/xQO7k1uQnIOTz3iN33JSIyIlUI3Cum A/f+84jyGcnV843rgBBS5utAY3UIw3QMOvsMOG7EVEK6EkNJv89Z02/PwTTu8Vl7Mkzn54GAqfk JLkv6huzO5J5PKk0b0mqCh8BCOQ3IzkWcU78/K9TeNWYOhJjxwWY8EPZZsVQg07w+tGC6IsIPDe aftPIlYHXrd0D7K75awQf+ou0m9Pk2Ma8nWmskCeBxxvKk5NlDrJLlDLjX2zhP+UqwhVm4gvVHG 7bQ4AKSwkF+2WN+aGqQGQlvgEDdIn6AsY580Dh69oeL9YzPq4ZtQ5u6q03jRty3Ruu9H/Y/5ilg 55bZqG2s2xPxxHdfMr2qS/5qh X-Received: by 2002:a05:622a:40c6:b0:51c:1f97:e852 with SMTP id d75a77b69052e-52b5675e4e9mr189006541cf.6.1785747831584; Mon, 03 Aug 2026 02:03:51 -0700 (PDT) X-Received: by 2002:a05:622a:40c6:b0:51c:1f97:e852 with SMTP id d75a77b69052e-52b5675e4e9mr189005981cf.6.1785747831020; Mon, 03 Aug 2026 02:03:51 -0700 (PDT) Received: from [127.0.1.1] ([178.197.219.214]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-47fd456a6d7sm31858493f8f.19.2026.08.03.02.03.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Aug 2026 02:03:49 -0700 (PDT) From: Krzysztof Kozlowski Date: Mon, 03 Aug 2026 11:03:12 +0200 Subject: [PATCH v3 09/11] 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: <20260803-n-dts-style-checker-continued-v3-9-6c9776928cea@oss.qualcomm.com> References: <20260803-n-dts-style-checker-continued-v3-0-6c9776928cea@oss.qualcomm.com> In-Reply-To: <20260803-n-dts-style-checker-continued-v3-0-6c9776928cea@oss.qualcomm.com> To: Rob Herring , Saravana Kannan , Test User , Krzysztof Kozlowski , Conor Dooley Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Krzysztof Kozlowski X-Mailer: b4 0.15.2 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/ZANAwAKAcE3ZuaGi4PXAcsmYgBqcFldtQyprT9erdnU3RSaJWqbDiQIs9r5kTd+5 D4AX4f970aJAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCanBZXQAKCRDBN2bmhouD 1zz5D/0XGNivz4p5Pp6OHSNssAdvArdqq+EXzlVY5dYRsnYTF5OY9DK0/ChrdNhhE2FvdA8qFLI DhjOxDxpuqObj1mNtuQBR+wHl3ylJ50sOCmAPSYN0m8SKsHLFIMeYJ+bMiOn3rG4NmyB33nZdfy bjTiEGxbRKyClA7NBUccTjvDaCvOWUlxAOTvMsb0d599toYMq68gvTPz1+ARjkmznv0Mnx/9gWj erU2FSvefnLlTPQe+awz1rpnlBVbALm2Yg9cavd2fJ/QGIIlyiBujr4123wHX8K7qdJN3sVt3iZ QLtk/vo4586sq4rHkniN1pjr0oVgsept5m9LcOUcblnIADszMDsyNAD1TNUGkz0Cfq0BIo9GtSV WixMhtTl3fbWJuwHzXwCFiwGYHnK9ooc4Yt4xjHBy/Rqsw9xlg30sn0lCd0y1rkcrG9Hc5zQ47g Ne8U4dvujCHTQOTLcPQWKjcYtirn3Ola/XNGzVXqPxQWTNDcsbnOvbQpdmwC60pzz8UGslRTV6H Uv2SE5qXpgF8DDm9p4WxexhN3ZWwC1oII/RoYMou429dM7XupqMsLVKJM2Y4x0bSidiU/jL5Bpe lT7YxG/AA6i9BpyPL9ZvuYyUDOJYKegt4WN9VLGzGauAakUKL/Tw+u4SWo46duQiU4ua5/KWgWu 0N1edsB7vjUx6Cw== X-Developer-Key: i=krzysztof.kozlowski@oss.qualcomm.com; a=openpgp; fpr=9BD07E0E0C51F8D59677B7541B93437D3B41629B X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwODAzMDA4MCBTYWx0ZWRfX+TkHHSZ7AeMm GtdOdeV9e+7QPX9CFnjJPp0XGlxA2XNM4i+mmIzkelUV/wh1J2dVw75/KmgdJfTmVGl23fPHndT T4mPRgcwhNap2L2sTP7Vy5p4KwfGSp1f5o7WIfFYh+Dem37SiGZrW1YeuP0sgV+KAInC922Oftm RkDYfUFm8qGP+sVrR5bfT5kB7J0wSI8ABkrynQsp0vDHbrYSJcls2hHQVlRQ6kot/BtmF2f6kJI ZL6mS/WvmlE4E7JNb6N4Ev64ZV15tvohJ/dsF//6f1RCy+7I60WMovlrSvshJwZYBAvvCyBtGn0 V+vdP5dLmzbj2H1QpEmAthfiVOmvRm+BqtClOrpBj1ekKzv7DpcICW752UpUy+HsPvXtzhHdiPz QjDquZADTRvWaOUHRvwCFk/5XvcIA7KujDSnPxq1kWtrHlaFpyhwPEEc5yzYPQRtdeRaY+tA+mV cAZx78IsY5XM1wN07gA== X-Proofpoint-GUID: gdJ2Mq1pLdjzWxnMfBZiQfs_fTGWBwIL X-Proofpoint-ORIG-GUID: gdJ2Mq1pLdjzWxnMfBZiQfs_fTGWBwIL X-Proofpoint-Spam-Info: AW1haW4tMjYwODAzMDA4MCBTYWx0ZWRfX2twaMeWGpXEh HCGQuiVeA5YLpUoDO9OuftS2IVQBoS0KJAW99H7I/lfSmMzu44KjAeo5x7iSw6icn5+4KIHF6zv rm0Mdc3ikpR2kS3ToREhQFZF81vX05Q= X-Authority-Analysis: v=2.4 cv=Ft81OWrq c=1 sm=1 tr=0 ts=6a705978 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=gowsoOTTUOVcmtlkKump:22 a=EUspDBNiAAAA:8 a=ZteHwOODggqzs_94cHsA:9 a=QEXdDO2ut3YA:10 a=uxP6HrT_eTzRwkO_Te1X:22 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.134,FMLib:17.12.100.49 definitions=2026-08-02_06,2026-07-30_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 impostorscore=0 lowpriorityscore=0 clxscore=1015 adultscore=0 phishscore=0 bulkscore=0 suspectscore=0 priorityscore=1501 spamscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606150000 definitions=main-2608030080 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 Fri Oct 2 09:22:00 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 84FC63B9952 for ; Mon, 3 Aug 2026 09:03:55 +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=1785747840; cv=none; b=GNF65iD56IAszVlMIOEi2o+J4dvZSYcwLg9Wp+bxxiFEYAqJR0gPOBIrExXEQier/J43qxwuD4ZxodZcz1uhBva/T607cUEkpX8cUdyhjlHgHPNq/4v/EPVVln01O6IOcfQiXsoG3Wat+f8TClLlvHnc+AggtjdtftUxsck4ygw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785747840; c=relaxed/simple; bh=5pm6xzgUJ4vy77QgEXHHe3Jllkf2jPPDEFKrevn1v18=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=bGz/rJ2MlIYiIx5tAaddpdXVDlR9vnEUq4WHBasBRhoLbWcQtVJYLCrwNJowvkFp1AJvNeqR+JcWMA6ov/+OYKG3TZO6GOSzmuq0pw8xjo1gYyYCN050vzFNcRZ9EIn3OWJWeeNf7DWCQ6eV8DF5ggboy670JTIaleRhXBZb0wk= 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=oqE0AGb/; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=JvQmhe9K; 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="oqE0AGb/"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="JvQmhe9K" 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 6736TJms4015797 for ; Mon, 3 Aug 2026 09:03:54 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= PQmM6UluGtuGgi1cUWf9fwarKMZSjE5W8/dc/SKc2p0=; b=oqE0AGb/OI0U9EcX N4UhlexbJrmuhyE5cvJMAJ2YThCxdoXmrBcaWQLwe8lHa2XirOstgPBkd3jHlmil T1sX6t2b7i5TsDZ6swDQoEUWQ9JbWMWOlHcxEBGen6AJHoo1yIpcX812T/xpMCGI YgKr5yd3tQorejB9bRKoHdba+ELjL4yhdztRDBR4zs+oUx2in3qui2S+A0lGiGvo jPaIrW0f0S10kFjijNVmsLdtKeEjAVEKJ6K4qhqLqnG5TseLCL2rxGDaqoO/siio ALeaAMIge8hm9htPr4h96BGcUSR6lqIDF7yXY8j8m1SGU1LQaTiU6uoHqX2PJIpE n2qmHA== 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 4ftnrt8p5c-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Mon, 03 Aug 2026 09:03:54 +0000 (GMT) Received: by mail-qt1-f199.google.com with SMTP id d75a77b69052e-5283fa0656dso47261211cf.1 for ; Mon, 03 Aug 2026 02:03:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1785747834; x=1786352634; 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=PQmM6UluGtuGgi1cUWf9fwarKMZSjE5W8/dc/SKc2p0=; b=JvQmhe9Kn8e+G9eQfI00FOizllBTMTzbOXS9t/Gylv30Yj29kM3EX1AYa0B2sa1b2Y FfWReDo11ac3tR6aq5EXHoQCH0Z0rCAXVclx9SPcM6GcVYOwuOWM5ucoQINHBE0smXTw UtR7y29wx2rjFfZ2WkOzzWMIWcm0vv6CNhVQBbTC7H0hSAv+o4VFJtE3gMWlUcyBksF0 YeDU1jRhdSEJlpJGxgqIFvQz6df1Q4fQPNZMLCvHEX5wQTUBAL8EXRndcICtB1bYTAZo 69D8okfQOF8lSPs5W708rm+HA148sxpQXZne3UPT9e7v2avaGyxbih0MCERGEkmRNzAF K+dQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1785747834; x=1786352634; 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=PQmM6UluGtuGgi1cUWf9fwarKMZSjE5W8/dc/SKc2p0=; b=kr8IYpQnusLpR1HJoXWZCcPkjlOoUG8SRhh3q+OYNVaNoBEQD0LmGRcIBYUfX2s7mK nDEJpcJpfY6p61QK9wREKLy0BQfwK3F22PFk22M/82wRKNslxXitf7baA5CC3W/u3+nm A00OLMDtyUUdczKNV9XyquHK/GomVEwUzECcNiPtBB7ZBEW5g1Uhw86yPaQHdyEtOKLf yERPLMjPvEQVW/NWHyMWPT075P35+e4dd8iOtIrh/+JO6oxumLPM9WIBSAWDH+/LC9Vs aIKsqztF2QhCLP9fAtKc588frXETgK6wAu5NzH3td9sm1fXyBVcrCnBjaPc2j5asNW+u 5hwA== X-Forwarded-Encrypted: i=1; AHgh+RpQyeaR5sDRUVGF31BEC2a26n5Z0zdx4B/yOlSwYLMpDqcpYBfu621M+voHpRBDvb49UsnWtRd9LIfuayo=@vger.kernel.org X-Gm-Message-State: AOJu0YxJME+LUmr4kZ/+wcIxtqfUULD4TiPGatfpsRafy8TGkuiqEsOV GooZbob3egLtZJkWF8xaa8tzbqbEeOP8+GA6HrhwWQLo1XnLLcrIFfk/J/k5AvtBG9gnYskrsi6 y7nWZMw/LL3qVfdGdjVxtdX1YhtHR96mR1w7wZ4Uacs8s7I4ALeBgbdKDQi3l0Pfn0zQ= X-Gm-Gg: AR+sD103fBbek9bhKAn4LjmcRzmKdbc4xsN6pPY6vCFBJma2DvxJcBkpfmo5b6G8KUk T53QufLQ3z3j3wYx5nR8cwF/F/GEBv+8DWLiW7atmnDvW6B4SlnhgJUKmn0ULsm39X06b8Vil0f Y8rb7g8I2UjXCoRx4vu207k4Eg2A7jCifvuPDa1X1NGzDTFe+YpldLRWwyJEP+ePDUflFsgccne UB4Mzapv4RqJ2Lo+7wsjtInYR8GLxWLd6xS/qVwg5Vxg3jNBXrbQZI7HMKEWB1lbo3QBDF8a1c3 ml/CE0bzKF6W2v7nehHvG96UzgBbMveJb2USkpn/r7SwY5O6RVJ27y3qUT9hiIhH291nA9TG9r9 HuHxdKLDfNOzjGp9SLuFi6W9M X-Received: by 2002:a05:622a:1f14:b0:51c:b91a:33f9 with SMTP id d75a77b69052e-52b4c58754fmr200540221cf.13.1785747833541; Mon, 03 Aug 2026 02:03:53 -0700 (PDT) X-Received: by 2002:a05:622a:1f14:b0:51c:b91a:33f9 with SMTP id d75a77b69052e-52b4c58754fmr200539781cf.13.1785747833064; Mon, 03 Aug 2026 02:03:53 -0700 (PDT) Received: from [127.0.1.1] ([178.197.219.214]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-47fd456a6d7sm31858493f8f.19.2026.08.03.02.03.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Aug 2026 02:03:52 -0700 (PDT) From: Krzysztof Kozlowski Date: Mon, 03 Aug 2026 11:03:13 +0200 Subject: [PATCH v3 10/11] 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: <20260803-n-dts-style-checker-continued-v3-10-6c9776928cea@oss.qualcomm.com> References: <20260803-n-dts-style-checker-continued-v3-0-6c9776928cea@oss.qualcomm.com> In-Reply-To: <20260803-n-dts-style-checker-continued-v3-0-6c9776928cea@oss.qualcomm.com> To: Rob Herring , Saravana Kannan , Test User , Krzysztof Kozlowski , Conor Dooley Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Krzysztof Kozlowski X-Mailer: b4 0.15.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=10971; i=krzysztof.kozlowski@oss.qualcomm.com; h=from:subject:message-id; bh=5pm6xzgUJ4vy77QgEXHHe3Jllkf2jPPDEFKrevn1v18=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBqcFleZOMmAPd1FQW7RCcFIoL8FRU3wzfkObPfQ VuqkC5naHaJAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCanBZXgAKCRDBN2bmhouD 11uTEACCWNDShxE8BFGpTUIAHIgnc3Ws/4+ObDm6mt7jIycSEgJheyrwWteRs1NL+4tCA/5j0Gs dwNVlsmm9UouN/La2sxGCD1VUbUHy90nmXM0uBMsqHyuSiEntfqVZsMX/SMUcXoM9HytWiaChjc 4+56jhgfM2nvne0ro/eLXFhhNYjKjXaR1nvf8dB6FNf7eXYhcbiAI2mxPuw5WB0TUgQ1ODSPH4O N2OECuPPN3Ka4beS7GgJc4JacpdHEj8x4PX+x1THyfThYrfUzVp0BFAh0vn4jqYjectJL8OzBJw bzfCPAahORAuF3Uqba5X17bzE4kbgg/MjZmHw2U2+WEPTNTtfl9YoiRg9ZUOS94B2TxpxsNeWpR B+/8jLFXSsAazWeWAIMvKxfRlOmOi1JDXijxavL6vbcoMokA0M2f3sDNkWgg7p+JbdPx8+meZ5q A9QnEz8m9gwmmXLZVFWPafUpmguiyA+UDwKWjNtIxmR8YgqN8JAc0HpQEpaqREeAvNyKrvBrmaK lfhwgFbWNNQvao/96rf3kio8MkMZEDgd9CmktzpDRqGffkEPzp/NFtt5enn3o7i0aMYO3B5sk1Z dmah9BKxwRjsgIZrpmaAvDLDE4HKwqPOZzIAX5N9kwySVvWfqCZKg9aNQ3QPNOXUhiLTYYV4qX5 QvQ9kz7/1S7/dTA== X-Developer-Key: i=krzysztof.kozlowski@oss.qualcomm.com; a=openpgp; fpr=9BD07E0E0C51F8D59677B7541B93437D3B41629B X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwODAzMDA4MCBTYWx0ZWRfX0apTrwyz8VYy zUtVYOYgX11xQw1+vyELb1+rXjCbvDifqi6GkJ8rn8kEWJ3q04SrJKCOl8vr7wlFqUovmkr+Tw4 pItWkbWyyswuEsuMmprtFpNrh5Q6sLwDm7a4IV4jif/1W+sYst9UWABD5fc22E9qt/focKW/ios jRvqZAFgppe4PrawSn9EuFbwOidqdztn+1mM+pFIDOM1PGsoaZb1K65VvOp4+LvVgaI/k33iiHe ph+iX7fgdVyX0WC0yGJLXDJZIh544B8G86L+nKao8xZyV2vBgO5nhzbriyiUmgiu+hEBKTu9S28 y8LYlKL4t2WBMmGqh3w/wfZ8sK25ZTnHQQZ/9yZUXFDyHZ/0E19K3KqoXqLzduJMa2lqD6ERjMA Vqq0BX0vNa0tShVHZzeQZpGJtbMOWCIJPsQ7Se0Bt2j5fbEVbRh9GN24ilmhb3ME8q2vKCYxZQ2 3OmBsVqjlEtQCfRbm8A== X-Proofpoint-GUID: RUTiw-ziqQcjl17Fde2qS5Zx1HnozKhi X-Proofpoint-ORIG-GUID: RUTiw-ziqQcjl17Fde2qS5Zx1HnozKhi X-Proofpoint-Spam-Info: AW1haW4tMjYwODAzMDA4MCBTYWx0ZWRfX6rNIMI/6L1t9 mWvAWDQRKUvwNkde3LHYon+5sOJ0t/agwLDe69uERS/L7wRScNanN6XjupNQBGcjopoKCYgCH2b WEmv0BYhPLLMFdW9VDdM0nqm+Q0X0BM= X-Authority-Analysis: v=2.4 cv=Ft81OWrq c=1 sm=1 tr=0 ts=6a70597a 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=gowsoOTTUOVcmtlkKump:22 a=gEfo2CItAAAA:8 a=EUspDBNiAAAA:8 a=A1X0JdhQAAAA:8 a=B8xk_V0qu_cBOhDEdJwA:9 a=QEXdDO2ut3YA:10 a=kacYvNCVWA4VmyqE58fU:22 a=sptkURWiP4Gy88Gu7hUp:22 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.134,FMLib:17.12.100.49 definitions=2026-08-02_06,2026-07-30_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 impostorscore=0 lowpriorityscore=0 clxscore=1015 adultscore=0 phishscore=0 bulkscore=0 suspectscore=0 priorityscore=1501 spamscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606150000 definitions=main-2608030080 Show warnings of too many spaces around '=3D', 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 | 38 ++++++++++++++++++= ++++ .../bad/dts-redundant-ws-strict.dts | 27 +++++++++++++++ .../dtc/dt-style-selftest/bad/dts-redundant-ws.dts | 27 +++++++++++++++ .../bad/yaml-redundant-ws-strict.yaml | 29 +++++++++++++++++ .../dt-style-selftest/bad/yaml-redundant-ws.yaml | 29 +++++++++++++++++ .../expected/dts-redundant-ws-strict.dts.txt | 13 ++++++++ .../expected/dts-redundant-ws.dts.txt | 9 +++++ .../expected/yaml-redundant-ws-strict.yaml.txt | 5 +++ .../expected/yaml-redundant-ws.yaml.txt | 3 ++ 9 files changed, 180 insertions(+) diff --git a/scripts/dtc/dt-check-style b/scripts/dtc/dt-check-style index 1430c675bd95..aa2072957a1a 100755 --- a/scripts/dtc/dt-check-style +++ b/scripts/dtc/dt-check-style @@ -348,6 +348,36 @@ def check_trailing_whitespace(ctx): yield (dl.lineno, 'trailing whitespace') =20 =20 +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: + 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){', dl.raw): + yield (dl.lineno, 'extra whitespace before {') + if re.search(r':(\s\s+|\t)', dl.raw): + yield (dl.lineno, 'extra whitespace after :') + if re.search(r'\s+;', dl.raw): + yield (dl.lineno, 'extra whitespace before ;') + + +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.raw): + yield (dl.lineno, 'extra whitespace before =3D') + if re.search(r'=3D(\s\s+|\t)', dl.raw): + 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 @@ -1002,6 +1032,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',)), @@ -1052,6 +1086,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..d73908b2ab0f --- /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 { + compatible =3D "simple-bus"; + ranges =3D <0 0 0 0xc0000000>; + + #address-cells =3D <1>; + #size-cells =3D <1>; + } ; +}; + +&soc { + serial: serial@20000 { + 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..2fedf462ca56 --- /dev/null +++ b/scripts/dtc/dt-style-selftest/bad/dts-redundant-ws.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 { + compatible =3D "simple-bus"; + ranges =3D <0 0 0 0xc0000000>; + + #address-cells =3D <1>; + #size-cells =3D <1>; + } ; +}; + +&soc { + serial: serial@20000 { + compatible =3D "example,serial"; + reg =3D <0x20000 0x1000>; + } ; +}; 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..14c2346d7658 --- /dev/null +++ b/scripts/dtc/dt-style-selftest/bad/yaml-redundant-ws-strict.yaml @@ -0,0 +1,29 @@ +# 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: + - Test User + +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>; + } ; 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..db265402d0e8 --- /dev/null +++ b/scripts/dtc/dt-style-selftest/bad/yaml-redundant-ws.yaml @@ -0,0 +1,29 @@ +# 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: + - Test User + +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>; + } ; 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..c18c1972bb47 --- /dev/null +++ b/scripts/dtc/dt-style-selftest/expected/dts-redundant-ws.dts.txt @@ -0,0 +1,9 @@ +# 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 ; 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..a70b365b6cf5 --- /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:29: 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..c85e80ed272a --- /dev/null +++ b/scripts/dtc/dt-style-selftest/expected/yaml-redundant-ws.yaml.txt @@ -0,0 +1,3 @@ +# 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 ; --=20 2.53.0 From nobody Fri Oct 2 09:22:00 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 850CD3B995D for ; Mon, 3 Aug 2026 09:03:57 +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=1785747839; cv=none; b=FOmj4oNtWJIxyUsf+dXM26EXA6u6UxqLvp8IgPaFHQicKAj1AFw2np9xQ6LYQAVToESe/rYDNNRsvUVhVVPuEADv1onvgonTdGeweAm52vizPgjr2wrWBnUyOO74Sbv9QrYW95TfZocqDc4HHVUyObfBJtAt6qLadU6lfa6kZfY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785747839; c=relaxed/simple; bh=47cyNALqJ25eM2F66KQ/8ZGVEN82PFz8l8ZFAkfaakQ=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=jkaUbZH6+HnYiRqb31t90+3WfazNzu8u0NiZ9OUA+NVvm1wKBReXGpgIfAcEhebHjc86Oh6E9ibtsGekS7pQN6eya6VQbn+9vhkXAS66Le5X7aWaKm2sJjXjAExPXoFauwhx2ZgPA0Sfm87zrK+QUeEVZpgy6SKGszY+EVs/4CI= 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=VAaznZdx; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=Bw0yadq5; 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="VAaznZdx"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="Bw0yadq5" 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 6736ExnP005495 for ; Mon, 3 Aug 2026 09:03:56 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= 5CF8fZpPPj1Voth88QksP9FtwhMfjRo8kHp6QcvcnYo=; b=VAaznZdxhQIedvL1 pDy+isc1HqEa5FEuCYB/NZNZ+BCnJ3Uad0ogU/qmxwsFOLIsrJxPqpj+lYbY5DSE 6MwB0ZX3GoUMko7Y0+a3KN9vnDpz5eDWyrWGOCyfZPvc7eu0hm3shcw8BMFAOEbP P3ko13rPWWLKQt4jO+jL6XTSr3XRhkUQN1ImtoVU59svqACUI4SKCw3CA23m9gPV V0sIhIeZOn8ofUrnyiJcfaQPcgvJXpMZscZ3dHPfFjxAzSCmLbQvfQZalKvA7dwc /391/Z7Nnxn/YSxXF3xU9vXrYZpCEgyqVBmvOeEp2oxi5CPt+XhRE53IXVBU5QAr 2Q1+sA== 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 4ftnj78q4q-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Mon, 03 Aug 2026 09:03:56 +0000 (GMT) Received: by mail-qt1-f197.google.com with SMTP id d75a77b69052e-5283fa0656dso47261431cf.1 for ; Mon, 03 Aug 2026 02:03:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1785747836; x=1786352636; 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=5CF8fZpPPj1Voth88QksP9FtwhMfjRo8kHp6QcvcnYo=; b=Bw0yadq5G4SREiv+xowF3VXsTSH5f6GU0Sddr1z3qYIMUtAU1+Ymk/+srXTp1p4+n+ HyYs7a4SXtYztjm/Ycrcfl5/DBn/lDvE2YVUQmCd3cJTtPrbffIwQF71/ygoVYadLV4u chrsixfEjbYXR13zOAUiu0vATF7TDFT89debE3+2avyHjB7ndndQk5nxkZhbx6KijLsR fIJToT+6xosPXPqfqGRzPAJgrjPZgvw3qC4Ba5lN6c4A1uvxfGCXL2SfgIRF743aW9m6 0C1ISxWdyc1r9qhTYJfUHt190iMEd3MA5qpYwc1xqel+RNO6Jm1GhslXMkkcC3zIXf5H RuJw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1785747836; x=1786352636; 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=5CF8fZpPPj1Voth88QksP9FtwhMfjRo8kHp6QcvcnYo=; b=a+C5HBZ2q1IGdH2L1AgSUIGDheHg3terwJGhHfhWYHwDlS6VDeENLjOeWRdyx6uW8/ rx7L/3bwXya8lXjlqtr6qvymZ9A/qOjd+P53JtvApR4eHRxXVcBT7pHiUXh/SxozwF4y NtfvR8+z+H5DaVUeLOHbeDMa6IYzjvrOA8vptRIvlGEltb2XEg6SvjT6Em2soaaXyYbl 7yG0go7wSl3WPwAkwgdQIYelwwExhnNK2JdI99Cu6sLdl9x2phGuQqZpxWJ1xuRWVELp pAcSy9I91SS27GsxPRP3uaAPqyjUWLa+9B/kT8cnhuoY3UK6X3aS4QOlspPrxLcOd9TK cDkg== X-Forwarded-Encrypted: i=1; AHgh+RrYxGEGhb1S1WGN+YtOEkXQRCcEwvEU3kESMxvJ7ROJl+5tPqSiMrgjZzhFETq3fNT65/e9ir/6cC2Ik/w=@vger.kernel.org X-Gm-Message-State: AOJu0Yy58vpzDMRpGnQZ0GPAW/UZB5kI1Sf1Ve4SOcbCwDd/f3j6t1w/ Tn04vZCtHhrIZXrFF5iBxsTs4vZ7uTpjhxgBfBXC+rS4CXqBqGoLz4POE29zBKG/HeqKkZkl+Id /9m1GhqS0g0HCBOA9OcFAOyYx8yODY7Y//EqTiReovzHJJYdVe6f7nDy7D5ZFZAxXJzrKR5p5+8 s= X-Gm-Gg: AR+sD12NBVdiK0iG0vA6w/v+yotK8y3ZlzEHfJJHHptxxMACE8iaI1/gn5pJsmmqKrU qJMXD3Pj0KYg+PzlJSHXkpTl4UXkxJTMhTF6D1z6Wbl5zEpQ6EqIDxE1TtaY44kcd2qLylj2s8E 9Y/G/hdKcVODMRcwVZWHyDf+HnXD/eojHTeF/ntgz8LG4XmGuB64ygOHwvmsayVkUzkK3ffZBZ9 PHisqdiT3z6o7fYSwtVb8E4p7/mGLPSehR59iOLGDoJskqzPN6CA1Z4J9hOzZlvpm93BX/L8uqT dIzxDp537oGmjV7S928AMk5PU0TlJW1OfnYsB2OlhnpLvPeXzZEPWIYpt/awUUhFnaKeRzbMU4C wJ2YZw4ychKjUnyXD+y71m2kM X-Received: by 2002:a05:622a:1e10:b0:51b:f992:9e18 with SMTP id d75a77b69052e-52b4c434166mr210854341cf.2.1785747835692; Mon, 03 Aug 2026 02:03:55 -0700 (PDT) X-Received: by 2002:a05:622a:1e10:b0:51b:f992:9e18 with SMTP id d75a77b69052e-52b4c434166mr210853701cf.2.1785747835075; Mon, 03 Aug 2026 02:03:55 -0700 (PDT) Received: from [127.0.1.1] ([178.197.219.214]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-47fd456a6d7sm31858493f8f.19.2026.08.03.02.03.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Aug 2026 02:03:54 -0700 (PDT) From: Krzysztof Kozlowski Date: Mon, 03 Aug 2026 11:03:14 +0200 Subject: [PATCH v3 11/11] 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: <20260803-n-dts-style-checker-continued-v3-11-6c9776928cea@oss.qualcomm.com> References: <20260803-n-dts-style-checker-continued-v3-0-6c9776928cea@oss.qualcomm.com> In-Reply-To: <20260803-n-dts-style-checker-continued-v3-0-6c9776928cea@oss.qualcomm.com> To: Rob Herring , Saravana Kannan , Test User , Krzysztof Kozlowski , Conor Dooley Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Krzysztof Kozlowski X-Mailer: b4 0.15.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=842; i=krzysztof.kozlowski@oss.qualcomm.com; h=from:subject:message-id; bh=47cyNALqJ25eM2F66KQ/8ZGVEN82PFz8l8ZFAkfaakQ=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBqcFlfFEoOq5QyPM+S0Ftm5ZlOyg9ajj3uO3Dyr QdEwbL6MdmJAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCanBZXwAKCRDBN2bmhouD 1y5dEACY7QRkVApv8euciN3KNt8dc5L7yYS1g0Aw5lWQibEKCrs2EsQljrMZtOmNZG9XXmyDv2z O++XJoVpDq5OxYdRFijedZF9nXD01kFlRNdlGO+my5INg0laV43tNwIeGoebm2NH2HG3vdfX3hd HlQfjhSNlwNWx0VmMwiALYpt/9fP7sHDYwwbGEK2FrKGgohWTavUokXtXtsTAWYNGJmzzDm8t6U cisCs2hOyT45ESsTqz+A3OLXn+0iTG38F6Vd4twHTf6jQSf0ncYRQKbLoWyWap1WsgkErO5cHSe o4/JkCr8KwfUbO0AVtcK5obQyWYUoenJ2GedMdbSjixaNqet5SsE+e+kIaz2JVgAKm7RpmVmO9u d+CmEPNrfDJb0+kqBFkPbjYqUSVEQNSGzhlySbCVxaWqnX82wV02U91G4pyRNtZxgp1b5eylwIk UPg+VvKv+11a61oDllHfWTbJFmI/1YAWDbmo7sqZAJGcZhfG6/GG3r22PJe0AX3Kjifj2PQyywm iYsXelvf5g3gSZn9XoYf62t5Cpj0JX0M5diWVVlUAdTgls0R/WeAeLfkyyCUNAOXKGl0vWdIgxc 2Hea+uIqpdVDSjwlw5EDdtjVpJ5J4KIFqvwHzemExnq+xOkX8lTj4QKmvV8FJTjV5vxBYRy6yyM TAEZtFjk2Dkt6Mg== X-Developer-Key: i=krzysztof.kozlowski@oss.qualcomm.com; a=openpgp; fpr=9BD07E0E0C51F8D59677B7541B93437D3B41629B X-Proofpoint-ORIG-GUID: pnTR-iPmyZl34gmhZxPlsasMTD46GN-6 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwODAzMDA4MCBTYWx0ZWRfXxH0YveYZPJUB bc8QPcp8OmSoggYtPjbn457rJgQsWuO0r3WvsJTGi39evWJZRHUiG3S8CS5Le51tI5LXIhRD4YX 1HdmX6tvsF7tAIN2A086rs12U/HAlTzTiinkwPN4NnVhVmSTr9BxkBul3tH1zMdKUb1v+fMVt7I WfI+8r67+lO0wGikWqg3I3N2vSWyzrGWEfpLymYgmz/7Ky2ce+aCptzE80F0kaajzuU5z0VzdgV sKKxT0MInj5qvpHbsOD9sjslnEqnf5ke7rxo6cBQh9xFWjKQ1lYh3l3XyBlKLt/oM6Ua8nROp42 HtCz7Zeh+8QklkbO7pgGm1qPfwT6ZQYKbwc3pHHVc4BbODAxe2z24mWQkhFQyvS1IaRvNU8eE9+ W8uXKF76Ea6gjY/N/BUQ1melJfba0qXIOfUpYhO2P471JKTubSELtFSrIcdR2SBcLWu9tQ6StIv FGbp7MCWpHvLw3r0OWg== X-Proofpoint-GUID: pnTR-iPmyZl34gmhZxPlsasMTD46GN-6 X-Authority-Analysis: v=2.4 cv=PqSjqQM3 c=1 sm=1 tr=0 ts=6a70597c 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=VwQbUJbxAAAA:8 a=hdCJvu6vi-O6ykQZt0QA:9 a=QEXdDO2ut3YA:10 a=a_PwQJl-kcHnX1M80qC6:22 X-Proofpoint-Spam-Info: AW1haW4tMjYwODAzMDA4MCBTYWx0ZWRfXwIIg/qxVqpH/ b0x1Kn/5q4lTDK5KZdYAB824qwGR8rr+s1m619YTHUw3m8pdBBuFAdY5OYLDzPM99yscG7Y2AFN mVjQ/IDpxXP+1jpz9zbhihqzummVU48= X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.134,FMLib:17.12.100.49 definitions=2026-08-02_06,2026-07-30_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 phishscore=0 spamscore=0 priorityscore=1501 adultscore=0 clxscore=1015 impostorscore=0 suspectscore=0 bulkscore=0 malwarescore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606150000 definitions=main-2608030080 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 cc3c01eecfa2..2d0cd7602a05 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -20374,6 +20374,8 @@ T: git git://git.kernel.org/pub/scm/linux/kernel/gi= t/robh/linux.git F: Documentation/devicetree/ 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