From nobody Fri Sep 25 19:20:31 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 AF5D4472526 for ; Wed, 9 Sep 2026 08:36:01 +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=1788942963; cv=none; b=SySIGcVYHTvgEONMIkgthvaIwtQHhdKFA95JBr6j8qpyGNThVSo8gzT4WzqBeRDgaXQm26LEWLxF7+KwSdcK9EecYjdj8fLWWLmd7C8y7HqogbXawf6DOYcmzjZNs49eBdwFaZ2QTJC7bBYvZb/2C9aj+6ruRtw6yQ0HE5jWSgM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788942963; c=relaxed/simple; bh=RpsFWGOJ/fmrFBjXtNLPVOkO7viH6czPpMx9xQdFNUs=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=cuEezlejQ7SM61c1ignvPrWrCtDdIsRl9JDXj7W3OKlEJb2B4hxi8KktgSh3y7VTu0i6Xsp1v5vomq3DKPkVYR/wRZUwONLZQha+K9LooDVwR+dssYeAmyULDIERyjPW5VdzyHN3nGJce4XnLRdWUN5OdBFn/07GXKkXqUDMEj4= 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=JtwqYvGt; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=NsiIVbMA; 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="JtwqYvGt"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="NsiIVbMA" 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 6896W1gX045467 for ; Wed, 9 Sep 2026 08:36:00 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= hOiYjCn1nD7fLf7vrzvPOq3oVs5fH9mikkYiajsOtfs=; b=JtwqYvGteBBlCoHd Q19JF+O2q0h0PUl1vXChPHh19lw5c0PC8rLBHal6gny4IgFcyZNxsGryBIpl7E0T oASjHV74BQLB+/ShHnOQk5/zOfKAp3VQ/YB9yhO9AoX5LzxeWaeUID5PGyNtGnCg Xna9mV7iReCoNs/SB0ABTkgWbWMZuGbH6b54E25p4FXRSN8MjUPVMmNbYN3w65P8 F293h/m4uq/eyv06Fpw+0qlHdUeqpbvQ8OwtSFEGNIO2V0eURam7AzLvaT/wllYh fZESAEwo4gr2QWUnGdh9q6HV8pCZvG96jR/DrCG7fg9Zs76LfEqflrVLEYPeGp2n 9ZICKQ== Received: from mail-qk1-f198.google.com (mail-qk1-f198.google.com [209.85.222.198]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4gjqewk0nf-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Wed, 09 Sep 2026 08:36:00 +0000 (GMT) Received: by mail-qk1-f198.google.com with SMTP id af79cd13be357-92e82060977so921591385a.1 for ; Wed, 09 Sep 2026 01:36:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1788942960; x=1789547760; 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=hOiYjCn1nD7fLf7vrzvPOq3oVs5fH9mikkYiajsOtfs=; b=NsiIVbMAeoFeSYA0GqBTyhQz6jVp1HoN3K6xTj5QuKMNP4mNHsfBigjfEn3JsejC2z 3igLbJ2OjpTO4JRi2TIeRMkGtvIZEagWg8maDwHPXK5Fsj6EfDH7Pkpkig+R8sretU5Z F8Rmv+UvquDXyDDD1BVYiZieyqnowqWmanPVbk9Rh/YNgDwRV1tfphrM4vjGMti5WbgI ymR4hgup9181SwE+B50ATN4r9yLz/gbJmO5zN4BFtPrG08ngzZNG26ARhK4BQqqgs9QH 3GXu2ztULOqpF4rAlS/6Bp1xjkhedvIJo1m+v+WbheagsEPf3obADCektVDWILcRoF4H MOSw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1788942960; x=1789547760; 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=hOiYjCn1nD7fLf7vrzvPOq3oVs5fH9mikkYiajsOtfs=; b=EhwuOSG1xKfHgwcKsEYhL22xTGRDoDFPKjkcYeXGDKZdtssNLUHYqCk28K1J/4/pag ih0LWTLy4vA2v2bAquwj9Cvwu6spGL4Z+jgbx1LwkV1VSjNXJeR0ogPp8cpgQ2mFlS51 HBK9V5s1wseUgd3bXCWzwIWmXG7a4ZMJGLFL/YXPLSspAyFHC2ABBULdEkeOgzvwZxTw fOCYavkp0g9YR5l2xEW2GnNg8lXgspQqq1ugpl9jeVZDpVlcuFPy2oof/Dfg6JjSd4G2 ovAm6hSAUSqzl8nviF7UNmbm/xRLz/uIoEf9tPvdllPoi7CY2nEFEUHEmHb6yeuYxz3Y 38GA== X-Forwarded-Encrypted: i=1; AKwUvByoD9Mjnxt5AhE9zNf5StKADJOdNACZ5twlU+S65zjw4Lk8Phs6UKuzDHIFphbep/pyQm8EpwPToW9ZS5U=@vger.kernel.org X-Gm-Message-State: AFuF++luSElKhFctvJ06bml5oS51fd6T3CMte+SUWuBJDVJWbB+ei5ko DjIwO/Rs7qP8HnnTnG1Zvx79Kj296mAgkn0IfsH3q/p8b/MAJl2tdDNcoCS/svz6Eu31QZ/ul2B 6Mq+w8WhMDeRFKVcs1YM4INZKI5ozKRe4tZwOlU9rvOzZV9zzxjmdWU8z4CUQwIxhFGU= X-Gm-Gg: AYBFou19JkqcxWwkND93IZyXoiAvrhUCyTEzuXW7zYwDVQLFytY0HMXxLxvvX3tARrc 6ZfYDr0shcRU8KLYdMpPWOsjBMqJEdt9nApb4YyTX6adbK+OeY7bNj38fuhSdBvvN64oqJ+mWa9 PhwWHfWQqaXeclDaBu83+ULK2+nvcW0IVl79873II7nW75QyjwaN6SusvyaiOHVksdIQOvK3qru 8OGlDlGs733wMjGcJY+IOYy7pGE2okeBIZyo2DrnMiAyEioopxvbklk+vd050t1vaf8MeINuKzf PD/t2x/Wb9Pqlq59vJT9fMZvaPIxkQgwa8rIkYAX/jDbn50Htm7vk22zDoqEIvUctzX/tS2IjB6 dUo9TrWKEZk21AgLK55hKWjs= X-Received: by 2002:a05:620a:6015:b0:939:7cca:ed30 with SMTP id af79cd13be357-9397ccafdd2mr2772141285a.45.1788942959634; Wed, 09 Sep 2026 01:35:59 -0700 (PDT) X-Received: by 2002:a05:620a:6015:b0:939:7cca:ed30 with SMTP id af79cd13be357-9397ccafdd2mr2772139685a.45.1788942959154; Wed, 09 Sep 2026 01:35:59 -0700 (PDT) Received: from [127.0.1.1] ([178.197.219.214]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-485885bfdf6sm43210269f8f.34.2026.09.09.01.35.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Sep 2026 01:35:58 -0700 (PDT) From: Krzysztof Kozlowski Date: Wed, 09 Sep 2026 10:35:44 +0200 Subject: [PATCH v2 1/6] dtc: dt-check-style: Handle continued lines in check_hex_case() 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: <20260909-b4-dts-style-checker-continued-lines-v2-1-c5cb4c9d9b66@oss.qualcomm.com> References: <20260909-b4-dts-style-checker-continued-lines-v2-0-c5cb4c9d9b66@oss.qualcomm.com> In-Reply-To: <20260909-b4-dts-style-checker-continued-lines-v2-0-c5cb4c9d9b66@oss.qualcomm.com> To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Saravana Kannan Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Krzysztof Kozlowski X-Mailer: b4 0.16.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=3317; i=krzysztof.kozlowski@oss.qualcomm.com; h=from:subject:message-id; bh=RpsFWGOJ/fmrFBjXtNLPVOkO7viH6czPpMx9xQdFNUs=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBqoRpmhPHdIrvukJy+Dz0gqu+ohDhxPjGperCVF J+WBZ4DL4SJAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCaqEaZgAKCRDBN2bmhouD 1wztD/9Wq1/D0IBgCJdcFKWr3XtxZc2CQ3RtOQo4hJ8gVMh77TCCsBb/OmtP6j1OHbJR5Yzc1cl iLi+hLegBZESOt/yef8ksxAqkDi0ENqmOdw9iRaBtpDHR8FwZdAtliyrG2f+PGecUBe7rYk0ZsN QrDv95kiwD3KGgfHo4yhKy0pCWxY8FSb50zgRiLAyWhUUyiznsQEKPU1kEgovDC/rRNKpzIOvgO SUrSu7fdMhNavRJI9eH86HOzj/fJv98S6a2SI0RGK11+HLFkbTAzyGhqIagPspNGojlh0dNVrDD lHuKkVqmgI4Hoi57quPzZaIzpaWEsWQ4DcmYifX45RYE8fo6oR+3eRU/NwYzI+n3EvbxTF6qTqc /OoCtvEXJHi80DLRKtBm6QlljGdzxq7wH6CUzNPHJeVw60vYBhHjT+NIM+Im6/RRBfvqY09Fs2b BsYdI+XHKwS74YSu7rHoXqzQOQaijRnfLCHnKTMHXfNTH0yUelRdQrnE/4RcIxJX0pqilt7SG4X WeOtWoQCp9+ygj3nomvDZGg9KN7E7mHMHyK9TdfcLmunbXNVUTzuTcxOmQjV4adYWH7IiX32vdd NiKcGZDGYC0TG0yB8qG4bU86xaG+WnzEr7GEQm3p+PBejsMXWSEFlzX2TLkJxFU643lH4TI8j/y Du5KKQNVHtwhcxQ== X-Developer-Key: i=krzysztof.kozlowski@oss.qualcomm.com; a=openpgp; fpr=9BD07E0E0C51F8D59677B7541B93437D3B41629B X-Authority-Analysis: v=2.4 cv=cpirVV4i c=1 sm=1 tr=0 ts=6aa11a70 cx=c_pps a=qKBjSQ1v91RyAK45QCPf5w==:117 a=+bKQE0WJfmhK2875HamI0Q==:17 a=IkcTkHD0fZMA:10 a=VdqzKS8jKosA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=ZpdpYltYx_vBUK5n70dp:22 a=EUspDBNiAAAA:8 a=SU40fdrgiSb2mxkwluUA:9 a=QEXdDO2ut3YA:10 a=NFOGd7dJGGMPyQGDc5-O:22 X-Proofpoint-GUID: -OzjjpGRZGQCkbAQeoO1BCW2Sp0XHilY X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwOTA5MDA5NCBTYWx0ZWRfX+X2Blpw6yLja xKTAUrEH83AORmtrshLik9givP9TsQRFW9yuqIWBQxA0IJl4V84iD05DMV6yQygcYLnK06RyiN7 jWbvVXST8cL/Piv6S5SzNRrBgF4asKiV5CAWziBFYQy+2JaAwP7W8wEntci4Cl/Z5gsfNnPn5aq Cd+jZH34APu4W2RNbiLJU5anItUu9aL0S/IPxxBHpNVx7z23ADaY/lg8fXkfqwRoyOuwWJq5uCF UDRCu2n87McrgiRze42gZOimGDnA1T2IytJ2IvJfz/W2+V9j+dSojSCNB9haOneF+wjf5HegR+u FuIw6YrDCzOm3iBBJh4ovaBIb+AJym2ooKTid+IdidhK5KVXE1rc3YzEdsU20TBkGp/za3ml2Ah LIBHGEIaWpSZWh0LdygyRmO7WFWIBimOMghVKb7occrrY2cCN8ulecmynhDEayN63yuh6rCBSPY M7s5cR0pg/MCskjdKtQ== X-Proofpoint-ORIG-GUID: -OzjjpGRZGQCkbAQeoO1BCW2Sp0XHilY X-Proofpoint-Spam-Info: AW1haW4tMjYwOTA5MDA5NCBTYWx0ZWRfX8Q7/nsFPl7So hPT6bqpk2oLw9ruXnDyELH3EwPc38hp1SZAVvrehjzhBTM8doPK2PztqeztoCpGGz3ceqDU59sv FBhfTInT0Cm1w1UfOawUC5NpOrad4ns= X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.134,FMLib:17.12.100.49 definitions=2026-09-08_03,2026-09-08_03,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 spamscore=0 lowpriorityscore=0 impostorscore=0 malwarescore=0 phishscore=0 clxscore=1015 priorityscore=1501 adultscore=0 suspectscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606150000 definitions=main-2609090094 Continued lines are not separate DtsLine items in ctx.lines, so they need own iteration. Rule for hex case is applicable to continued values as well. Signed-off-by: Krzysztof Kozlowski --- scripts/dtc/dt-check-style | 24 ++++++++++++++----= ---- .../dtc/dt-style-selftest/bad/yaml-hex-case.yaml | 5 ++++- .../expected/yaml-hex-case.yaml.txt | 2 ++ 3 files changed, 21 insertions(+), 10 deletions(-) diff --git a/scripts/dtc/dt-check-style b/scripts/dtc/dt-check-style index 15a3ba82fd5f..6d978c4d9832 100755 --- a/scripts/dtc/dt-check-style +++ b/scripts/dtc/dt-check-style @@ -547,18 +547,24 @@ def check_continuation_alignment(ctx): dl_value_complete =3D cont.stripped.endswith('",') or cont.str= ipped.endswith('>,') =20 =20 +def _check_hex_case(dl): + if dl.linetype in (LineType.BLANK, LineType.COMMENT, + LineType.COMMENT_START, LineType.COMMENT_BODY, + LineType.COMMENT_END, LineType.PREPROCESSOR): + return + for m in re.finditer(r'\b0[xX][0-9a-fA-F]+\b', dl.code): + lit =3D m.group(0) + if any(c.isupper() for c in lit[2:]) or lit[1] =3D=3D 'X': + yield (dl.lineno, + 'hex literal %r must be lowercase' % lit) + + def check_hex_case(ctx): """Hex literals (0xN) must use lowercase digits and prefix.""" for dl in ctx.lines: - if dl.linetype in (LineType.BLANK, LineType.COMMENT, - LineType.COMMENT_START, LineType.COMMENT_BODY, - LineType.COMMENT_END, LineType.PREPROCESSOR): - continue - for m in re.finditer(r'\b0[xX][0-9a-fA-F]+\b', dl.code): - lit =3D m.group(0) - if any(c.isupper() for c in lit[2:]) or lit[1] =3D=3D 'X': - yield (dl.lineno, - 'hex literal %r must be lowercase' % lit) + yield from _check_hex_case(dl) + for cont in dl.continuations: + yield from _check_hex_case(cont) =20 =20 def check_indent_consistent(ctx): diff --git a/scripts/dtc/dt-style-selftest/bad/yaml-hex-case.yaml b/scripts= /dtc/dt-style-selftest/bad/yaml-hex-case.yaml index c55359a4ca68..b0b8683b883a 100644 --- a/scripts/dtc/dt-style-selftest/bad/yaml-hex-case.yaml +++ b/scripts/dtc/dt-style-selftest/bad/yaml-hex-case.yaml @@ -25,5 +25,8 @@ examples: - | foo@1000 { compatible =3D "example,test-hex-case"; - reg =3D <0xABCD 0x100>; + reg =3D <0xABCD 0x100>, + <0x2BCD 0x100>, + <0x3BCD + 0x100>; }; diff --git a/scripts/dtc/dt-style-selftest/expected/yaml-hex-case.yaml.txt = b/scripts/dtc/dt-style-selftest/expected/yaml-hex-case.yaml.txt index 6600f7cd1ba5..f42490256939 100644 --- a/scripts/dtc/dt-style-selftest/expected/yaml-hex-case.yaml.txt +++ b/scripts/dtc/dt-style-selftest/expected/yaml-hex-case.yaml.txt @@ -1,2 +1,4 @@ # mode=3Dstrict bad/yaml-hex-case.yaml:28: example 0 [hex-case] hex literal '0xABCD' must = be lowercase +bad/yaml-hex-case.yaml:29: example 0 [hex-case] hex literal '0x2BCD' must = be lowercase +bad/yaml-hex-case.yaml:30: example 0 [hex-case] hex literal '0x3BCD' must = be lowercase --=20 2.53.0 From nobody Fri Sep 25 19:20:31 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 64A87470EA7 for ; Wed, 9 Sep 2026 08:36:03 +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=1788942964; cv=none; b=buAqpOjCJ6S48xurqAGR2V6s04VL5NAjE/hAQKOk4uuQzswi8yAz7Kp9GcMdVbf7tUpOKnGV2LnkSteQv4DlUBIXe3mbeeTOmXcmEG14QVCsLtqFsSBA+VtDcBJIF9fGTJsIBmfMfvmWUotgWKfnXftkeAPBeiIOYva/O78NJWw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788942964; c=relaxed/simple; bh=Ixb/AmdAstOcn9FVhgNt2Xll/IdUyQ44GvDHEBU3aaE=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=jnVjtVD3sAdEgS2kvbeJYPVNILitPgSSE58LTv2SP5XzAYKZgdli5t45awfj4wysgnJExubWZ3U8un/98HotRx7tkDAEK7DvgpaBgSv9i2OM27aUE2eF+ytL5VN9FT8xG6Vm1p8rkOaj3rdx6JdXsvV2QbLvDcCQikT6apEOCRs= 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=cv1Fsawx; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=Z798z6cs; 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="cv1Fsawx"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="Z798z6cs" 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 6896kmQG045553 for ; Wed, 9 Sep 2026 08:36:02 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= AiS2pGqIFKAf7u+eYdTRDO4CKrAlgaifUWeuWMxg02s=; b=cv1FsawxeQWpdU4Y D+lSX54Vr5x4l3lGX07jzFcZwWG96q+xzO2vZ5Vu8wtoI/aV1CJWh26bV3u1p/l7 r0zQBBpJ0YgcqiqS0MXsAkSxHl2vcIE2QrLeR9R4ZO6BPzShqxjZVO1+6enAjkm9 0Ei79MxsJ3PWUFWCwqtgN3H/L3HbNFpiDnyf7fPq3l4Zz9eKASWowR6JOEF0Kfep 4dzd/msllYmFZAJi7mH7ONbA8sXB6DJqF0z44YihjK2c6eC2kEo62AyJ5gO3zLc9 kRw8Vspi7+Rf/p3KyRyYz1pRXoe1tilH3WtaPiC1TmzAxIfFPfxZDZqPVsrQw7ld lZ+9Rw== 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 4gjqewk0nr-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Wed, 09 Sep 2026 08:36:02 +0000 (GMT) Received: by mail-qk1-f200.google.com with SMTP id af79cd13be357-934963b2bc0so1059768985a.3 for ; Wed, 09 Sep 2026 01:36:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1788942961; x=1789547761; 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=AiS2pGqIFKAf7u+eYdTRDO4CKrAlgaifUWeuWMxg02s=; b=Z798z6csB38LmTROa0f8HDfG0Muo5xndwvQbefRkB/OiNns3JZqApJocURl2kMiAsH RCaZyHz4HHxarcJQqYG36WSEeNxvPcJTpeG0fNGg0SLUnSf+ez06NZR6VhuKljVcETie 6zT8i4/cPUeY8lLxynPcNvAedy5+7iLgZyIZIu3XWMrERmji4m5TfRybW+9kFp189v5j SHQDtq5pOOoQ4JpCDQ7zY81HRBgeAR6v9u8NjSuK/q+44qPLjaGXXD5ZZrsTHPs4mMIU jaYaOjBxZL4eg7yOwOzz0r57Ih9A6rZd76oeKN8rlfNB3dVbKkTp52sZu+y5mmSKLNKd vmZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1788942961; x=1789547761; 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=AiS2pGqIFKAf7u+eYdTRDO4CKrAlgaifUWeuWMxg02s=; b=pTEL+khGkxYogbG6Miqf+d10r52CZnijzxLQttBxnKflVlD6XK/S1O1cpiMbBen4wQ an6tR7EDYGxbypRCSCw94SGAvDW6pIqBOfjTZ+8ja2Ozs667TIL9NGJW97oQkvugcVkW l7l+ColiWERTFtvzQvHhzxZFDSHSd8Nf1YFXzMFUSlfatWvfW/COxwEAtoT56yTqE0z9 furT4slBoQ2UTF2owlTk+1PC7Q1bm7sL/J5wcSrC/zWRnQ/lwmvFfEw+XVsigrpZz++D dfoCqAb+jJ7Ya0HUBHW+QQleCf2SlK71fxrrjr0qKMDfelM/doi4F3cEKVrhEw2hDWNY WyEw== X-Forwarded-Encrypted: i=1; AKwUvByd1ubBNIhMT6h1ZPYDPrK9PvpQY5zS6QoJ7j2hfRFE7xkYUMP6JO1KI8hAGTK7Ll867vKp2OrIrU89gTg=@vger.kernel.org X-Gm-Message-State: AFuF++n1kbzKCLv0GNZN+s1731RFcFZ0p30+WFiMPZcbqRpUmpQR0JQq CvyUOqUQL6b4Dg6L3EalI5mol1+rog2dweM8AOS+LdDVnkWnkfCBtCjzsp4PyTPwJSuRWZD8YRG LLPbwwnypoflbdFgfuu4hmnKxCeJ9Fagi0pDJnuIjzHHa7PxFYRKDzrN3toHrdZQg65Y= X-Gm-Gg: AYBFou0In6dH+wBNOerh+eTYtCQZk4+8fzyPUWea7rTHyuW9aV3U2tVjORSUoHoOXQs w5wclTqKhp5iV7da5Md+vQqn2mmctEvMZuKcE95K3/RHdmJ0TUWGSKJGdbuWvUiNteK/2JOUbBe YGqWh9UUxy5kY5HaEzYPmKLYQ+jHh1qaTKHiWIT60u7lWHqqSeSrLWp/uOg9WJRlM2MVAALl4gQ NKqsg3N+3W0M2LwDXi4UWfXx7mKWlE8+iNqHMJpJEjCl+5+xl0O7qnxtVLhx+0PyVk12ERFZzwy 6MhaI9lAVDpGSOorxcXSjjBBO+xJnEMFlsEnyGR7B6WY3aNIbEzk46gic7bx+SouwM3YN9a1Rnc 61oDIunQmSIqGRXQwL3igsp4= X-Received: by 2002:a05:620a:444e:b0:939:7f14:ebc6 with SMTP id af79cd13be357-939c939ca65mr620922385a.3.1788942961538; Wed, 09 Sep 2026 01:36:01 -0700 (PDT) X-Received: by 2002:a05:620a:444e:b0:939:7f14:ebc6 with SMTP id af79cd13be357-939c939ca65mr620917885a.3.1788942961126; Wed, 09 Sep 2026 01:36:01 -0700 (PDT) Received: from [127.0.1.1] ([178.197.219.214]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-485885bfdf6sm43210269f8f.34.2026.09.09.01.35.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Sep 2026 01:36:00 -0700 (PDT) From: Krzysztof Kozlowski Date: Wed, 09 Sep 2026 10:35:45 +0200 Subject: [PATCH v2 2/6] dtc: dt-check-style: Handle continued lines in check_line_length() 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: <20260909-b4-dts-style-checker-continued-lines-v2-2-c5cb4c9d9b66@oss.qualcomm.com> References: <20260909-b4-dts-style-checker-continued-lines-v2-0-c5cb4c9d9b66@oss.qualcomm.com> In-Reply-To: <20260909-b4-dts-style-checker-continued-lines-v2-0-c5cb4c9d9b66@oss.qualcomm.com> To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Saravana Kannan Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Krzysztof Kozlowski X-Mailer: b4 0.16.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=4091; i=krzysztof.kozlowski@oss.qualcomm.com; h=from:subject:message-id; bh=Ixb/AmdAstOcn9FVhgNt2Xll/IdUyQ44GvDHEBU3aaE=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBqoRpmFJBDZVgsyLOBlQRK8YpH0ZX5GdlnTEl8T HgoD1a4DuyJAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCaqEaZgAKCRDBN2bmhouD 11p7D/9W4VKbJoa2jXlqYU7w3aFluGaZ7hpnbR6fLnYrBB1QhEo1jjTy1qnhWkMUhVeSLFN/GL7 8hV0ZiXVvlY8o4BQDIgQqvxCFrHDQNuyKvwAQovYSstSh61lXBZgb7uL8q8yp2YI0B3De3pzU8W Q+CNRwZ9qf2VY371JxBMHEyjytaUYZdi3whDqlDJjYRyIeySTpUqxO5nJn+5hRWmUIM62W3Ht1D cAZ4cFIvZbb9pSKI8uyMdvHC3mhCnTtDErTqkfMURIU8gg6jPzQzMhBNTPDK8DoF83FepjkEafe toE4YEKdD4qmQklkYbKEtpeg2O1F2Sd7EOnWujWnzWchuJ199Z0u7Pnf52HC9TyuMzGXcH4zp/Q 3qWkuqxxhh2ZWb6HUnL5kaa0f3KnkO53q0I8MROLOHUB3RiLLGZv1w/nC2KUwn42XsABQgM9kQ0 WUQfKpcC71FX5s8h64T/68LccYGmOL4aJAwxs3jTpg8w3AFbswqHJgk8v/q7RkahEFkvYI5nZYM puG7GUl/nZusN/QiIVDC5z4LoyPqBGqzrvd8kfZ+2+/7YPjLZkPn/OFUnHdTSFj5d1O0Ihh/a2z gSg5bLGX+i2T+idYuBCgXcB/YPWWwgUC074ZEUaUx3EIwd7g9XmWTXurcVXhz5igJuKKnP1cjg+ QlFSS89ABJ1e+1g== X-Developer-Key: i=krzysztof.kozlowski@oss.qualcomm.com; a=openpgp; fpr=9BD07E0E0C51F8D59677B7541B93437D3B41629B X-Authority-Analysis: v=2.4 cv=cpirVV4i c=1 sm=1 tr=0 ts=6aa11a72 cx=c_pps a=hnmNkyzTK/kJ09Xio7VxxA==:117 a=+bKQE0WJfmhK2875HamI0Q==:17 a=IkcTkHD0fZMA:10 a=VdqzKS8jKosA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=ZpdpYltYx_vBUK5n70dp:22 a=EUspDBNiAAAA:8 a=jHdmtohXv_5nRK-EuSoA:9 a=QEXdDO2ut3YA:10 a=PEH46H7Ffwr30OY-TuGO:22 X-Proofpoint-GUID: zmVEs5IFwJoQ6R6TZjXfr4WpM8roMnEI X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwOTA5MDA5NCBTYWx0ZWRfX3IewC9sFQTlg tIaZzBwH169tcd0zLyic5SOX+aFxGcgZOwA+4QRS7AGc8W4ljmdLk/GgfrUi4w6QoNDFij9/S7k QmYByMJQu3UEwZmmi/lnKnt+hB597KiqEOHDZd9VRvYJbUytHfSqFZxZVhduauKpM2r9nivv4Dw wN8r03sRSbtxPPCI/y2M/w+lFu8fAB6uWWrE0LiI4TKu9XUu0C8+HBY+6veN3Z19avn8n/DepCk creW6jTOIe08FprvghTgGWFS2n1NXT1mc8uN0TMPmna0XxR4KvhENwSuFcfeyQvry1DUNGwz/IR fbW1PNXpbekTaHJ1aBRiY1WgH2xQXJVgMfZ6ZPG+daoQUAoQh7ksqheuK0FjrbPKM6JdHQsTdS/ jqYJ0i7JbI1ZMyCwvoOEifjgrLxuk+6fgsyQZnCcwgvC/AFNvtiDJmvd2d18yZOvF8bV0hxc6f5 CjsgOqqxvzGVo6f2Xdg== X-Proofpoint-ORIG-GUID: zmVEs5IFwJoQ6R6TZjXfr4WpM8roMnEI X-Proofpoint-Spam-Info: AW1haW4tMjYwOTA5MDA5NCBTYWx0ZWRfX0l6IyxBh0LeL OzrDGoFpbeM5C9bc65tOYmf6bLcyf3KxJ58pu/mSb3K8FFQ3WyO0kqfxpgRX44uy3Rsa3hoDCJN Y/AAhl3Jv3AmOGdF6NVDbKL5QakW8Bc= X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.134,FMLib:17.12.100.49 definitions=2026-09-08_03,2026-09-08_03,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 spamscore=0 lowpriorityscore=0 impostorscore=0 malwarescore=0 phishscore=0 clxscore=1015 priorityscore=1501 adultscore=0 suspectscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606150000 definitions=main-2609090094 Continued lines are not separate DtsLine items in ctx.lines, so they need own iteration. Rule for length of line is applicable to continued values as well. Signed-off-by: Krzysztof Kozlowski --- scripts/dtc/dt-check-style | 18 ++++++++++++--= ---- scripts/dtc/dt-style-selftest/bad/dts-line-length.dts | 3 ++- .../dtc/dt-style-selftest/bad/yaml-line-length.yaml | 3 ++- .../dt-style-selftest/expected/dts-line-length.dts.txt | 1 + .../expected/yaml-line-length.yaml.txt | 1 + 5 files changed, 18 insertions(+), 8 deletions(-) diff --git a/scripts/dtc/dt-check-style b/scripts/dtc/dt-check-style index 6d978c4d9832..ff5e715593df 100755 --- a/scripts/dtc/dt-check-style +++ b/scripts/dtc/dt-check-style @@ -627,16 +627,22 @@ def check_indent_unit_strict(ctx): 'got %r' % unit) =20 =20 +def _check_line_length(dl): + if dl.linetype =3D=3D LineType.BLANK: + return + cols =3D _display_col(dl.raw) + if cols > 80: + yield (dl.lineno, + 'line exceeds 80 columns (%d)' % cols) + + def check_line_length(ctx): """Lines must not exceed 80 columns; tabs count as 8 (see _display_col).""" for dl in ctx.lines: - if dl.linetype =3D=3D LineType.BLANK: - continue - cols =3D _display_col(dl.raw) - if cols > 80: - yield (dl.lineno, - 'line exceeds 80 columns (%d)' % cols) + yield from _check_line_length(dl) + for cont in dl.continuations: + yield from _check_line_length(cont) =20 =20 def check_mixed_indent_chars(ctx): 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 index bde91a922477..adf40e3c95f7 100644 --- a/scripts/dtc/dt-style-selftest/bad/dts-line-length.dts +++ b/scripts/dtc/dt-style-selftest/bad/dts-line-length.dts @@ -14,7 +14,8 @@ soc@0 { #size-cells =3D <1>; =20 foo@1000 { - compatible =3D "example,test-line-length-this-is-a-very-long-name-indee= d-yeah"; + compatible =3D "example,test-line-length-this-is-a-very-long-name-indee= d-yeah", + "example,test-line-length-this-is-a-very-long-name-indeed-yeah-se= cond"; reg =3D <0x1000 0x100>; }; }; diff --git a/scripts/dtc/dt-style-selftest/bad/yaml-line-length.yaml b/scri= pts/dtc/dt-style-selftest/bad/yaml-line-length.yaml index 6e4140e500b5..6b1209ee4f26 100644 --- a/scripts/dtc/dt-style-selftest/bad/yaml-line-length.yaml +++ b/scripts/dtc/dt-style-selftest/bad/yaml-line-length.yaml @@ -24,6 +24,7 @@ additionalProperties: false examples: - | foo@1000 { - compatible =3D "example,test-line-length-this-is-a-very-long-name-= indeed-yeah"; + compatible =3D "example,test-line-length-this-is-a-very-long-name-= indeed-yeah", + "example,test-line-length-this-is-a-very-long-name-in= deed-yeah-second"; 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 index 8ed08c309632..9cdb7550b56c 100644 --- a/scripts/dtc/dt-style-selftest/expected/dts-line-length.dts.txt +++ b/scripts/dtc/dt-style-selftest/expected/dts-line-length.dts.txt @@ -1,2 +1,3 @@ # mode=3Dstricter bad/dts-line-length.dts:17: [line-length-dts] line exceeds 80 columns (101) +bad/dts-line-length.dts:18: [line-length-dts] line exceeds 80 columns (108) diff --git a/scripts/dtc/dt-style-selftest/expected/yaml-line-length.yaml.t= xt b/scripts/dtc/dt-style-selftest/expected/yaml-line-length.yaml.txt index 89b36360caa4..f21b823c6136 100644 --- a/scripts/dtc/dt-style-selftest/expected/yaml-line-length.yaml.txt +++ b/scripts/dtc/dt-style-selftest/expected/yaml-line-length.yaml.txt @@ -1,2 +1,3 @@ # mode=3Dstrict bad/yaml-line-length.yaml:27: example 0 [line-length] line exceeds 80 colu= mns (81) +bad/yaml-line-length.yaml:28: example 0 [line-length] line exceeds 80 colu= mns (88) --=20 2.53.0 From nobody Fri Sep 25 19:20:31 2026 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.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 6A7EA46C4AF for ; Wed, 9 Sep 2026 08:36:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.168.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788942967; cv=none; b=cJbyew6CNffGxCetcThWqr/DPzBN1GexPizFY03UnftAbqiJuO8tYguJ76mUhjrwxtNpzXoJIk/h7KKT2A1gCJyUxaTTO8PdOPUkOJ/j7j+AvRu925irpHPWuwuZFShPChoPRuWb07DQdB78KBkCfwtCBnQEZo9EE11ZlI2nSGQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788942967; c=relaxed/simple; bh=IWHg3NxDjAQuyvLPrxd0bg+vjcwN4JdBqQLR55GtCQI=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=PM1CaYCn6i+OGkRgOxIc9cXn16eyw0lNm/IcHUl5rbWhpzm89doQwXMOjKaW7L82kSUEptPY1XlpK+VroWJSzJh71iInLSmSH6B2euiohBmktVb7nOjwESJ6d2eB0bafomCEtPTuOIURpDaLBZlfAGLUaMGenMJBVgRBtPBIxkw= 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=babebhFH; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=Mqko7dZn; arc=none smtp.client-ip=205.220.168.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="babebhFH"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="Mqko7dZn" Received: from pps.filterd (m0279865.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 6896WFCF964976 for ; Wed, 9 Sep 2026 08:36:04 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= KOoY6mCIop7DLsgHwFMY2E+1AD8DaONcY4sNreB3ZeY=; b=babebhFHpu+aDK/U /jsF//7phqFo5nJiPdQ/43tCQ+rWgcgi3mQBeSa/bQw3uF30M8Y82sHNzUNY6BAj UcUOLHANH9io5kaJA8gDFtnrfGYxZmZTiRSHFoEtJKDjT8hshim6vzHgVUDA1WVq Ok6fYjFvfC+Vori5R2kEIQSfK+1N1JVRO5A8WMYKI4Zedlzho7d4FEVcaqpQQyqw 3MYIj3dq84p8nP95ZPhkmoOhGOgJrC3t5a/MMC/YPIdNZR+Sw8PH023FGAxRPB0g gSLSc15v6nvf7k33MYgbsC8rxBayZh2LPEt5bpRmxhIcE5AzifNEXNgasRWVCZdR jHdbGg== Received: from mail-qk1-f199.google.com (mail-qk1-f199.google.com [209.85.222.199]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4gjqha33e7-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Wed, 09 Sep 2026 08:36:04 +0000 (GMT) Received: by mail-qk1-f199.google.com with SMTP id af79cd13be357-934963b2bc0so1059778485a.3 for ; Wed, 09 Sep 2026 01:36:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1788942964; x=1789547764; 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=KOoY6mCIop7DLsgHwFMY2E+1AD8DaONcY4sNreB3ZeY=; b=Mqko7dZn5LEGUsC8AjtlIZIokc9FYX2PrFkaEAL41TuaTBJh31W+Jj/tva7WpFTVEc gINCsNdyY8EOLEv8w/jrF6RBpJvSX1JfOPYlzrscWUYjsPTEcNgZjXNpnSYiIZUMYujD ZZO69XCXhSAilf1uqdpCGESVr3YT/MpfGfzHi9C1ZCZ3u9AiPrbBNLjB9UeI3ILh4JQz UmfIClAjYTgN4PuR40adqehS5sSMayz3tH2Lflkg/bT5uFSOCegjBcYlfHI+N0mhRBXw DtCM+sVpVGVdt/JTrqjd4LzC2bEMpFw7HG0tGkpuWvnXbbKDdnxjf9pSaPJ5r81NY6RG lBAA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1788942964; x=1789547764; 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=KOoY6mCIop7DLsgHwFMY2E+1AD8DaONcY4sNreB3ZeY=; b=nzcW4twckpDbz3Ax8hXTHJPYmG72+blbTUgC4HjCTBYfrzROEPYBjVw7l0CvVvxFST 7eBowNsn4VO55U66LvK9nBbV541sFnJ8Xnbbbk5lnEu0y/pUlv/MpjWXHEyC5Me1a//M P0cPXDTn6bI66QZm+JC+uBCqe4NPqPcTFUGbP0GZutwK5OhkC3NUFn3z0L5cfWJhh7Mn QttjPmTQc4M0ONipCNwo/WVsx3nvAFC6jofQmAq09delngSe93DYchhwKmiHh9KNAmKV b9P911pBqS7hglpTqB4pE/xvkCEW6ZZkykgwG05b7zFRz/6NRtUpwZ+Qg/KU2+hEiYxq 0bmg== X-Forwarded-Encrypted: i=1; AKwUvByOTKp7wd6zScA+RCQj7gc6oDV8NI3CtNMgsqIqQ63KAHRUzkRDHTLNa61y4gdMYcYiuTeiGu4FHnbFGt0=@vger.kernel.org X-Gm-Message-State: AFuF++kop0ByqpLHRqG/XHn/11eBDbl4OmUB73FA5ze/ipyEuLlRPkfy Gz73RkdWpYU+1ZaFsKlQ+Ey9xwoMhg/DQQmMkZLhYmj/IEfMtd/GyTt08JFv3+hUKEIIrchNJej 8Cf/rduL6ZBu75pb2Tw9m15zc9njcfMrqtZOCqs54ibXZk6qs1VVom5YUtmJElOOyIFw= X-Gm-Gg: AYBFou02G6njbPHQGlPVw9kt/Sii78z5TxxrEMg8z5RLMmM6bWBykgCYJjInp4XyrZe pbC/G3ikeuPnmdmE6fh9K9lt4Aoc5m/yyLb5i7xIQ5DEp0Lgu1+Fs279Qj0IEu6p1ZAZNxQsUTH aVCdpwikrp2bo+bD/QXdgCwROnztP0DSFLQL+i+kyXzFPeRYHeXvUujtQG6gf8zrAaDhb2zE0eg wSgW6S3qzmdRQQtITUYrF0KYdOhx+sehURerZBJKsCZIteWMTtQS2SdRXGdztoLdy9lIsJ0mfWI 93vAPcpXJLacSXj5fPaLn8de5U6qL37dIR25XXmGA8uzwwVcUJYiw1sgpoSubbqiukDkaXr0QNk tJD4t7IO7pXlqhh8BI6jPGag= X-Received: by 2002:a05:620a:258d:b0:939:2c5c:7977 with SMTP id af79cd13be357-939c93fd11cmr605479885a.20.1788942963505; Wed, 09 Sep 2026 01:36:03 -0700 (PDT) X-Received: by 2002:a05:620a:258d:b0:939:2c5c:7977 with SMTP id af79cd13be357-939c93fd11cmr605476885a.20.1788942963052; Wed, 09 Sep 2026 01:36:03 -0700 (PDT) Received: from [127.0.1.1] ([178.197.219.214]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-485885bfdf6sm43210269f8f.34.2026.09.09.01.36.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Sep 2026 01:36:02 -0700 (PDT) From: Krzysztof Kozlowski Date: Wed, 09 Sep 2026 10:35:46 +0200 Subject: [PATCH v2 3/6] dtc: dt-check-style: Handle continued lines in check_trailing_whitespace() 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: <20260909-b4-dts-style-checker-continued-lines-v2-3-c5cb4c9d9b66@oss.qualcomm.com> References: <20260909-b4-dts-style-checker-continued-lines-v2-0-c5cb4c9d9b66@oss.qualcomm.com> In-Reply-To: <20260909-b4-dts-style-checker-continued-lines-v2-0-c5cb4c9d9b66@oss.qualcomm.com> To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Saravana Kannan Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Krzysztof Kozlowski X-Mailer: b4 0.16.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=3744; i=krzysztof.kozlowski@oss.qualcomm.com; h=from:subject:message-id; bh=IWHg3NxDjAQuyvLPrxd0bg+vjcwN4JdBqQLR55GtCQI=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBqoRpnud/QxRRiZNqO9ZF+4J5CS1iqOJQDgkHL3 mVUs7bGsgeJAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCaqEaZwAKCRDBN2bmhouD 12ATD/0UrmJzGsnG/5GAeZAi9+LiWnuHC7nzKuszc29m4L7UtH6xIPok9H1LBKZ0aPLJf9XAHpe 0Od419kWAaiSluBwgeV6gA4PaUGWXB5f1+Kkv1jh+TXzhEdF6YeEjFJFb4tXZ5omXQl6oJcSg7d LJG7I2dvTc0rKAf6V/pXuN/OqmbtN91RuOymQNZoySPTlpXAtwrW3bT3J81aYIpm6YacNBfmoGP bDSBrOZQ7CJajmskfSPOc+sb+vq2pL4+Wd3jTLnE5Tn7jnh96FzDO43Uh7j/Di6/PF+pQKXH8tn 3mi5YEpUUyqJi/ZHxQR1elsmtQKOfPMHIfjPwxpiuQ8tZMKmPI//YnXaB4TWMB5/4WnFskQKz/j 2ut0+gB2hQQpBM42yENvwgY2DC+l9SMhuYnfdWMwpVt94bQNeVWjdsOlxDi6TwR/jsrUIJsOgxC IznM9sv2PG2AeGOCKcb6hZ/Yr3hchaazGrFzWQxyaYe9zcxb4xe6rN20ZgCgiKxW/eNrPkR64CF zf37B4CcIK64KLDWh/ogiKctc0Ima+0Vfdy382wJGkxshtGrclH+FrPYx7JzNtIMnBbu/dk53A7 IczLbF5PMWhFu0m2QVTYkZao9y+FxXp1MkIfyVNGuN90VPDX/0HS4ad8WDN9agIJJa4t0Fwng0M 3agiDyaanNmh7Og== X-Developer-Key: i=krzysztof.kozlowski@oss.qualcomm.com; a=openpgp; fpr=9BD07E0E0C51F8D59677B7541B93437D3B41629B X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwOTA5MDA5NCBTYWx0ZWRfX6DZfhCmmo7Qg gfp6z9Gm9fekxlIYKdUVu9CmcehsL8UqQGqEreDwhe20PlG8gpnkZjNhe04sFCiWjrbrHDv+DiF AMwwzRkS8FV4qJ+oceJ9C11kA03gY67WvS58HK5/NCAiqrKewa5oQ1H3dl48YWilSPRvRXT0QwX f20o7Rowy3qMB6vK9sKPcW15utlE6cfhmXDy3MUJXtX+A/8tl34LDikRDTzly8gwGSEMRrYTueh +UauLzKDpXpE2pMd5mme5jCzfToK8/6XDcLHOP+BwUDvn7zIbDjP1oJPxEdxnTB6cBj8gpJWmTZ ZzmA+sdIXstTS2P3hfgRf1GlJwzZd0r9WImHzWjO9M7XfFgGJb7Y0sONI1QhwjITRV1MGJVIt3L d/UZ+GKqavJHBZPZJ7kJdk6zmSygfUDaISQp7CdD49iq8Yfpq8mZpGftjdjlQLm4bSSZ+FpS7RZ YX+zWvQy2LjNWIyRLuA== X-Authority-Analysis: v=2.4 cv=Z5Xc2nRA c=1 sm=1 tr=0 ts=6aa11a74 cx=c_pps a=HLyN3IcIa5EE8TELMZ618Q==:117 a=+bKQE0WJfmhK2875HamI0Q==:17 a=IkcTkHD0fZMA:10 a=VdqzKS8jKosA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=Um2Pa8k9VHT-vaBCBUpS:22 a=EUspDBNiAAAA:8 a=n0VsRDhmN3h0bdBGaSQA:9 a=QEXdDO2ut3YA:10 a=bTQJ7kPSJx9SKPbeHEYW:22 X-Proofpoint-GUID: VnLVr6WP5aoPmVDXhlpFUwGRD7Yb9OGp X-Proofpoint-ORIG-GUID: VnLVr6WP5aoPmVDXhlpFUwGRD7Yb9OGp X-Proofpoint-Spam-Info: AW1haW4tMjYwOTA5MDA5NCBTYWx0ZWRfX82szMpV9wlLM R7jc9rR/tSujo9vGCcyOTbM8W8dRK+qv30kNtor+zAUkCzSiYdcmNWdx3bjfGw+do09OKKx+6Xs OrODwPyMNhFwMfznrLSTriP3c3P2p4w= X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.134,FMLib:17.12.100.49 definitions=2026-09-08_03,2026-09-08_03,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 impostorscore=0 lowpriorityscore=0 bulkscore=0 malwarescore=0 adultscore=0 phishscore=0 priorityscore=1501 spamscore=0 suspectscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606150000 definitions=main-2609090094 Continued lines are not separate DtsLine items in ctx.lines, so they need own iteration. Rule for trailing white-space is applicable to continued values as well. Signed-off-by: Krzysztof Kozlowski --- scripts/dtc/dt-check-style | 10 ++++++= ++-- scripts/dtc/dt-style-selftest/bad/dts-trailing-ws.dts | 8 ++++++= ++ scripts/dtc/dt-style-selftest/bad/yaml-trailing-ws.yaml | 5 ++++- scripts/dtc/dt-style-selftest/expected/dts-trailing-ws.dts.txt | 1 + .../dtc/dt-style-selftest/expected/yaml-trailing-ws.yaml.txt | 2 ++ 5 files changed, 23 insertions(+), 3 deletions(-) diff --git a/scripts/dtc/dt-check-style b/scripts/dtc/dt-check-style index ff5e715593df..3694b0b1ebb6 100755 --- a/scripts/dtc/dt-check-style +++ b/scripts/dtc/dt-check-style @@ -985,10 +985,16 @@ def check_tab_in_yaml_example(ctx): yield (cont.lineno, 'tab character not allowed in DTS exam= ple') =20 =20 +def _check_trailing_whitespace(dl): + if dl.raw !=3D dl.raw.rstrip(): + yield (dl.lineno, 'trailing whitespace') + + def check_trailing_whitespace(ctx): for dl in ctx.lines: - if dl.raw !=3D dl.raw.rstrip(): - yield (dl.lineno, 'trailing whitespace') + yield from _check_trailing_whitespace(dl) + for cont in dl.continuations: + yield from _check_trailing_whitespace(cont) =20 =20 def check_unclosed_block_comment(ctx): 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 index 1eb24d91c640..73c24525ce18 100644 --- a/scripts/dtc/dt-style-selftest/bad/dts-trailing-ws.dts +++ b/scripts/dtc/dt-style-selftest/bad/dts-trailing-ws.dts @@ -5,4 +5,12 @@ / { compatible =3D "example,test-board"; =20 #address-cells =3D <1>; #size-cells =3D <1>; + + interrupt-controller@10000 { + compatible =3D "example,intc"; + reg =3D <0x10000 0x1000>; + clocks =3D <1 2 3>, + <4 5 6>, =20 + <7 8 9>; + }; }; diff --git a/scripts/dtc/dt-style-selftest/bad/yaml-trailing-ws.yaml b/scri= pts/dtc/dt-style-selftest/bad/yaml-trailing-ws.yaml index f338c14174e6..17eeed3411c6 100644 --- a/scripts/dtc/dt-style-selftest/bad/yaml-trailing-ws.yaml +++ b/scripts/dtc/dt-style-selftest/bad/yaml-trailing-ws.yaml @@ -25,5 +25,8 @@ examples: - | device@1000 { compatible =3D "example,test-trailing"; =20 - reg =3D <0x1000 0x100>; + reg =3D <0x1000 0x100>, + <0x2000 0x100>,=20 + <0x3000=20 + 0x100>; }; 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 index 94d9ae9d616c..a15a7d637c30 100644 --- a/scripts/dtc/dt-style-selftest/expected/dts-trailing-ws.dts.txt +++ b/scripts/dtc/dt-style-selftest/expected/dts-trailing-ws.dts.txt @@ -1,2 +1,3 @@ # mode=3Drelaxed bad/dts-trailing-ws.dts:5: [trailing-whitespace] trailing whitespace +bad/dts-trailing-ws.dts:13: [trailing-whitespace] trailing whitespace diff --git a/scripts/dtc/dt-style-selftest/expected/yaml-trailing-ws.yaml.t= xt b/scripts/dtc/dt-style-selftest/expected/yaml-trailing-ws.yaml.txt index cfdbc8476c73..4f2ec9572bc6 100644 --- a/scripts/dtc/dt-style-selftest/expected/yaml-trailing-ws.yaml.txt +++ b/scripts/dtc/dt-style-selftest/expected/yaml-trailing-ws.yaml.txt @@ -1,2 +1,4 @@ # mode=3Drelaxed bad/yaml-trailing-ws.yaml:27: example 0 [trailing-whitespace] trailing whi= tespace +bad/yaml-trailing-ws.yaml:29: example 0 [trailing-whitespace] trailing whi= tespace +bad/yaml-trailing-ws.yaml:30: example 0 [trailing-whitespace] trailing whi= tespace --=20 2.53.0 From nobody Fri Sep 25 19:20:31 2026 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.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 2BACF479890 for ; Wed, 9 Sep 2026 08:36:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.168.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788942969; cv=none; b=Sg/RYa87S+lncld06AfV9jZFeVO91sYliudLSy78b/G0+wxQMRD2H2fXvljw9PsxKUKH6G/hdBqlUaFmgW7UxAmzfRHDQHZHU8R3XVfEev5siQlAc+ubxEtNyhWqEnKSMuqmRFiQKHA9OMyJ8GhzqM5uNEskalBLIedmXs9GmaQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788942969; c=relaxed/simple; bh=7lpkyblVXFRJvW4/uj7BYSCP9fs7ua9tALdDgwCU3XY=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=Z1yG4G3ftUPy57SSvTrumi7dxGOdQW8EP0WCzHd+R4/AW9DZr2jLlcPiI5hGDTd3Hyci1jhBjL4zsEvogkSqtnlfZ+F50up9goRv1Fwrze7a8zy1cEC3kPVzJDIcRrBB6KyIA1J/rVUwmaZqDB3JrRpCslffhgdBXnedfiHdirw= 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=nJK6cWtZ; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=iczNBR7e; arc=none smtp.client-ip=205.220.168.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="nJK6cWtZ"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="iczNBR7e" Received: from pps.filterd (m0279866.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 6896iIf43653864 for ; Wed, 9 Sep 2026 08:36:06 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= QXZHWAJDo5q95UrPYw6QXLGKZ8eqcpYLyi7q1UPoimU=; b=nJK6cWtZncSJ1zrj lcK8CVvbFfyvno1UfiIeFULKmPDEFa76anYM+ZwIXTEXWH+oa9hdwBEe9b59OAXK XIEW9nGetVwMJp3E/OGcj4nsy/Xj69jqMW5nHOvnCOQm2fvhZVk5AZo+xEXFCOf0 3JwBDGA5av86/2aOoaMH4wauBrgYgXmBttBOoTT1j7xqK/8Y74WXOeTL1+sBwwTV gOsoT1HL+ley+v8DTa1I5ua3Jhhw0seW/wfoQF/8W5gG8xpw1QpgKg/wXCfHRst+ BDATAgKss58ZXYLLdxMhZlNdQtQHonDHEF4vEsNc3IzeRGAIYvAiMBWEYGHK6ptn oLKo3Q== Received: from mail-qk1-f198.google.com (mail-qk1-f198.google.com [209.85.222.198]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4gjppp3aak-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Wed, 09 Sep 2026 08:36:06 +0000 (GMT) Received: by mail-qk1-f198.google.com with SMTP id af79cd13be357-936aa34873bso759997485a.3 for ; Wed, 09 Sep 2026 01:36:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1788942965; x=1789547765; 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=QXZHWAJDo5q95UrPYw6QXLGKZ8eqcpYLyi7q1UPoimU=; b=iczNBR7ejZHAuaRhYTndm/O+6cbLXfX8bAwyyNoLBVCY52krI0cI0SDbGT8MOZFjU4 aB7y+O92u+9WkxvCalwudymvU+EDT+S8IjmGovqIs1c0q2RbEFHCzDjhggodpkUhZJVL B6115wdQBK3B+3Rr+0jsAXW+XSVKls7JrIxTSNYmxZ7KRb0q7F6VHSvUAPp8zexYndXg 3x7c8/tde7KTsRMDl879zHid+w+jfgWlp1ouOZ0hlggH6AOZMwl1yVIjp4RynnIf48U3 ZOGRFTF/UYlaWlirrwhfzYkg6PIINSx7vq8UPm9IFDfSftHNg/VO21VzeCsZWpgyNmaD p7tg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1788942965; x=1789547765; 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=QXZHWAJDo5q95UrPYw6QXLGKZ8eqcpYLyi7q1UPoimU=; b=FgkSTAitbT3ukjSlAxMtTQ8Rx6FACilyt7mmpEVN8atnv/h1b242v6a76IhSZ472FJ Oq13Uk2L+WU3kQJgP8wY4b3VclU0Oy+/dQD5AWmg1TofBMpVkKuzXg46cxHXoOsYNyFr ZaVgkLOaiMHFV8jDOHywAG+K+nr04FodG4A2p1TDhJkaK1elRD/EndRup4K9Zua4vj4K kd/ZTQfJdj3i1hlJpzZgysJ/CRXLroQJb1yeq40pZVpgxnFuGpYG0o65gvIeMGSxiRXR rBQzmZjFRBm9bGdWNQMUFQDrHXNOR008hsTi5zM6BeuCINIpOW6gREtZDJVHreFpGDbi ZQpg== X-Forwarded-Encrypted: i=1; AKwUvBzTND7vV8U7rDnjeHm6UuZ9dNXmndBU649qnUz6CfRK1CD3dNz2cBbWTdNDN3WJezun6sR28J2nt4xSFhQ=@vger.kernel.org X-Gm-Message-State: AFuF++nG9Bu6tEj3mQn12dr6gS/RdtnumG5D5mdOkqBcSP6aoZnn/BzR UcyD5zm4YB1X4JuE8oErsRYUcMED1DpfHyClscuWphdr+5ECW7zkxC+opEAoQBHcQvAcZ69dLeM FAqzRNBLbDGvH3BeJKyHkY9dXbPD0HmcT3M6rI4KZ1jaNELQQHHjm2rTCaR4JRB+KmhA= X-Gm-Gg: AYBFou1OH2fYp71sgi1DvYKhD7yELPTvst8bvkquHgaNWgNMz3PTqBwpro8gN7RpoKx l5Yu4GmT8+xZw2VYLMORsJvqQOBbElXHNStIgICg2HZzklffglIEyUjyKTIx5HOi0pJRpIZI/2o yHGry/e5Wm/pgwZdzvoWJ93J4aeeC8JDdriCLArt6AA/+exCtRtdUUOSE8yaaIaLgf5FsXPYdVJ cWQXS79Md7o4MZkZdkDMG2hJMV9QscdsjT/Ea67a4xXY1mwCWPke7NO6EP38BVVJHfAFNnUyuur 3zmY4A5iEgQ2VOLmhfeeKupS/ejkNzxK5/og1GVAxzePQ1sS3NHPf/mt9gnPYi7g+LSzbf35QVs numChNC1J14ODuScxliZb2oU= X-Received: by 2002:a05:620a:d8b:b0:939:9e33:6a63 with SMTP id af79cd13be357-9399e33a8fbmr2737743385a.45.1788942965338; Wed, 09 Sep 2026 01:36:05 -0700 (PDT) X-Received: by 2002:a05:620a:d8b:b0:939:9e33:6a63 with SMTP id af79cd13be357-9399e33a8fbmr2737739985a.45.1788942964943; Wed, 09 Sep 2026 01:36:04 -0700 (PDT) Received: from [127.0.1.1] ([178.197.219.214]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-485885bfdf6sm43210269f8f.34.2026.09.09.01.36.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Sep 2026 01:36:04 -0700 (PDT) From: Krzysztof Kozlowski Date: Wed, 09 Sep 2026 10:35:47 +0200 Subject: [PATCH v2 4/6] dtc: dt-check-style: Unduplicate checks in check_mixed_indent_chars() 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: <20260909-b4-dts-style-checker-continued-lines-v2-4-c5cb4c9d9b66@oss.qualcomm.com> References: <20260909-b4-dts-style-checker-continued-lines-v2-0-c5cb4c9d9b66@oss.qualcomm.com> In-Reply-To: <20260909-b4-dts-style-checker-continued-lines-v2-0-c5cb4c9d9b66@oss.qualcomm.com> To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Saravana Kannan Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Krzysztof Kozlowski X-Mailer: b4 0.16.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=2143; i=krzysztof.kozlowski@oss.qualcomm.com; h=from:subject:message-id; bh=7lpkyblVXFRJvW4/uj7BYSCP9fs7ua9tALdDgwCU3XY=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBqoRpo+bO2K5XvBJowQZjjUU2EC/K++SyGPlZnl rt5ANppDxiJAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCaqEaaAAKCRDBN2bmhouD 1wlMD/9emqfZ1088gJoh/dhPQ2xD2C+9Fk2DkB+i1FsnignTsGbJIIUSEd915OshUg6XWbb+4hO 2hgTi6AIqiSFBjFhkAKz/Vc+HRF1WmJpLTcskEe2UyiQgV/PmahPWZzOerMG9xrOHKSHwJfFy4C zc3n347etS/0kjAck1drVbPhyRzp2Uh61TEoYYst71j4I3Uw8yvXb7Lg5ZK7q66kVvAYn3rre60 +Hp9IaGYsF/4EG4VS7RMzVqd0bwp86EeJdcEcjiYvQeXtFla1BKZbonGAEr2zsjtQupYFaqDJKn FLyI7YBVkbYPzc2ubrZKK7HqKCxV+kNvxAyFC9kKlGLVRz66RLsL4F1gJeh6ALCUbl5yQbVEL7D zIMlmdZHJc3UjkL+OjN6a0/P6tA4JS/hUeEDK6cZkVklDIj6+2X0mJim8FqxTvNeSNckU9l7iu0 /fAUb3fl9Fpvk5a8d4aP21YAlpZam/FPsMQp3lz5nwErNgdzV7tyj037VQwZMiOWb/AxOlCiUZN 30NSXWb7siTPDw3eUoVuKalfazn4/OCYy8U4vapFbifPG5pFqXOarf99V6sxHCPGm2GwRplBujy m9+ICPv6wwY9GNi3vsZcffhDXKVnvWjkn2oduY9BjQVOl5qttS6cRQs+bgHbGuIjUmiVQc6jD1j 3lPXAR7qaeyMloQ== X-Developer-Key: i=krzysztof.kozlowski@oss.qualcomm.com; a=openpgp; fpr=9BD07E0E0C51F8D59677B7541B93437D3B41629B X-Proofpoint-GUID: urBg7ZeZIB9KYXfQ0l1LXHJX1-qx5-I8 X-Proofpoint-ORIG-GUID: urBg7ZeZIB9KYXfQ0l1LXHJX1-qx5-I8 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwOTA5MDA5NSBTYWx0ZWRfXwTnrkorbEisC RXQSpXmSTrXbzAHZM8er7cGcjw4nVfyKVD/CNZB4ZyurYDd5AdWla3fmlT4lklb+2giqNGACHt9 wsC+1Pn3ggyCdqMt0l/VCbUVyHjOIvulvxwNPkzT2vlZF0DZsLNblqkhWJpYdpaPkgJmbNj4tZB MDpIwR93N4vGbIwOiVrbj+4zibFFEK/HmhOm+FrzLpF3xQ6XrRAMDTR48ePNFzkQIG0AGL2xnLy ES9OJQzEuq5Z5UuozQOloO6IAMDWIi17o0f04HqKH4EqSV6JyBDJE0sPHvpkR5HZSidN730NlPQ iaZnAarrlClqswgZ/3Z3LAp0sw2r35Jz7XBYXv5g4Oz0h9nB68E3CsU3WEJ28WURRpfQWyvSt4D Lhv2VvR1LW4HtrLMEOZkPrLeyO4zmg303+Wg1VxIqGKM/69dwGGuEiUIT5qcYUMMEcuUYUPKmU3 Vay7ANSwOcVtTUrl8mg== X-Proofpoint-Spam-Info: AW1haW4tMjYwOTA5MDA5NSBTYWx0ZWRfX++aJAB0gk5sJ DItySH1NHFOtGXE0x2VtJeT+pDI7qtUFWK8PBj1/rQ7CIAGmy9FjaIBow6KCL4GN9BgLjZIz49t 5mv3jsx6AVr3FIZz8TDOA6bnc6wOmFQ= X-Authority-Analysis: v=2.4 cv=DcInbPtW c=1 sm=1 tr=0 ts=6aa11a76 cx=c_pps a=qKBjSQ1v91RyAK45QCPf5w==:117 a=+bKQE0WJfmhK2875HamI0Q==:17 a=IkcTkHD0fZMA:10 a=VdqzKS8jKosA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=YMgV9FUhrdKAYTUUvYB2:22 a=EUspDBNiAAAA:8 a=ZNCJMhPrvMW_IMsXWMMA:9 a=QEXdDO2ut3YA:10 a=NFOGd7dJGGMPyQGDc5-O:22 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.134,FMLib:17.12.100.49 definitions=2026-09-08_03,2026-09-08_03,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 bulkscore=0 suspectscore=0 phishscore=0 clxscore=1015 lowpriorityscore=0 adultscore=0 spamscore=0 malwarescore=0 priorityscore=1501 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606150000 definitions=main-2609090095 Code checking each DtsLine and continuations is the same, so split it to separate function to avoid duplicated code. Signed-off-by: Krzysztof Kozlowski --- scripts/dtc/dt-check-style | 29 +++++++++++++---------------- 1 file changed, 13 insertions(+), 16 deletions(-) diff --git a/scripts/dtc/dt-check-style b/scripts/dtc/dt-check-style index 3694b0b1ebb6..2ff9fdc50367 100755 --- a/scripts/dtc/dt-check-style +++ b/scripts/dtc/dt-check-style @@ -645,27 +645,24 @@ def check_line_length(ctx): yield from _check_line_length(cont) =20 =20 +def _check_mixed_indent_chars(dl): + if not dl.indent_str: + return + if dl.linetype =3D=3D LineType.PREPROCESSOR: + return + if re.search(r' \t', dl.indent_str): + yield (dl.lineno, 'mixed tabs and spaces in indent') + if dl.indent_str.count(' ') > 7: + yield (dl.lineno, 'too many space characters in indent (more than = 7)') + + def check_mixed_indent_chars(ctx): """Indent must be all-tabs, except for aligning indentation (comments or continued lines).""" for dl in ctx.lines: - if not dl.indent_str: - continue - if dl.linetype =3D=3D LineType.PREPROCESSOR: - continue - if re.search(r' \t', dl.indent_str): - yield (dl.lineno, 'mixed tabs and spaces in indent') - if dl.indent_str.count(' ') > 7: - yield (dl.lineno, 'too many space characters in indent (more t= han 7)') + yield from _check_mixed_indent_chars(dl) for cont in dl.continuations: - if not cont.indent_str: - continue - if cont.linetype =3D=3D LineType.PREPROCESSOR: - continue - if re.search(r' \t', cont.indent_str): - yield (cont.lineno, 'mixed tabs and spaces in indent') - if cont.indent_str.count(' ') > 7: - yield (cont.lineno, 'too many space characters in indent (= more than 7)') + yield from _check_mixed_indent_chars(cont) =20 =20 def check_node_close_alone(ctx): --=20 2.53.0 From nobody Fri Sep 25 19:20:31 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 B329C4756DE for ; Wed, 9 Sep 2026 08:36:08 +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=1788942970; cv=none; b=tum7TDp0/NSKcPMVtpnRD6WyZtq6emmKlZLI+6E3Qbdv47DzfMqb+zIX1rDlUigpsFV+oywJnVb7GFMaNwdvTq/OPmBIM+ENQIhrMVXhoRed3c5ranfhWUxvt9vlqu1JG/4l+zcbJNb1APnalw4SYIn3MGOjGc9Jccobs7nPWEw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788942970; c=relaxed/simple; bh=Ue6midJSVmgV6ghv2VQrE9scJG+SviUg2vZbqL6/1Ok=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=hVxYUrUtezZRQCXUGeK6avC7Ik8a4cUzsf9zNFkrKf7oshXO3ot7wVecALYLtCJGmPEEZtL5zAIV6atqIJBfqApfaW944xVsZahpvqqaE62Bsv+ouJwy5kh1C95QYGealE6nFeaR/CNM95PaGdZVhugFkDkT2kO3NzZYQW6RPmU= 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=JygpqPOc; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=aEVKHqoN; 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="JygpqPOc"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="aEVKHqoN" 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 6896UdNQ336590 for ; Wed, 9 Sep 2026 08:36:07 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= A/C1tmOXI13kUzfS0ML+iY5IwGKaZltTvEDgs10XXe0=; b=JygpqPOcW0tBhoS2 V2XHTFKqoUXPhi362XiURNVftOAZnWG/jQkS2q+hIojFk7SnKLG0cCkF1q3DlRTc xThnJs7GRoK3nQtinhAA8LyzVGAQ+c92u4DJhZwyA+OHhHw7VqnUDNT8EixiRqfe i8elLlCTQsfNENiXdWsXBXW6+5puAxde2kRcFXGQBtS9rUiYVZptexc5krgTrwaU zsxuvXWnZ32vEVAyKLY/XC20V7CqqzjeJI5vwkoOlyc3tIoxMPJMspK2STEEuR9n 2kPrlty+1TZiH2L+42heI3SbAQr9K9L9a0uF15Zztw9O21Gqx1wDZMwHs4b+lwdh u9IudQ== Received: from mail-qk1-f198.google.com (mail-qk1-f198.google.com [209.85.222.198]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4gjqe7jyv6-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Wed, 09 Sep 2026 08:36:07 +0000 (GMT) Received: by mail-qk1-f198.google.com with SMTP id af79cd13be357-9396e0515dcso311962885a.1 for ; Wed, 09 Sep 2026 01:36:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1788942967; x=1789547767; 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=A/C1tmOXI13kUzfS0ML+iY5IwGKaZltTvEDgs10XXe0=; b=aEVKHqoN7bY8+9/PQFiV+HpRIEFmZACZoCE9iJtcgzDkinNLPnFKr79LvamYFSLA4X lw0RyGpDzCMNGfaVRGqDEnGxfTSex8ZLDm1uwzQJpa+wcyBm9cBw6ZO4Ab/GyFaFQusM +JYwwUl96e7PkIck7NE3bu1yzn2XH9H5JPpvzExXECuxU0LEGHQ68rez4Q3C8hWYrvr3 RC7S98SINBNVktTMpc5tYOp2G85xef3AXTek0LSuRWWmzLnA6xfOAHc278u9Z01Owny0 AqP5zFcYwZCg1GcyMVRdQZG81VCqHH+ApgubRTUUF67Bw/0fB3qgl7JgFz8ix1KHpGNc pe7Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1788942967; x=1789547767; 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=A/C1tmOXI13kUzfS0ML+iY5IwGKaZltTvEDgs10XXe0=; b=fJgABVlKFmrovDZxEf4ZFWT3d5KSi+C38TdmpyKteqtY40xfwIhCjOvzWRtsvrnvI7 VVLeCqH+XQlKTIfzIkqSpfc8jeHYCvs7vY+u6NByGCeGDONzT1ByLy4P2IfX96hyJyuH Gjghit6GqGTKsPB6pOWf7a64f96gY+p5PqjpUBfYZyvHp2a+r6FNBlYz2YC6J48+RX0J x4C1smQei7xRbOPEToNULJ/yFezfAqLiga3QuI+9k+aGURy0FRdGW6ZBX+OMituCdx+L GxD9Oahb0/680NiPXWaO7YVqfWIBX56K/GV96bpIjUTbohqYWqwr1Nxo3HUNYz8KooOs 8PTQ== X-Forwarded-Encrypted: i=1; AKwUvBzsXsP/foQx44p4RoF7sh8jGVVEHQhrse7CW9rXDQp2z5ipZAE+O+2L67wmm6pQLDn5CInP15/Hu/I4wxs=@vger.kernel.org X-Gm-Message-State: AFuF++kr5Hs7qzRKro4I3L16KIxy432+BAfrRsGWpJkEUwSNzG5myz+J M/fq0xNV++CtoSvHOsE4E82NsGstgLvgLRyg+L8LHNdQN1QBdjuwNBX12pYvQ2g9wqnwBvzpqAu MrkEG/TN1FkL/IW7RhcdVFB8f4GDYcqVADv0c7As//wLBhLHMGNGvHnCO9YatgYXxzbQ= X-Gm-Gg: AYBFou2Xo8gHXRohzVNmqXBP7VxRLYSS4mHklP1+3NnlbMny0FXPMWcOzi/KUYoFCai y/h6ZA3N6FMLk5EN/LvKo6Szor9Osp265WnkRMmuHnQDgMvUKsQGV7UFfi/RWJzD+qYsFVh2P1d jxey86PD8519C57p9u9baiVMH8LSBPZyAVMXD+1X3EWegsmw7ohyJGHv5D9ujM4ERJj7Ys9Qfva BeP0woc+XrR2UxS7D23Q40iFNt+WX5wgieBavtp4AyEMMs+/PLp6vjJbfX8p/ximbdDcb+XrVVj gTvPgVugCkOGabpjk8Hdz6yPEQ5EBPeKz7uE10wO4JYL0qmGyCRCXBuNcE8vL8J8fOk1KKl+QgB RsxsqWcnH5RXIgH9e1UXOrgA= X-Received: by 2002:a05:620a:2991:b0:92e:e559:fe6b with SMTP id af79cd13be357-939803b2bdemr3831189285a.7.1788942966992; Wed, 09 Sep 2026 01:36:06 -0700 (PDT) X-Received: by 2002:a05:620a:2991:b0:92e:e559:fe6b with SMTP id af79cd13be357-939803b2bdemr3831184485a.7.1788942966509; Wed, 09 Sep 2026 01:36:06 -0700 (PDT) Received: from [127.0.1.1] ([178.197.219.214]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-485885bfdf6sm43210269f8f.34.2026.09.09.01.36.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Sep 2026 01:36:05 -0700 (PDT) From: Krzysztof Kozlowski Date: Wed, 09 Sep 2026 10:35:48 +0200 Subject: [PATCH v2 5/6] dtc: dt-check-style: Right strip whitespaces, leftovers before comments 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: <20260909-b4-dts-style-checker-continued-lines-v2-5-c5cb4c9d9b66@oss.qualcomm.com> References: <20260909-b4-dts-style-checker-continued-lines-v2-0-c5cb4c9d9b66@oss.qualcomm.com> In-Reply-To: <20260909-b4-dts-style-checker-continued-lines-v2-0-c5cb4c9d9b66@oss.qualcomm.com> To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Saravana Kannan Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Krzysztof Kozlowski X-Mailer: b4 0.16.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1119; i=krzysztof.kozlowski@oss.qualcomm.com; h=from:subject:message-id; bh=Ue6midJSVmgV6ghv2VQrE9scJG+SviUg2vZbqL6/1Ok=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBqoRppQcrE0eiYhvd5qLuRdVja89WZiPRgwjPSX AA0rsvlEBSJAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCaqEaaQAKCRDBN2bmhouD 17HSD/0Y65xNy9MMLalHIkW6/OlVvfWkqK9bu96E38bvxdQvfMMMos6oQlyOd9jU1rtedAahpAm H1vA81gPTlX+tM8Kn8zmeTJzMieG5f4kNhs0n78O1axOuIs+0O1hBRWPXzAGZq0q2+vI+n/gAxx nIKcS5R6NvXTknDfcxPFYhOkwBqxIGFazSMrrTUtyOf4j3NriXjAmhSjzdRGJZirTH5sp2UVo8E 4q8CKXqNYiSiZ+6RpKAWWUn77LeUhV2nwfrG5joJTE3tXFnsmkOgGgPnNjTlmi+DDHcHa/rORrG 0wAZYOA4+YQeja696XKDZHnAx4pMVWtrsZ4GNFM11/fQiGT1CpmPdyDRkUeXhz8y5Yw+wRo+1IN 9h378i/HzlUTbUbBrWOWy3TlOF4QI3gW+I03vgsIIn0Ud2RWWEpkNsA0IQ11sITJI4RqM3J/jrW UgJlUMm9aNIN48oF37T74cBFg+SuiB3FGCQXtC6pEiP9eBeVNgCT+zOW2KTEY8d38KUT9w/JWYQ sHWAMU2XyeBqxSqGHZVcidy/woGBtsmNb9TRW6RXgsCm3euXNRtSDZA3mPlZrRUmaV6sngAJIZm E/TYedGSXVCb7sERA48jknGI72eeUdkQj3OvpTNNkoz8F+NNftOPYmc9Xc9QP/z7YZDhAA6pHNx +PPkwr+iLwrqX6g== X-Developer-Key: i=krzysztof.kozlowski@oss.qualcomm.com; a=openpgp; fpr=9BD07E0E0C51F8D59677B7541B93437D3B41629B X-Proofpoint-Spam-Info: AW1haW4tMjYwOTA5MDA5NCBTYWx0ZWRfX3M+dTCNkPXPU aAYmJuGYyW/cPekdwQJNXTrqCjZ7AQ0Yh+4pVF1f0UK/U/zLEtXgJb283N8RAyL9ZS6Yr2gPKOI H+W9cr40enJo5GIft98VGijuTrMtAJY= X-Proofpoint-ORIG-GUID: CubeCxt9z_FK-WBn3-65tfF-YMzuyTif X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwOTA5MDA5NCBTYWx0ZWRfXywqd6hstnL0S JsNAp7a5J0Yxt84thk2NoQZ0EXCAwMxk4qN1W4icQPPk30+lBZutp4XiL+EV1p1oQbMOFXVm12c a77Bwwvj47r3Kr/JGKWP/nh6j2nF1Gs/bFzHwh4xCtI9AVStMozOVNX9ByjLkMDayBxnKf6y17x LZ1+Ly49Yr0+0feGPB5qwd7Jd663HaJ+ckr+bad58xTMVgRoQ3uPWA7Nu/pgN6faDUcSa1ph3D3 uW9MH63xmmGAS8//ANKVplS7Rs5Yh3pl93fVlcFXBsxjZ+78LP/pmXbPZU4q2dex21+XRVqTbdl g8gh2NMmyfuKNqStBZ63KXH7VnBph74BlMej9Tn6XvwY19aLwkAaB0Xa4f0lmOvcSkWf2JF1dpS NkLNNTpzOkRYBXVWiEqIXu90Uj36RzXp7mBezJqxrc+9PaDu/fFigKc/pPDe2eOOevc0e1YhkCu 9fNUi3A+AimlVY1zWdg== X-Authority-Analysis: v=2.4 cv=Xey5Co55 c=1 sm=1 tr=0 ts=6aa11a77 cx=c_pps a=qKBjSQ1v91RyAK45QCPf5w==:117 a=+bKQE0WJfmhK2875HamI0Q==:17 a=IkcTkHD0fZMA:10 a=VdqzKS8jKosA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=gowsoOTTUOVcmtlkKump:22 a=EUspDBNiAAAA:8 a=3nWb1Bopbj9nUPZVt68A:9 a=QEXdDO2ut3YA:10 a=NFOGd7dJGGMPyQGDc5-O:22 X-Proofpoint-GUID: CubeCxt9z_FK-WBn3-65tfF-YMzuyTif X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.134,FMLib:17.12.100.49 definitions=2026-09-08_03,2026-09-08_03,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 malwarescore=0 spamscore=0 lowpriorityscore=0 bulkscore=0 phishscore=0 priorityscore=1501 impostorscore=0 suspectscore=0 adultscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606150000 definitions=main-2609090094 Stripping a comment from a line to get the code leads trailing whitespace (e.g. in a line like "enable-active-high; /* comment */") which will break DtsLine.code.endswith() checks. Signed-off-by: Krzysztof Kozlowski --- scripts/dtc/dt-check-style | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/dtc/dt-check-style b/scripts/dtc/dt-check-style index 2ff9fdc50367..b10e30f9d5b9 100755 --- a/scripts/dtc/dt-check-style +++ b/scripts/dtc/dt-check-style @@ -91,7 +91,8 @@ class DtsLine: self.indent_str =3D indent_str # leading whitespace as-is self.depth =3D depth self.stripped =3D stripped # Code without indentation - self.code =3D _strip_strings_and_comments(stripped) # Only the = code, skipping trailing comments + # Only the code, skipping trailing comments and space between code= and trailing comment + self.code =3D _strip_strings_and_comments(stripped).rstrip() self.is_root =3D is_root self.prop_name =3D None self.continuations =3D [] --=20 2.53.0 From nobody Fri Sep 25 19:20:31 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 1939447DFBD for ; Wed, 9 Sep 2026 08:36:10 +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=1788942973; cv=none; b=ljP+I9m9x5G/Pq078HqjJUY1bNDpebSkqXmkPR2v1EjL2bfy3+rswR/+fX+7Eqi5jM2kAe4RxF4zKxRDALf48rhe3DGHTI4GJHBPnPtO2dEaPWMwbdq9G5GRBfsGfad56wY23B2rlqlJgVwubz1JBsfsrTt9othe/1msUgPe1No= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788942973; c=relaxed/simple; bh=a5Ll65DQL/M59r5nNeLh7x1BtJXBfuJyRxs44gn+Yao=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=YU4579AlHKEnN+yCuWR0NhU4EQ8kJRUQCaZJrYsgsl0/4A/Dns9IoE/wQ1OdZOqxoLdEqSI5vgQt84WMvQnrr/sc+ZOx9gpA/V1djsgb+pnpTVq3qycrgdFc+PMrCIesiUABDZRj+Gd4NEHBho1iaE0yPleQ7AXos5CDs+tS/Vo= 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=nU8W+t1M; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=PfAJbNvJ; 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="nU8W+t1M"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="PfAJbNvJ" 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 6896edZq131192 for ; Wed, 9 Sep 2026 08:36:10 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= hk1PTahrJKUV4aq/e/3rFwDxJr+19SkoWjJe/cVir0c=; b=nU8W+t1Mvv+j6DYx N6K+JUpSstSm2WXtxqGVlCct1XQuk+bcrOdHViz1V+9fVsS+yFyWZyMNpuYODZ83 yStkpVxoIMlNSelnEX21khdhwLgCm74OoTIb7ZdAN+PZzegVKxCLVxpDOKbRqC5m sIoSek7l2hJVWpTaHpwuIHunR8N5115MSitWI5SStlxUgE2U51K24pz5JimJTGKk H/RTOXF3EbaFcwtdwQHZJQvsxrmX9UyeM3I+K0NkG3/48hRH7u70Ovgg/UI8Izye Xf2Sl0JOwr3hoFDxB71tJ5nKJvmrq4BVe0Z2MPaHdpoS1Xes68djsslvpTrcIRGC 87FKRw== Received: from mail-qk1-f197.google.com (mail-qk1-f197.google.com [209.85.222.197]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4gjntpkk8y-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Wed, 09 Sep 2026 08:36:09 +0000 (GMT) Received: by mail-qk1-f197.google.com with SMTP id af79cd13be357-9394ad7f64aso867883585a.3 for ; Wed, 09 Sep 2026 01:36:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1788942969; x=1789547769; 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=hk1PTahrJKUV4aq/e/3rFwDxJr+19SkoWjJe/cVir0c=; b=PfAJbNvJkzVpgR9gOfxUNTLrHs2zYs0tDj253wyDIUac+HArrv22UVfCVtsbzwKigf oLyaji/GVqVvLLQ9ZAcCBXjWzmVkWgw7rhcI8wpDtk9mQzyQBjk7N3cjmpooOHUVrh3g /edGtcohAVOZUpzcbM9ber41iNk8mwwlL79fwRQrvXYj8vEbep2IKIjRK+khXPbgSfhw My4CdOlK/Z4r86KL6GPj7YLiJyf2Q8M04bb1fwFcIOQgXmGrTzNzc9uPEizPKFEdWB1c +3jUlCn0QRBgPCuk1J0B7X2dXqaIpCTwWAh4aORJjP1WrVSlmJo7d1qcHZR90ZEEqpyY KqIg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1788942969; x=1789547769; 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=hk1PTahrJKUV4aq/e/3rFwDxJr+19SkoWjJe/cVir0c=; b=J+l5J0lfQ1HY03AW73G+cPrMdJmg0WUAa5pxQDXehD7XSvGuax8ddGVXvyizah+woZ vhlVvDjv+E83TrrAUteuyQHLFkFJ89KlTbw0UlSuLHgKO0KdltMrT8/8ozbMQNQSqOCa DmWvFNHVb8TYFmCg526ShxxaXNFciNpGTvw7NuXx9UCEqVEc0I21h/75ZsLZEu9WDNjA 3eOQhUtlsVsl12VpX9v/gBLIbQ0aknyzIWg/anZU3r/5Lj4w5SDvM2BsP0cokfXX7PtR 3JaVV3XVblpp0cjxIzk2gEToAaHGBydJfkY8vCaU6c8cCPW8jT2CWyT6ScKKu5tvJcJI +C+A== X-Forwarded-Encrypted: i=1; AKwUvBxvuLFTbKjJW0vVsU0pTJUCSYWJzNJlAvBEFka4lNZ+lxF1TVbXA8bsaafg4PRSvg2P1kVVxdbiPpaowIk=@vger.kernel.org X-Gm-Message-State: AFuF++lSXfaEIxws5XUysI/L6buZ9RUl3akPd+4U37yecDJ8vwQdkPg7 fc6JMuj00wg4JLXir8kuewSrY1OY/JU7QMv1hm0lwAYR8sEUesywGyKHDUobe4VczVa2J/ifA7q INSCDu70kohW0oHz7KmkkzXckw/ZRvhfYh4mVybpOHIbIX3Hgq9UwSxppToSzWBvmtIM= X-Gm-Gg: AYBFou2wwkWtuheWkQa8eC3hbLb+GzglIEVx8UdETRbrsduf91QrGcp5xZDLl7NMZsM TSM3AE/RLtFNZgTSkslVjnHjeYbQdQCqyaRAJClaiDdxhIUn5xIVE3ZrHjYaebI9YVAfVl9Kj4H WQjwqPMu0tj6kjL4PcIvTvWUN9Gm+lOSVhfTMr/e4+X9YM+cpJsrDTl5vMpTPgEA/TCdIgQJwB6 o+/Z6WOno0Sjek0vv0v3FDnJ83dHsUtCkx6vipzWM97RqacIA+rJTXcyQ56dP8dux+EQRdvz/bI V8grmdciIfR8jpFxX1suwXNYwE3R7BXd8QE4su+GHab/ix9yBfEvd8REDlxxoaBYJtXwF+ubq0/ oFFCY5al0fhB6rq0IDWU5Ogs= X-Received: by 2002:a05:620a:2d85:b0:939:6de6:9516 with SMTP id af79cd13be357-93980485f20mr2838183185a.45.1788942968995; Wed, 09 Sep 2026 01:36:08 -0700 (PDT) X-Received: by 2002:a05:620a:2d85:b0:939:6de6:9516 with SMTP id af79cd13be357-93980485f20mr2838179185a.45.1788942968417; Wed, 09 Sep 2026 01:36:08 -0700 (PDT) Received: from [127.0.1.1] ([178.197.219.214]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-485885bfdf6sm43210269f8f.34.2026.09.09.01.36.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Sep 2026 01:36:07 -0700 (PDT) From: Krzysztof Kozlowski Date: Wed, 09 Sep 2026 10:35:49 +0200 Subject: [PATCH v2 6/6] dtc: dt-check-style: Properly detect comments in multi-line 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: <20260909-b4-dts-style-checker-continued-lines-v2-6-c5cb4c9d9b66@oss.qualcomm.com> References: <20260909-b4-dts-style-checker-continued-lines-v2-0-c5cb4c9d9b66@oss.qualcomm.com> In-Reply-To: <20260909-b4-dts-style-checker-continued-lines-v2-0-c5cb4c9d9b66@oss.qualcomm.com> To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Saravana Kannan Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Krzysztof Kozlowski X-Mailer: b4 0.16.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=8587; i=krzysztof.kozlowski@oss.qualcomm.com; h=from:subject:message-id; bh=a5Ll65DQL/M59r5nNeLh7x1BtJXBfuJyRxs44gn+Yao=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBqoRpqTl+v2/Op7V2CKTCHexcHj7Nbn+grxaq7+ XrvJaQRfz+JAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCaqEaagAKCRDBN2bmhouD 13VWD/4vtUQ4eKPAA5NZ1M5vBgU0Mgc4nmKvH1Vhc7kBWWXYh2yssO4Tu/OmRrRjatwpD51AxB8 yWyx6Yjb/Zo3iOez9pbYAIJv5Ua4SMZtKf1hPJQGGhyT0kwzwjhKuyrSP/t+DwOZ/LDbiPbAdQe pAAQQ2/TThCQlx+tT01oW1Uoi9dVfTGsPoRCrZm3xXAfLTfcgHYUkwhcLGd4Xa+0XEjjLSquWwY QUKhE0AU96D4GZAzIfHcE/BJChanxJQM8sESGaBCEbaZtR0aTqiG1DhiYt3VuQSBmrReP0Iyuft dJhVMH2N0rUvtcgSggSInb6Uithb0emF6lRg1mTuRxyY9z6iuI5VtvEeoYvx/S4JWkcu6EN46sA rYdTKag16swwGN1/L4I7y1qngAzHBMEEiaZs4YHgF3Kogmapd7FLl1QOU3k+tNxiocyNaqtdMZ6 4jdOWmWGF2dAF5B+jJJzdqbN4ukXc2IarhlqsVdECu3Y2ohzkuEBLBBRxcHcJadrrnEsWYEhTwk A+X1o8CfKeeosRUvimATcpg3LYyCewRjpgvahNTuC4+uLwC4/7P8C3WDQGM08JbC9rb4J16tkjQ GNSuY4Y9kCxx5oUqN6Z6EgFx4VSCYazoSvYSJUrS262NvVyeDPH1IKRHC90qF49NkLXOyVrne81 /vXTGnIZQXzwzOQ== X-Developer-Key: i=krzysztof.kozlowski@oss.qualcomm.com; a=openpgp; fpr=9BD07E0E0C51F8D59677B7541B93437D3B41629B X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwOTA5MDA5NCBTYWx0ZWRfX/kygOGr0DJgm SAmcPwlQqrUypmBMWBMktpscef+u6DysR86il/HTF/z6XtqDTzPrJ9eAkoGl2dcw5ZHaVtPNcx6 KSljYRHvVeU/L4lI16NVnZeeBEFqPKENwlumfvOw2zM8knrdmPvyOB4VD6E2AoxsXiIVuVIEHUk /YEZwmsIkaWmlxA20AU9RxuE+VB2XQ3Px+x3ScbJXw4Le1Zgq+QHO1lcNnUcZA/Py6j11xR+bYq ZnVkVF3u7olA+/wtmZCgX/78v4drTov+VohVuWw4+XYgKkp8fbfIlb0UJOh39Mu8yoPVpagTYRI OCU1+gzGp4i+b6uC8XBHMrCgw9AfnESoRHaprWfzL05WSmlpiHvgtKG4dPpi1tONdovxktMMBcG czeiGRPmhcLV6hyovEwgCkk5zoxDdc+UQb+ERWfqtiu9qpK9OBWXCr5YukBOtJrL4mfYrw6jmSq zyt42kewysO2+QaKtrg== X-Authority-Analysis: v=2.4 cv=N+AZ0W9B c=1 sm=1 tr=0 ts=6aa11a79 cx=c_pps a=50t2pK5VMbmlHzFWWp8p/g==:117 a=+bKQE0WJfmhK2875HamI0Q==:17 a=IkcTkHD0fZMA:10 a=VdqzKS8jKosA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=rJkE3RaqiGZ5pbrm-msn:22 a=EUspDBNiAAAA:8 a=Y8AG2edEbfE3NdgbFfYA:9 a=QEXdDO2ut3YA:10 a=IoWCM6iH3mJn3m4BftBB:22 X-Proofpoint-ORIG-GUID: ke3ZP5VYYuNTSybXwWjkK_N17QUuuTrO X-Proofpoint-Spam-Info: AW1haW4tMjYwOTA5MDA5NCBTYWx0ZWRfX09sNdF3sgseL kkmQmx5dxHnu2H8nH99fQUmESd1BTuIHIYHpc5EEmIF280QYJhq8vbg+CkD0S9xvFSVkGKaDTG7 dbf7E2tdfuLsvaKRMIGl6e6TDyfls5E= X-Proofpoint-GUID: ke3ZP5VYYuNTSybXwWjkK_N17QUuuTrO X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.134,FMLib:17.12.100.49 definitions=2026-09-08_03,2026-09-08_03,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 lowpriorityscore=0 priorityscore=1501 suspectscore=0 clxscore=1015 impostorscore=0 bulkscore=0 malwarescore=0 spamscore=0 adultscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606150000 definitions=main-2609090094 Code classifying given line exits on first condition match, thus a line consisting only of a comment in a continued (multi-line) property, like: interrupts =3D , /* Performance counter interrupts */ ; was treated as a comment-line line, not as continuation, leading to false positive warnings of invalid indentation: arch/arm64/boot/dts/tesla/fsd.dtsi:456: [indent-consistent] indent mismat= ch (expected depth 3 * '\t') This needs two related fixes: 1. Move the judgment as a LineType.CONTINUATION earlier before one classifying as a comment 2. Check the comment-stripped DtsLine.code, not DtsLine.stripped, to verify if it is a continuation. Signed-off-by: Krzysztof Kozlowski --- scripts/dtc/dt-check-style | 19 ++++++++++-----= ---- scripts/dtc/dt-style-selftest/bad/dts-cont-align.dts | 1 + .../dtc/dt-style-selftest/bad/yaml-cont-align.yaml | 1 + .../dt-style-selftest/expected/dts-cont-align.dts.txt | 11 ++++++----- .../expected/yaml-cont-align.yaml.txt | 3 ++- scripts/dtc/dt-style-selftest/good/dts-cont-align.dts | 1 + .../dtc/dt-style-selftest/good/yaml-cont-align.yaml | 1 + 7 files changed, 22 insertions(+), 15 deletions(-) diff --git a/scripts/dtc/dt-check-style b/scripts/dtc/dt-check-style index b10e30f9d5b9..9fcb2eeaf7fe 100755 --- a/scripts/dtc/dt-check-style +++ b/scripts/dtc/dt-check-style @@ -202,6 +202,14 @@ def classify_lines(text): if opens_block: in_block_comment =3D True =20 + if not prev_complete: + dl =3D DtsLine(i, raw, LineType.CONTINUATION, depth, indent_st= r, code) + out.append(dl) + prev_complete =3D (code.endswith(';') or + code.endswith('{') or + code.endswith('};')) + continue + # Pure-comment line: nothing left after stripping. Classify as # COMMENT_START (carries to next line) or COMMENT, and skip the # structural classification entirely. @@ -211,14 +219,6 @@ def classify_lines(text): out.append(dl) continue =20 - if not prev_complete: - dl =3D DtsLine(i, raw, LineType.CONTINUATION, depth, indent_st= r, code) - out.append(dl) - prev_complete =3D (code.endswith(';') or - code.endswith('{') or - code.endswith('};')) - continue - # NODE_CLOSE: the canonical form is "}" or "};" alone. A line # that is nothing but closures (e.g. "}; };") is still treated # as NODE_CLOSE for depth tracking, but the multi-closure case @@ -545,7 +545,8 @@ def check_continuation_alignment(ctx): 'continuation should align to column %d ' '(%s)' % (target_col + target_offset + 1, err_msg_e= xplanation)) # Align to the value within <> or "" of continuation (so the p= revious line) - dl_value_complete =3D cont.stripped.endswith('",') or cont.str= ipped.endswith('>,') + if len(cont.code): + dl_value_complete =3D cont.code.endswith('",') or cont.cod= e.endswith('>,') =20 =20 def _check_hex_case(dl): diff --git a/scripts/dtc/dt-style-selftest/bad/dts-cont-align.dts b/scripts= /dtc/dt-style-selftest/bad/dts-cont-align.dts index 5390ebbf4059..91a74887c774 100644 --- a/scripts/dtc/dt-style-selftest/bad/dts-cont-align.dts +++ b/scripts/dtc/dt-style-selftest/bad/dts-cont-align.dts @@ -11,6 +11,7 @@ interrupt-controller@10000 { reg =3D <0x10000 0x1000>; clocks =3D <1 2 3>, /* comments with " < , should not matter */ <4 5 6>, + /* but comments should be placed properly */ <7 8 9>; interrupts =3D <1 2 3>, /* comments with " < , should not ... */ <4 5 6>, 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 a5a9eb17fc17..0189b654a5b0 100644 --- a/scripts/dtc/dt-style-selftest/bad/yaml-cont-align.yaml +++ b/scripts/dtc/dt-style-selftest/bad/yaml-cont-align.yaml @@ -27,6 +27,7 @@ examples: compatible =3D "example,test-cont-align"; reg =3D <0x1000 0x100>, /* comments with " < , should not matter */ <0x2000 0x100>, /* comments with " < , should not matter */ + /* but comments should be placed properly */ <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 index a7ed62677a2b..fd7f389d6cce 100644 --- a/scripts/dtc/dt-style-selftest/expected/dts-cont-align.dts.txt +++ b/scripts/dtc/dt-style-selftest/expected/dts-cont-align.dts.txt @@ -1,10 +1,11 @@ # mode=3Dstrict bad/dts-cont-align.dts:13: [continuation-alignment] continuation should al= ign to column 26 (to < or ") bad/dts-cont-align.dts:14: [continuation-alignment] continuation should al= ign to column 26 (to < or ") -bad/dts-cont-align.dts:16: [continuation-alignment] continuation should al= ign to column 30 (to < or ") +bad/dts-cont-align.dts:15: [continuation-alignment] continuation should al= ign to column 26 (to < or ") bad/dts-cont-align.dts:17: [continuation-alignment] continuation should al= ign to column 30 (to < or ") -bad/dts-cont-align.dts:19: [continuation-alignment] continuation should al= ign to column 27 (to the value under <) -bad/dts-cont-align.dts:20: [continuation-alignment] continuation should al= ign to column 26 (to < or ") -bad/dts-cont-align.dts:21: [continuation-alignment] continuation should al= ign to column 27 (to the value under <) -bad/dts-cont-align.dts:23: [continuation-alignment] continuation should al= ign to column 38 (to < or ") +bad/dts-cont-align.dts:18: [continuation-alignment] continuation should al= ign to column 30 (to < or ") +bad/dts-cont-align.dts:20: [continuation-alignment] continuation should al= ign to column 27 (to the value under <) +bad/dts-cont-align.dts:21: [continuation-alignment] continuation should al= ign to column 26 (to < or ") +bad/dts-cont-align.dts:22: [continuation-alignment] continuation should al= ign to column 27 (to the value under <) bad/dts-cont-align.dts:24: [continuation-alignment] continuation should al= ign to column 38 (to < or ") +bad/dts-cont-align.dts:25: [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 eb9a84d5c222..9e98c28867aa 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,3 +1,4 @@ # mode=3Dstrict 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 <) +bad/yaml-cont-align.yaml:30: example 0 [continuation-alignment] continuati= on should align to column 11 (to < or ") +bad/yaml-cont-align.yaml:32: example 0 [continuation-alignment] continuati= on 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 b52ee6cccd8c..e6450a1d8209 100644 --- a/scripts/dtc/dt-style-selftest/good/dts-cont-align.dts +++ b/scripts/dtc/dt-style-selftest/good/dts-cont-align.dts @@ -17,6 +17,7 @@ interrupt-controller@10000 { reg =3D <0x10000 0x1000>; interrupts =3D <1 2 3>, /* comments with " < , should not ... */ <4 5 6>, + /* but comments should be placed properly */ <7 8 9>; pinmux =3D <0x01 0x02>, diff --git a/scripts/dtc/dt-style-selftest/good/yaml-cont-align.yaml b/scri= pts/dtc/dt-style-selftest/good/yaml-cont-align.yaml index 8463075f9f4c..4a5b5ad43ee8 100644 --- a/scripts/dtc/dt-style-selftest/good/yaml-cont-align.yaml +++ b/scripts/dtc/dt-style-selftest/good/yaml-cont-align.yaml @@ -27,6 +27,7 @@ examples: compatible =3D "example,test-cont-align"; reg =3D <0x1000 0x100>, <0x2000 0x100>, + /* but comments should be placed properly */ <0x3000 0x100>; }; --=20 2.53.0