From nobody Sat Sep 26 21:14:38 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 4618B416D1A for ; Sat, 29 Aug 2026 19:53:39 +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=1788033220; cv=none; b=sfw4PVXV8YiZfpV+2TJ7LiTQ38I6sVU79cafHZEnP78OOJBqECgn0SIeATHa3zKOg2j/U4xAcSfAMQRv2lTRec/2AQ/Fa+V+/xPftKKRgXc1A5aIZNddKpQNoAR3ZlLxJBM5gPlCqsL3QNgtHr7M33rsIqJcIMi0CnqaxuHONho= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788033220; c=relaxed/simple; bh=isuqhP8+OaULPc9jjYiOY5JsnRD/wGRbFJWL8Im3RVc=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=k17OyoECgD+7ROS1qFTfDQrzby7XSbRtrkoScdJefov8wRmT2osflcT/cJV3W+QLkpJP3qyFzkpCLb3Q5kK5n5oZPscaaJef0Y0lbfHBZ2jOLsd9vmdGf9740JlYduBZ+1o6rrBZMMJ40QMCYv4reRWAwBbtPjhzrK/ov6gF++w= 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=l2w8msHj; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=e+wYBaZE; 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="l2w8msHj"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="e+wYBaZE" 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 67TJktZ22799972 for ; Sat, 29 Aug 2026 19:53:38 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= okPqt7QLBVpqv61RtFochhp3Vo2DJbdu6ToGavr+pK0=; b=l2w8msHjPYocOwcQ tf8JXU2bPIWQ0GwDYUzYpz7fJCcMxRoVXvDdI8cOm9nTFn2oxActlPtOtIVtnWfO LjLJo0w3WCMg7lzBENeRTArCGpCQiorv2ZEhZxjjkMKANUtVady93CNFWW9U0nyW PGC0aASyrj4ROS7acOK4k2KR2Lk3TJV8y0HsMTQau0FOxhmMC2yboFIw/nBxgz44 hXIoet8ZAQQjxPFmT8IHdFfwgzG7UqkEfSL2WCSM1K/dTM9tUX7q+fYAQpW70nJA t9BnGcALZ0FFF5lM8xEdXTvbVCs+d9+RPkj6SHL8/a5qMhwFToU127qsMugYiq+B SfVMQA== 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 4gbqhw9pnn-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Sat, 29 Aug 2026 19:53:37 +0000 (GMT) Received: by mail-qt1-f199.google.com with SMTP id d75a77b69052e-530006c6d43so6633111cf.2 for ; Sat, 29 Aug 2026 12:53:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1788033217; x=1788638017; 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=okPqt7QLBVpqv61RtFochhp3Vo2DJbdu6ToGavr+pK0=; b=e+wYBaZEgvhmdH6JpphLLnNwL0DIpctI1B2yF/g65PeIuL4vnzPOChRRqx0Hdm7Met iwq2nDOYaVsX/w1wca8RnPdRZziEDB45a4JSXMKTyF0FMpXV1PK89hPIopSnJX1uKRMy /274526pb9sZtSFWbJE5tOGva0dMGtM3GQ8uggqGpM4EfbucYNPSkl9KEjMdULNZOHaG aqvGmya/DNUgG3jrD/0falJfVk4ynwjvA1OlSpJAb9QbFwOptSUO4DCyZOoqNyAwy7xE iFpwxM1BjC33NRFpisK8CH5lgLk4f7BYjNWA0LrNUEICNlX0AVe38bS2B1jdo3p+4hzT +b8A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1788033217; x=1788638017; 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=okPqt7QLBVpqv61RtFochhp3Vo2DJbdu6ToGavr+pK0=; b=d41nP34JiWwQh1FMpMDS1pYiFtqbQ6Y8v1R8lUq3UaDzrj+q7+eW8fYogWSje1BCp5 Tzcbt31+uvxnd1hJOrz/teAUgUs1lcUYKGH4vxaQfBwG28ApTchZ284nPhQ+z7YKxO02 x3quLSYoE+J1OdtskFwp7HdIB8XGU9r1fLmSbCPeloouHw+hLH5Px1z4vUq4Sk44MQLM LtQTSbjgWVGKWkmg9SGd/vFiuDsJevKD03hVrYX8gg+XeQfX+5Ky/VfvOAkHuOqT2V2m F3s0PaCp/1ZrtBVFg6DBFKqjKVb6Gp4/Q3c5SKr6sst48qf1S35uakeBJ+9eIQue+lUF gZTQ== X-Forwarded-Encrypted: i=1; AHgh+RpJSxBKSeIievY1on8Wq2kABIrduuRVYayvgEG9UxzxR7p057san4EDEzZUtBVkyT64LyzZz4+Q0inzPmg=@vger.kernel.org X-Gm-Message-State: AFuF++ntMbwEGUD/xD8laIaCkDquj1xZW5inXYOQLPkB0bf9QenE+gOX NSuC4U2Nso/RiDjQqBmv9pnL9D6M8iqJLrvSTvhPhPnKVf2oXWFVOZdr7ofH/0woo/b+j48lzPZ YP/o95+8w4v5L2cKeK3JCcP4kUSWoxualio4Qjywhh8AQ9eCV/eXonLPXjW+Ocj0yWeI= X-Gm-Gg: AR+sD11+7w5gieuqaKbb/E0KJUo0UiJ6b67aUEYNku+XDSe0cz09BRMNvBH1Yz6tuTX CghvDfRgZOj+NTTXyTbEoOxkJx+1HFoliGo2kkr4HQLPlv4bHis1Wgd4HxnnSmWcIHxaMIDvI4E KelGupnD4qWxCVuG1ic6RZF4Ga4NkGlrFM7+4YXlCCHGwMMJ8fTc8viNut2RiOdY3xrJ3NaDkg5 d4hJ5Ix7rIfxjTjxjkCAvX84EIciuSz7GabpO7O/WuB4meZH06Fdldhe+UddHRu/V3qE5v9S8Mf rARMawkimJ6LZ6++cDBLr32b+/ZO/wf/AHyXiKMMbFz+JnBI+qtj7pb+9pfPSlE+kxWe2YSsDlH 204EzXZYI6kN8wS23uWRoQBg= X-Received: by 2002:ac8:7e90:0:b0:51c:15bb:b4f2 with SMTP id d75a77b69052e-52fb96d371cmr191374141cf.27.1788033217292; Sat, 29 Aug 2026 12:53:37 -0700 (PDT) X-Received: by 2002:ac8:7e90:0:b0:51c:15bb:b4f2 with SMTP id d75a77b69052e-52fb96d371cmr191373731cf.27.1788033216807; Sat, 29 Aug 2026 12:53:36 -0700 (PDT) Received: from [127.0.1.1] ([178.197.219.214]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-482fbb32d30sm12446343f8f.34.2026.08.29.12.53.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 29 Aug 2026 12:53:35 -0700 (PDT) From: Krzysztof Kozlowski Date: Sat, 29 Aug 2026 21:53:17 +0200 Subject: [PATCH 1/6] dtc: dt-check-style: Sort rule directory by name 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: <20260829-dts-style-checker-sort-v1-1-6693a37d7ae1@oss.qualcomm.com> References: <20260829-dts-style-checker-sort-v1-0-6693a37d7ae1@oss.qualcomm.com> In-Reply-To: <20260829-dts-style-checker-sort-v1-0-6693a37d7ae1@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=7253; i=krzysztof.kozlowski@oss.qualcomm.com; h=from:subject:message-id; bh=isuqhP8+OaULPc9jjYiOY5JsnRD/wGRbFJWL8Im3RVc=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBqkzizxy/7a822ZRnQTBPkNX0RcLMwd3uXADLEZ 4RIo60xfgmJAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCapM4swAKCRDBN2bmhouD 189UD/4mUGK85SbHbRiU2g7JAZ3O3Q9t/x7U4x/gKdVJK5MsV3cdyIibFfNjlknoK5aktotTamg LTax8dBpIv/VLdh0RSLCzkP+4EoENwMxfOT1Qk9sK78Jf6rO7PLTBx3s3YnvVnEkqaG7KmACFs7 dpfbVBQ4GMa5fI2QGJWVZ+djgX0isloib6/5cCIub4eyJFtWYhq9T+IANyMNck0miEB2QNa15Wx z7N9auBQtnLymWy6SV5BtsRFkx/UEkmhJKcUcpNnWdkUGpEaRAS7gh86cf9iR6KafnfwNzbwHxJ WXoY0/zP+79/v7pkH1qTKtIlFPg6FaWKecNfQMPxC+a0btwyeCy9ky8VzGfIL4Qmw4s43nOGSoI W5PiV/L+e3Cg9zmAG37FVvTIhyzK3iZDQ7tWaWK/Lx4BHKx5t8RWmwiKLf3KUj1lHv2B0RMeaGi 2/DAqRZsYzTD+RQN2q7ArCONDV+GNOq/NdLlilbk/4k7XOe4ryaYjBrlmLzR5HznWDs/WawKQNf 12809v6PK9illn8vPf0s9Rp4kyjEZnplpvY3biqtHAjasEnAriLEgOfHPTzs/qdXgVbD2m31SWY BlmKO0IVZhU1maR8uU3qL35ge+BxZeTcnWXd4Lkp2DW4GtPtDKsshkWkjpXAFv+ZL59L38EhJwo 7MaXNWNPdHVR1KA== X-Developer-Key: i=krzysztof.kozlowski@oss.qualcomm.com; a=openpgp; fpr=9BD07E0E0C51F8D59677B7541B93437D3B41629B X-Proofpoint-GUID: 7QBChDpPhGSWFSQI_jrHprDrvQHATaLV X-Proofpoint-ORIG-GUID: 7QBChDpPhGSWFSQI_jrHprDrvQHATaLV X-Proofpoint-Spam-Info: AW1haW4tMjYwODI5MDE3MiBTYWx0ZWRfX7alwNe/e439w 2ryHUxHXdkTCqtJcACWZxinsUhMfVHluGtJWKqWM4dm3uuno9Z6Of6qlR7sMhqdQXWj3NwgJ/cu gp2cRV52zVX4WbM7DMvFnlww9Ns7vSw= X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwODI5MDE3MiBTYWx0ZWRfX8PdLKXFPThJK ip1ayEzi3rgdSU/tt2S1RoWNFjGBcVjhSVr7gcaxb1I3GWKJNWSFYsK+Xg4RUBz8duq4fJalhjF eVUFrs7muf6t2+hjIj/d6/ZryInrvM/X/DbSTv5JU0zuyVtfIQjRwBnR/tdUbU1Alg32t6Rp4uU q7yLLd7mFqaQYoCQjVt/8CoYddJHAYBLS53uUTkl07y60X1iADEHlEJ5HWcEi7bIpjdnz73LSn5 kwlWOLMGBbC2I7g1Jw6MjEoodbXKtFudhaTtZTLIvUOpBs41vtKtdm82uOtzaNKeBsNk65Mfbrz 6M/iRUPC5OUOHcP/6lJmWfcL5gwCxkSype35jO9hVn4LVmJ7pv+Xc4E2pDGpN4iDqaF/r85/ylk BecZdoqK7rM2KwlBFbjC/rm5fJk4diPfneycx9cKpvHUHwxRHOt7c7xx3IiC3H3EenVqKCZO145 VxIxPen0Ki4BeVIoE5Q== X-Authority-Analysis: v=2.4 cv=YKKvDxGx c=1 sm=1 tr=0 ts=6a9338c1 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=EUspDBNiAAAA:8 a=yqRInNeA9D87wOtwJ9MA:9 a=QEXdDO2ut3YA:10 a=kacYvNCVWA4VmyqE58fU:22 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.134,FMLib:17.12.100.49 definitions=2026-08-29_06,2026-08-27_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 adultscore=0 suspectscore=0 priorityscore=1501 phishscore=0 impostorscore=0 lowpriorityscore=0 spamscore=0 clxscore=1015 malwarescore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606150000 definitions=main-2608290172 Sort the array with all the rules, so managing this will be at bit easier and simultaneous addons of new rules less conflict-prone. No functional changes. Signed-off-by: Krzysztof Kozlowski --- scripts/dtc/dt-check-style | 95 +++++++++++++++++++++++-------------------= ---- 1 file changed, 48 insertions(+), 47 deletions(-) diff --git a/scripts/dtc/dt-check-style b/scripts/dtc/dt-check-style index 487e76b85105..49b5c28563eb 100755 --- a/scripts/dtc/dt-check-style +++ b/scripts/dtc/dt-check-style @@ -1036,22 +1036,7 @@ RULES =3D [ # 'relaxed' is the default; rules in this group must produce zero # output on a clean kernel tree (post the small prep-cleanup # commit at the head of this series). - 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',)), - Rule('mixed-indent-chars', 'relaxed', - 'indent must not mix tabs and spaces', - check_mixed_indent_chars, applies_to=3D('dts', 'dtsi', 'dtso')), - Rule('unclosed-block-comment', 'relaxed', - 'every /* block comment must close with */', - check_unclosed_block_comment), + # Rules are sorted here by group (relaxed, strict, stricter) and name =20 # DTS files always use tabs; this is not negotiable per kernel # coding style (.dts files are real source). Relaxed mode. @@ -1059,19 +1044,26 @@ RULES =3D [ 'DTS files: 1 tab per nesting level', check_indent_unit_dts, applies_to=3D('dts', 'dtsi', 'dtso')), + Rule('mixed-indent-chars', 'relaxed', + 'indent must not mix tabs and spaces', + check_mixed_indent_chars, applies_to=3D('dts', 'dtsi', 'dtso')), + # 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',)), + Rule('trailing-whitespace', 'relaxed', + 'no trailing whitespace on any line', + check_trailing_whitespace), + Rule('unclosed-block-comment', 'relaxed', + 'every /* block comment must close with */', + check_unclosed_block_comment), =20 # 'strict' rules are opt-in (e.g. for new submissions via # checkpatch.pl in a follow-up series). They flag many existing # files and can be promoted to relaxed once those are cleaned up. - Rule('indent-unit', 'strict', - 'YAML: 2 or 4 spaces per level', - check_indent_unit_relaxed, applies_to=3D('yaml',)), - Rule('indent-unit-strict', 'strict', - 'YAML: must be 4 spaces per level', - check_indent_unit_strict, applies_to=3D('yaml',)), - Rule('indent-consistent', 'strict', - 'every line indented at depth * unit', - check_indent_consistent), Rule('blank-lines', 'strict', 'no consecutive blanks; no blanks at node body edges', check_blank_lines), @@ -1081,37 +1073,43 @@ RULES =3D [ Rule('child-name-order', 'strict', 'unaddressed siblings must be in natural-sort name order', check_child_name_order), - Rule('property-order', 'strict', - 'canonical bucket + pairing + natural-sort order of properties', - check_property_order), - Rule('required-blank-lines', 'strict', - 'blank line before child nodes and before "status"', - check_required_blank_lines), + Rule('continuation-alignment', 'strict', + 'multi-line property continuations align under <, " or the value = under <', + check_continuation_alignment), Rule('hex-case', 'strict', 'hex literals must be lowercase', check_hex_case), - 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), - Rule('node-close-alone', 'strict', - 'closing brace must be on its own line', - check_node_close_alone), + Rule('indent-consistent', 'strict', + 'every line indented at depth * unit', + check_indent_consistent), + Rule('indent-unit', 'strict', + 'YAML: 2 or 4 spaces per level', + check_indent_unit_relaxed, applies_to=3D('yaml',)), + Rule('indent-unit-strict', 'strict', + 'YAML: must be 4 spaces per level', + check_indent_unit_strict, applies_to=3D('yaml',)), Rule('line-length', 'strict', 'lines must not exceed 80 columns', check_line_length, applies_to=3D('yaml',)), Rule('line-length-dts', 'stricter', 'lines must not exceed 80 columns', check_line_length, applies_to=3D('dts', 'dtsi', 'dtso')), - Rule('continuation-alignment', 'strict', - 'multi-line property continuations align under <, " or the value = under <', - check_continuation_alignment), + Rule('node-close-alone', 'strict', + 'closing brace must be on its own line', + check_node_close_alone), + Rule('property-order', 'strict', + 'canonical bucket + pairing + natural-sort order of properties', + check_property_order), + # See also check_redundant_whitespace() and check_value_whitespace() + Rule('redundant-whitespace-strict', 'strict', + 'no redundant whitespace within code', + check_redundant_whitespace_strict), + Rule('required-blank-lines', 'strict', + 'blank line before child nodes and before "status"', + check_required_blank_lines), + Rule('unit-address-format', 'strict', + 'unit addresses must be lowercase hex without leading zeros', + check_unit_address_format), Rule('unused-labels', 'strict', 'every label must be &-referenced in the same example/file ' '(skipped for .dtsi/.dtso since labels there are exported)', @@ -1120,6 +1118,9 @@ RULES =3D [ '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',)), + Rule('value-whitespace', 'strict', + 'no whitespace directly inside <...> brackets', + check_value_whitespace), ] =20 =20 --=20 2.53.0 From nobody Sat Sep 26 21:14:38 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 39C3E3F8250 for ; Sat, 29 Aug 2026 19:53:42 +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=1788033224; cv=none; b=Gg2xwNKSduhhWU3Ubeddaah0YgQywHG98Q2pcewMN+0c/wgNrRSfEBavyC4UvgUSc6sbWHkRcWVV7RvzsIwYj+LYwUB/lfbW/gso+kqdgq9FdEHZa2v1JOn3+/bCXhCvKlDpRJ0RPB/uOf/pclIqW/3k8Y3QTzXI+cF+SBPgnzs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788033224; c=relaxed/simple; bh=3D23pkruwVdjlWXcvI4IbBb/R1IKkVVvnVyarpPlI+M=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=PW0S7pcj7DQiwT5EiwQi3MW5o/mrSRHEBU+feer8peeYTGKY3KqLHEQLexxQpbVtc9XfBOebyUJUD/jQze1Ugy4cmSI2cLk1AHkCttc3Q6rxQDqeWTEvaRCu/DTUanrHJ7fr6a7aZmtaE6Zz6NWS/O36Q/ER4dvtzj7r0IPDgBA= 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=mv/+Wr2C; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=VIt7DBfM; 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="mv/+Wr2C"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="VIt7DBfM" Received: from pps.filterd (m0279862.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 67TJkcaL2196479 for ; Sat, 29 Aug 2026 19:53: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= OBfa2YKDANgkRg0aGIM/I1Kyr4RJbFdYeKfNGHAAmpQ=; b=mv/+Wr2Cljb2KFAR RjzDTi6mlPrH68U7ejmX0gm2q91i20P7HEcF45lzwOZcOjVwo8pCYTWWiboDAwfu pEp1UWIsJN4E3tKmckblEVvi/CahItJ7BJvCDYUiA1nTpcsgXrqANsfiEQDDxXch xsPlzcRIwOnfH2NnPrChrr3baPYTkT41fDqjlrhnwnxoseYmZbgjl2kiBHwCoev/ Y0Y2nehfxK2XB7LNOgUcCoJNqnkfo7yndaP8IlJypzGSpagQSeor2bH4Lgv2tHRp RNdQGWmUNIfiOVVbS0UIz1nUf3ZZIeMlt6i8joNJYY+ffoqEUiAcL8UvM2KVCHMa l7HeOA== 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 4gbr6dsjsm-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Sat, 29 Aug 2026 19:53:40 +0000 (GMT) Received: by mail-qt1-f200.google.com with SMTP id d75a77b69052e-52fa5c5a4a6so50086661cf.0 for ; Sat, 29 Aug 2026 12:53:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1788033220; x=1788638020; 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=OBfa2YKDANgkRg0aGIM/I1Kyr4RJbFdYeKfNGHAAmpQ=; b=VIt7DBfMS/GBNmHeBlxtR5CFmUKNliG0T4J2PRHLceCyZKrnCTFWFXJHyUEBslEAbb sull0ISuwigSKQtRjlRKBdv0+KUDRS8rs4Dx115bT5adCZAVvpaThyoY2EsvwzxiUcra m8QTBSjOMwhTdv16nlFQPNRzHvzbi/ooSmynZ8jgxkZy2IbiELj71NVtt5o/PWNFuAku DiAepkPewbWIQBTD2+5y1oTWUx2aKdCHsmXPRzvRb8uZdy3/TNtAVLyLFAR3Uio7Nx45 RzrGLAll0Oz8WnhFOVpRnrcrhQUt8C7D5ddDWFvg7wnrh9zH+Q6kbisHEO6fVCjLEvZs eiMA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1788033220; x=1788638020; 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=OBfa2YKDANgkRg0aGIM/I1Kyr4RJbFdYeKfNGHAAmpQ=; b=X2orG3wn8rLg4NjwmbcbRk8TYdrx/NaDsjwzhGSGRdkPW1YdCrWgti/3XqphsJC6hI GdswSJX6XT5PYL3gHZVqYinDqYSJmXCPtUzux7pWE43Fon8mRttTXYJvFpeKhRw0U5/9 zY44hbjnPh2qJOf6uYicFy5Vuodyh2czMu8VCKF9thwrM75vwKZf8RRAZosuMotOaKc4 yNMz1xZjJKQmyrXHXaacd6c3bDLifhJzqAaC2wjjUTc7CSFE2CXH2uFxsvN9o2hnIez6 r8FxVTP03FkdMONK1ZQeNzLlBAWfWMzx+l/kaqJ6Z4b11XKbqLXuUMus1OI8l2TGAfjU ZpcA== X-Forwarded-Encrypted: i=1; AHgh+Ros9h3YxyVdewrXjVg+CEDeLz2aW1liMPupyAhAFoOIygiuQdZNJgv6ExPILSzoh4yTTV74ZXwVwV06d7c=@vger.kernel.org X-Gm-Message-State: AFuF++lzMgs6m79EriTDNgYgH94qUyZ+7xDubhcHC9fErGUyoLn51I1z wp7CODx7PyRXXigYQ1pdurX29YaZh/XJXenNhMsb3njmwq1+8zKnD2s93Fy87g8piynGQwmEw4z sA5WmwzPAjiz1Pmy3NYGzlnidQZx6d4NO23Vja+1ullID8YlOW3RC9m12NaMpLxFiP87uYH9IzV 8= X-Gm-Gg: AR+sD10nWEfidib+cdiDp7Bv9ice7qCIGv8j98bg/3+xbJTUaXKB+vRV0WHksrEmkh+ aDkq9cLG4gGGnLmuuMfVMIisUaK4TBJnU9LXXY0IB9lcWWM6VMB0iXj/TpFgtMcuZ7JxfRceqTE UtC13R3iE2tkEszNGS2pKrMvBOz3i213sF1CnGfe12Ta1u5BijucyHzVtHZuD7OqRkbbArpUOhc 9LFU5goKOmc+9mnPqVshG4rle2j3OKEA9sQzR9xncup8Aef5c53ecY6HG4mc7XrD697xMsKlE2r XL48McmzYu9D02G3YQXvWrvcgpZgfB96BejiKYIvZSmSzaYnDNxbU/BKXIOqSrrDk6QgWCTiWfM +BlVaz6f7MiksrYfDIlXlSZQ= X-Received: by 2002:a05:622a:e3d0:10b0:52f:fd65:d939 with SMTP id d75a77b69052e-52ffd65dcf0mr33364751cf.22.1788033219514; Sat, 29 Aug 2026 12:53:39 -0700 (PDT) X-Received: by 2002:a05:622a:e3d0:10b0:52f:fd65:d939 with SMTP id d75a77b69052e-52ffd65dcf0mr33364391cf.22.1788033218834; Sat, 29 Aug 2026 12:53:38 -0700 (PDT) Received: from [127.0.1.1] ([178.197.219.214]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-482fbb32d30sm12446343f8f.34.2026.08.29.12.53.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 29 Aug 2026 12:53:38 -0700 (PDT) From: Krzysztof Kozlowski Date: Sat, 29 Aug 2026 21:53:18 +0200 Subject: [PATCH 2/6] dtc: dt-check-style: Sort rule functions by name 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: <20260829-dts-style-checker-sort-v1-2-6693a37d7ae1@oss.qualcomm.com> References: <20260829-dts-style-checker-sort-v1-0-6693a37d7ae1@oss.qualcomm.com> In-Reply-To: <20260829-dts-style-checker-sort-v1-0-6693a37d7ae1@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=28485; i=krzysztof.kozlowski@oss.qualcomm.com; h=from:subject:message-id; bh=3D23pkruwVdjlWXcvI4IbBb/R1IKkVVvnVyarpPlI+M=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBqkzi0a59a889rpZkJp5cnFoxlST+fE1GujDmhN xsp62BksSuJAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCapM4tAAKCRDBN2bmhouD 17Y8D/wMCfl5dOLSYHAsdgx71Tfxgd1svmgEnFoAnLEMHe2Mc6VR6yBpI2LjCprzU4cdofSwkpk 4is3DMscUzUvzGTph/b0TjB1+P7LA6fnEMXids/tTVhcakmD7vru9Rm1gQXY44+UC2Avmq47UPb aVYqL4EcCJDGfWzMfjbf/GSfJXOrdE6+tkyGFPzIwJrrDtiSTdPR2XhL0dzVYiJ1onQPOiXdh7F LiRL3qmEtWFNnItO5n18FyYx6+ytSkFeduOMePIGjCj4rVcjUrnYFB7FrAFGrB5rtR3J9kSm/Bl V+6jWi4HiyggBpjW/nil8eR+C7lUpzE5d3v1sS5Xun+Vh09Khb6J3ghumc22FxcuTbscNp64BxZ 2FNBDNwgAQB6O8Q2X602NZMDamt6ipZVBEbB5zxj6vGvly7j/3MLNcXBGDM1aS2Vot+UxB4aDNZ J6DzGOy0agFf4DC0Qdj8c6KG2VyC7PRpvVSMfx5ovsEBmdeunktj96KS3b0po8zExr5CznboQsM DWjwUP0NjRJswWYjzvskAd88vpDzPGTuGFPRfw4aJh8CZphG5tX3tzcjPN1iWltHPQY/17eXrQy DHKx2qpIQ/RNkahvxPQNCjSMPfdxYro38gUi2wxQTolqTD8ErEuwXzO/VcsABfeqoQa1GbwL3UD mXFsI0ttcowJs+g== X-Developer-Key: i=krzysztof.kozlowski@oss.qualcomm.com; a=openpgp; fpr=9BD07E0E0C51F8D59677B7541B93437D3B41629B X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwODI5MDE3MiBTYWx0ZWRfX8j4+z/bm82IZ ahiqL3HJ+TjHaEnGZMPzj3nneaXW0oB4gZB3hsftamlgX1rt7gvy7H8BdTaEmOGgywqaHWNCPmn p7ogj1SCXFiK6J6cjjHmcDLt5DsEgtCaaziQ7dHYHHZwB6QgNuyMC0x1zEJ/K0Ubz0050/kirYs xblM4B9W5ItQB/nSQa1BF8jQry6Bpcn5tS8HWsOmuXCY8d3qXma0GnSYJMXcqoRz3/yp1MX+UNw O3fz/6XQavLkBGvOtJ2Fd+eBiwK7aNR5Ie3LK5gotvR4zXkzhDhXDFA+B/PiMe/MWZXM7tF6Dye j4TESHve1ybGBvTGCMMzDCL5XWPAO+mPBlvWh4y2TwW0BpKR4w703irq9NHI34ugMabE1QF2QuY i3KEhLwldydmdm90exSbQcpfHnNpIvbsDcYB53e0YXAKYp1ypeV4Kgp7z2/UQ6s1SdDgv+ZKpaB o68i8TZgQrkAsARRuog== X-Proofpoint-GUID: GLIySzdJssZy-IWU-jj_AGwJ8MSkivWl X-Authority-Analysis: v=2.4 cv=Zakt8MVA c=1 sm=1 tr=0 ts=6a9338c5 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=_K5XuSEh1TEqbUxoQ0s3:22 a=EUspDBNiAAAA:8 a=Z9rIwXeQ7yUTy2gfAJsA:9 a=ib9xVW6GgGiRPqfr:21 a=QEXdDO2ut3YA:10 a=uxP6HrT_eTzRwkO_Te1X:22 X-Proofpoint-Spam-Info: AW1haW4tMjYwODI5MDE3MiBTYWx0ZWRfX7MSdIOm4KLXw mUH1j+/IHARFO9SxhYfSCVI+gyypcVvM9byCuk+yC9M85JWrxiQmYJItCrKAgpLrH01XwwECa7N 0lXH1+SvB9XGJwcvLEaZ6ejbcUcClHg= X-Proofpoint-ORIG-GUID: GLIySzdJssZy-IWU-jj_AGwJ8MSkivWl X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.134,FMLib:17.12.100.49 definitions=2026-08-29_06,2026-08-27_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 phishscore=0 priorityscore=1501 impostorscore=0 malwarescore=0 suspectscore=0 lowpriorityscore=0 clxscore=1015 spamscore=0 bulkscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606150000 definitions=main-2608290172 Sort all the functions implementing style rules by name, so managing this will be at bit easier and simultaneous addons of new rules less conflict-prone. No functional changes, except adding underscore to _detect_indent_unit() to match other helpers used by the rules. Signed-off-by: Krzysztof Kozlowski --- scripts/dtc/dt-check-style | 607 +++++++++++++++++++++++------------------= ---- 1 file changed, 304 insertions(+), 303 deletions(-) diff --git a/scripts/dtc/dt-check-style b/scripts/dtc/dt-check-style index 49b5c28563eb..5385a03f377e 100755 --- a/scripts/dtc/dt-check-style +++ b/scripts/dtc/dt-check-style @@ -343,88 +343,8 @@ class Rule: =20 # --- individual rule check functions ------------------------------------= -- =20 -def check_trailing_whitespace(ctx): - for dl in ctx.lines: - if dl.raw !=3D dl.raw.rstrip(): - yield (dl.lineno, 'trailing whitespace') =20 - -def _check_redundant_whitespace(dl): - if dl.linetype in (LineType.COMMENT, LineType.COMMENT_BODY, - LineType.COMMENT_END, LineType.COMMENT_START, - LineType.PREPROCESSOR): - return - if re.search(r'(\s\s+|\t)\{', dl.code): - yield (dl.lineno, 'extra whitespace before {') - if re.search(r':(\s\s+|\t)', dl.code): - yield (dl.lineno, 'extra whitespace after :') - if re.search(r'\s+;', dl.code): - yield (dl.lineno, 'extra whitespace before ;') - - -def check_redundant_whitespace(ctx): - """No whitespace between brackets or other code elements. - See also check_value_whitespace() for more checks.""" - for dl in ctx.lines: - yield from _check_redundant_whitespace(dl) - for cont in dl.continuations: - yield from _check_redundant_whitespace(cont) - - -def check_redundant_whitespace_strict(ctx): - """No whitespace between brackets or other code elements. - See also check_value_whitespace() for more checks.""" - for dl in ctx.lines: - if dl.linetype in (LineType.COMMENT, LineType.COMMENT_BODY, - LineType.COMMENT_END, LineType.COMMENT_START, - LineType.PREPROCESSOR): - continue - if re.search(r'(\s\s+|\t)=3D', dl.code): - yield (dl.lineno, 'extra whitespace before =3D') - if re.search(r'=3D(\s\s+|\t)', dl.code): - yield (dl.lineno, 'extra whitespace after =3D') - - -def check_tab_in_yaml_example(ctx): - """Reject literal tabs in DTS lines when input is YAML. - - For YAML examples, indent and content must use spaces. Tabs inside - a #define value are tolerated (those are CPP macros, not DTS). - For .dts files, this rule does not apply -- tabs are required. - """ - if ctx.file_type !=3D 'yaml': - return - for dl in ctx.lines: - if dl.linetype =3D=3D LineType.PREPROCESSOR: - continue - if dl.linetype =3D=3D LineType.BLANK: - continue - if '\t' in dl.raw: - yield (dl.lineno, 'tab character not allowed in DTS example') - - -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)') - 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') - - -def detect_indent_unit(ctx): +def _detect_indent_unit(ctx): """Find the indent unit used at depth 1 in this block. =20 Returns tuple of string (one of: ' ' (2 spaces), ' ' (4 spaces), @@ -450,85 +370,42 @@ def detect_indent_unit(ctx): return (None, None) =20 =20 -def check_indent_unit_relaxed(ctx): - """YAML examples: 2 or 4 spaces. Never tabs or other widths.""" - (unit, lineno) =3D detect_indent_unit(ctx) - if unit is None: - return - if unit not in (' ', ' '): - yield (lineno, 'indent unit must be 2 or 4 spaces, got %r' % unit) +def _display_col(text): + """Visual column width of text, with tabs expanded to the next + 8-column stop, matching how printf and most editors render a + line and the kernel-wide line length convention.""" + col =3D 0 + for ch in text: + if ch =3D=3D '\t': + col =3D (col // 8 + 1) * 8 + else: + col +=3D 1 + return col =20 =20 -def check_indent_unit_dts(ctx): - """DTS files: 1 tab per level. Always required.""" - (unit, lineno) =3D detect_indent_unit(ctx) - if unit is None: - return - if unit !=3D '\t': - yield (lineno, 'indent unit must be 1 tab in DTS, got %r' % unit) +def _natural_sort_key(s): + """Split a string into a tuple of (kind, value) pairs that compares + numeric runs as ints, so 'foo10' sorts after 'foo2'.""" + parts =3D [] + for part in re.split(r'(\d+)', s): + if part.isdigit(): + parts.append((0, int(part))) + else: + parts.append((1, part)) + return tuple(parts) =20 =20 -def check_indent_unit_strict(ctx): - """YAML: must be exactly 4 spaces. DTS: 1 tab (same as relaxed).""" - (unit, lineno) =3D detect_indent_unit(ctx) - if unit is None: - return - if ctx.file_type =3D=3D 'yaml': - if unit !=3D ' ': - yield (lineno, 'indent unit must be 4 spaces in strict mode, ' - 'got %r' % unit) - - -def check_indent_consistent(ctx): - """All indented lines must be a multiple of the detected unit.""" - (unit, lineno) =3D detect_indent_unit(ctx) - if unit is None: - return - if ctx.file_type =3D=3D 'yaml': - if unit not in (' ', ' '): - return # let check_indent_unit_* report this - else: - if unit !=3D '\t': - return - - for dl in ctx.lines: - if dl.linetype in (LineType.BLANK, LineType.PREPROCESSOR): - continue - if dl.linetype =3D=3D LineType.CONTINUATION: - continue # continuations align to <, not to indent unit - if dl.linetype in (LineType.COMMENT_BODY, LineType.COMMENT_END): - continue - if not dl.indent_str: - continue - # The indent must be 'unit' repeated dl.depth times, exactly. - # NODE_CLOSE lines have depth equal to the post-decrement value, - # which matches the indent expected. - expected =3D unit * dl.depth - if dl.indent_str !=3D expected: - yield (dl.lineno, - 'indent mismatch (expected depth %d * %r)' % - (dl.depth, unit)) - - -def check_blank_lines(ctx): - """No two consecutive blank lines, no leading/trailing blank lines - in any node body.""" - lines =3D ctx.lines - # Consecutive blanks - for i in range(1, len(lines)): - if lines[i].linetype =3D=3D LineType.BLANK and \ - lines[i - 1].linetype =3D=3D LineType.BLANK: - yield (lines[i].lineno, 'consecutive blank lines') - # Blank right after { or right before } - for i, dl in enumerate(lines): - if dl.linetype !=3D LineType.BLANK: - continue - prev =3D lines[i - 1] if i > 0 else None - nxt =3D lines[i + 1] if i + 1 < len(lines) else None - if prev is not None and prev.linetype =3D=3D LineType.NODE_OPEN: - yield (dl.lineno, 'blank line at start of node body') - if nxt is not None and nxt.linetype =3D=3D LineType.NODE_CLOSE: - yield (dl.lineno, 'blank line at end of node body') +def _strip_strings_and_comments(text): + """Remove string literals and /* */ + // comments from a single + line, replacing them with empty strings. Used so syntactic checks + (whitespace, hex case, etc.) don't false-positive on contents of + quoted strings or comments. An unclosed /* on the line is treated + as a comment running to end of line.""" + text =3D re.sub(r'"(?:[^"\\]|\\.)*"', '""', text) + text =3D re.sub(r'/\*.*?\*/', '', text) + text =3D re.sub(r'/\*.*$', '', text) + text =3D re.sub(r'//.*$', '', text) + return text =20 =20 def _walk_bodies(lines): @@ -559,16 +436,25 @@ def _walk_bodies(lines): yield body_stack.pop() =20 =20 -def _natural_sort_key(s): - """Split a string into a tuple of (kind, value) pairs that compares - numeric runs as ints, so 'foo10' sorts after 'foo2'.""" - parts =3D [] - for part in re.split(r'(\d+)', s): - if part.isdigit(): - parts.append((0, int(part))) - else: - parts.append((1, part)) - return tuple(parts) +def check_blank_lines(ctx): + """No two consecutive blank lines, no leading/trailing blank lines + in any node body.""" + lines =3D ctx.lines + # Consecutive blanks + for i in range(1, len(lines)): + if lines[i].linetype =3D=3D LineType.BLANK and \ + lines[i - 1].linetype =3D=3D LineType.BLANK: + yield (lines[i].lineno, 'consecutive blank lines') + # Blank right after { or right before } + for i, dl in enumerate(lines): + if dl.linetype !=3D LineType.BLANK: + continue + prev =3D lines[i - 1] if i > 0 else None + nxt =3D lines[i + 1] if i + 1 < len(lines) else None + if prev is not None and prev.linetype =3D=3D LineType.NODE_OPEN: + yield (dl.lineno, 'blank line at start of node body') + if nxt is not None and nxt.linetype =3D=3D LineType.NODE_CLOSE: + yield (dl.lineno, 'blank line at end of node body') =20 =20 def check_child_address_order(ctx): @@ -624,6 +510,172 @@ def check_child_name_order(ctx): 'child node %r out of name order' % dl.node_name) =20 =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: + 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 + if not dl.continuations: + continue + eq =3D dl.raw.find('=3D') + if eq < 0: + continue + # First '<' or '"' after '=3D', but ignore comments and strip trai= ling + # whitespace (e.g. remaining after removing the comment) + rest =3D _strip_strings_and_comments(dl.raw[eq + 1:]).rstrip() + m =3D re.search(r'\s*([<"])', rest) + if not m: + continue + dl_value_complete =3D rest.endswith('",') or rest.endswith('>,') + target_col =3D _display_col(_strip_strings_and_comments(dl.raw[:eq= + 1 + m.start(1)])) + for cont in dl.continuations: + target_offset =3D 0 + err_msg_explanation =3D 'to < or "' + if not dl_value_complete: + target_offset =3D 1 + err_msg_explanation =3D 'to the value under <' + if _display_col(cont.indent_str) !=3D target_col + target_offs= et: + yield (cont.lineno, + 'continuation should align to column %d ' + '(%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('>,') + + +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) + + +def check_indent_consistent(ctx): + """All indented lines must be a multiple of the detected unit.""" + (unit, lineno) =3D _detect_indent_unit(ctx) + if unit is None: + return + if ctx.file_type =3D=3D 'yaml': + if unit not in (' ', ' '): + return # let check_indent_unit_* report this + else: + if unit !=3D '\t': + return + + for dl in ctx.lines: + if dl.linetype in (LineType.BLANK, LineType.PREPROCESSOR): + continue + if dl.linetype =3D=3D LineType.CONTINUATION: + continue # continuations align to <, not to indent unit + if dl.linetype in (LineType.COMMENT_BODY, LineType.COMMENT_END): + continue + if not dl.indent_str: + continue + # The indent must be 'unit' repeated dl.depth times, exactly. + # NODE_CLOSE lines have depth equal to the post-decrement value, + # which matches the indent expected. + expected =3D unit * dl.depth + if dl.indent_str !=3D expected: + yield (dl.lineno, + 'indent mismatch (expected depth %d * %r)' % + (dl.depth, unit)) + + +def check_indent_unit_dts(ctx): + """DTS files: 1 tab per level. Always required.""" + (unit, lineno) =3D _detect_indent_unit(ctx) + if unit is None: + return + if unit !=3D '\t': + yield (lineno, 'indent unit must be 1 tab in DTS, got %r' % unit) + + +def check_indent_unit_relaxed(ctx): + """YAML examples: 2 or 4 spaces. Never tabs or other widths.""" + (unit, lineno) =3D _detect_indent_unit(ctx) + if unit is None: + return + if unit not in (' ', ' '): + yield (lineno, 'indent unit must be 2 or 4 spaces, got %r' % unit) + + +def check_indent_unit_strict(ctx): + """YAML: must be exactly 4 spaces. DTS: 1 tab (same as relaxed).""" + (unit, lineno) =3D _detect_indent_unit(ctx) + if unit is None: + return + if ctx.file_type =3D=3D 'yaml': + if unit !=3D ' ': + yield (lineno, 'indent unit must be 4 spaces in strict mode, ' + 'got %r' % unit) + + +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) + + +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)') + 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') + + +def check_node_close_alone(ctx): + """The closing '};' of a node must be on its own line. The + classifier accepts a canonical "}" or "};" as NODE_CLOSE; a line + that is all closures (e.g. "}; };") is still NODE_CLOSE for depth + tracking but is flagged here via dl.closures. Any other line that + still contains '};' (in code, not in strings or comments) is + mixing a node close with something else.""" + for dl in ctx.lines: + if dl.linetype =3D=3D LineType.NODE_CLOSE: + if dl.closures > 1: + yield (dl.lineno, + 'closing brace must be on its own line') + continue + if dl.linetype in (LineType.BLANK, LineType.COMMENT, + LineType.COMMENT_START, LineType.COMMENT_BODY, + LineType.COMMENT_END, LineType.PREPROCESSOR): + continue + if '};' in dl.code: + yield (dl.lineno, + 'closing brace must be on its own line') + + def _property_bucket(name): """Return the canonical bucket index for a property: 0 device_type @@ -769,17 +821,40 @@ def check_property_order(ctx): (p.prop_name, prev.prop_name)) =20 =20 -def _strip_strings_and_comments(text): - """Remove string literals and /* */ + // comments from a single - line, replacing them with empty strings. Used so syntactic checks - (whitespace, hex case, etc.) don't false-positive on contents of - quoted strings or comments. An unclosed /* on the line is treated - as a comment running to end of line.""" - text =3D re.sub(r'"(?:[^"\\]|\\.)*"', '""', text) - text =3D re.sub(r'/\*.*?\*/', '', text) - text =3D re.sub(r'/\*.*$', '', text) - text =3D re.sub(r'//.*$', '', text) - return text +def _check_redundant_whitespace(dl): + if dl.linetype in (LineType.COMMENT, LineType.COMMENT_BODY, + LineType.COMMENT_END, LineType.COMMENT_START, + LineType.PREPROCESSOR): + return + if re.search(r'(\s\s+|\t)\{', dl.code): + yield (dl.lineno, 'extra whitespace before {') + if re.search(r':(\s\s+|\t)', dl.code): + yield (dl.lineno, 'extra whitespace after :') + if re.search(r'\s+;', dl.code): + yield (dl.lineno, 'extra whitespace before ;') + + +def check_redundant_whitespace(ctx): + """No whitespace between brackets or other code elements. + See also check_value_whitespace() for more checks.""" + for dl in ctx.lines: + yield from _check_redundant_whitespace(dl) + for cont in dl.continuations: + yield from _check_redundant_whitespace(cont) + + +def check_redundant_whitespace_strict(ctx): + """No whitespace between brackets or other code elements. + See also check_value_whitespace() for more checks.""" + for dl in ctx.lines: + if dl.linetype in (LineType.COMMENT, LineType.COMMENT_BODY, + LineType.COMMENT_END, LineType.COMMENT_START, + LineType.PREPROCESSOR): + continue + if re.search(r'(\s\s+|\t)=3D', dl.code): + yield (dl.lineno, 'extra whitespace before =3D') + if re.search(r'=3D(\s\s+|\t)', dl.code): + yield (dl.lineno, 'extra whitespace after =3D') =20 =20 def check_required_blank_lines(ctx): @@ -841,18 +916,49 @@ def check_required_blank_lines(ctx): between_blanks =3D 0 =20 =20 -def check_hex_case(ctx): - """Hex literals (0xN) must use lowercase digits and prefix.""" +def check_tab_in_yaml_example(ctx): + """Reject literal tabs in DTS lines when input is YAML. + + For YAML examples, indent and content must use spaces. Tabs inside + a #define value are tolerated (those are CPP macros, not DTS). + For .dts files, this rule does not apply -- tabs are required. + """ + if ctx.file_type !=3D 'yaml': + return for dl in ctx.lines: - if dl.linetype in (LineType.BLANK, LineType.COMMENT, - LineType.COMMENT_START, LineType.COMMENT_BODY, - LineType.COMMENT_END, LineType.PREPROCESSOR): + if dl.linetype =3D=3D 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) + if dl.linetype =3D=3D LineType.BLANK: + continue + if '\t' in dl.raw: + yield (dl.lineno, 'tab character not allowed in DTS example') + + +def check_trailing_whitespace(ctx): + for dl in ctx.lines: + if dl.raw !=3D dl.raw.rstrip(): + yield (dl.lineno, 'trailing whitespace') + + +def check_unclosed_block_comment(ctx): + """Every /* must have a matching */ in the same block. Catches both + a comment opened on its own line (COMMENT_START) and a tail comment + opened on a PROPERTY or other code line (where in_block_comment is + set by _split_code so the next line becomes COMMENT_BODY without a + preceding COMMENT_START).""" + open_lineno =3D None + for dl in ctx.lines: + if dl.linetype =3D=3D LineType.COMMENT_START: + open_lineno =3D dl.lineno + elif dl.linetype =3D=3D LineType.COMMENT_END: + open_lineno =3D None + elif dl.linetype =3D=3D LineType.COMMENT_BODY and open_lineno is N= one: + # Block was opened by a /* tail on a code line; report at + # the first orphan body line since the originating line is + # already classified as something else. + open_lineno =3D dl.lineno + if open_lineno is not None: + yield (open_lineno, 'unclosed /* block comment') =20 =20 def check_unit_address_format(ctx): @@ -886,6 +992,17 @@ def check_unit_address_format(ctx): break =20 =20 +def check_unused_labels(ctx): + """Labels defined but never referenced are clutter.""" + defined, referenced =3D collect_labels_and_refs(ctx.text) + for label in sorted(defined - referenced): + # Find the line where this label is defined for line-number + # reporting. + m =3D re.search(r'(?m)^.*\b' + re.escape(label) + r'\s*:', ctx.tex= t) + lineno =3D ctx.text[:m.start()].count('\n') + 1 if m else 1 + yield (lineno, 'label %r defined but never &-referenced' % label) + + def check_value_whitespace(ctx): """A <...> cell list must have no whitespace directly after '<' or directly before '>'. Continuation lines are joined onto the @@ -914,122 +1031,6 @@ def check_value_whitespace(ctx): break =20 =20 -def check_node_close_alone(ctx): - """The closing '};' of a node must be on its own line. The - classifier accepts a canonical "}" or "};" as NODE_CLOSE; a line - that is all closures (e.g. "}; };") is still NODE_CLOSE for depth - tracking but is flagged here via dl.closures. Any other line that - still contains '};' (in code, not in strings or comments) is - mixing a node close with something else.""" - for dl in ctx.lines: - if dl.linetype =3D=3D LineType.NODE_CLOSE: - if dl.closures > 1: - yield (dl.lineno, - 'closing brace must be on its own line') - continue - if dl.linetype in (LineType.BLANK, LineType.COMMENT, - LineType.COMMENT_START, LineType.COMMENT_BODY, - LineType.COMMENT_END, LineType.PREPROCESSOR): - continue - if '};' in dl.code: - yield (dl.lineno, - 'closing brace must be on its own line') - - -def _display_col(text): - """Visual column width of text, with tabs expanded to the next - 8-column stop, matching how printf and most editors render a - line and the kernel-wide line length convention.""" - col =3D 0 - for ch in text: - if ch =3D=3D '\t': - col =3D (col // 8 + 1) * 8 - else: - col +=3D 1 - return col - - -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) - - -def check_continuation_alignment(ctx): - """A multi-line property's continuation lines must align their - 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 - if not dl.continuations: - continue - eq =3D dl.raw.find('=3D') - if eq < 0: - continue - # First '<' or '"' after '=3D', but ignore comments and strip trai= ling - # whitespace (e.g. remaining after removing the comment) - rest =3D _strip_strings_and_comments(dl.raw[eq + 1:]).rstrip() - m =3D re.search(r'\s*([<"])', rest) - if not m: - continue - dl_value_complete =3D rest.endswith('",') or rest.endswith('>,') - target_col =3D _display_col(_strip_strings_and_comments(dl.raw[:eq= + 1 + m.start(1)])) - for cont in dl.continuations: - target_offset =3D 0 - err_msg_explanation =3D 'to < or "' - if not dl_value_complete: - target_offset =3D 1 - err_msg_explanation =3D 'to the value under <' - if _display_col(cont.indent_str) !=3D target_col + target_offs= et: - yield (cont.lineno, - 'continuation should align to column %d ' - '(%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('>,') - - -def check_unclosed_block_comment(ctx): - """Every /* must have a matching */ in the same block. Catches both - a comment opened on its own line (COMMENT_START) and a tail comment - opened on a PROPERTY or other code line (where in_block_comment is - set by _split_code so the next line becomes COMMENT_BODY without a - preceding COMMENT_START).""" - open_lineno =3D None - for dl in ctx.lines: - if dl.linetype =3D=3D LineType.COMMENT_START: - open_lineno =3D dl.lineno - elif dl.linetype =3D=3D LineType.COMMENT_END: - open_lineno =3D None - elif dl.linetype =3D=3D LineType.COMMENT_BODY and open_lineno is N= one: - # Block was opened by a /* tail on a code line; report at - # the first orphan body line since the originating line is - # already classified as something else. - open_lineno =3D dl.lineno - if open_lineno is not None: - yield (open_lineno, 'unclosed /* block comment') - - -def check_unused_labels(ctx): - """Labels defined but never referenced are clutter.""" - defined, referenced =3D collect_labels_and_refs(ctx.text) - for label in sorted(defined - referenced): - # Find the line where this label is defined for line-number - # reporting. - m =3D re.search(r'(?m)^.*\b' + re.escape(label) + r'\s*:', ctx.tex= t) - lineno =3D ctx.text[:m.start()].count('\n') + 1 if m else 1 - yield (lineno, 'label %r defined but never &-referenced' % label) - - # --- registry -----------------------------------------------------------= --- =20 RULES =3D [ --=20 2.53.0 From nobody Sat Sep 26 21:14:38 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 D0C793B585F for ; Sat, 29 Aug 2026 19:53:42 +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=1788033224; cv=none; b=RG9Ac4mC3uj/m6rgw/bUcUR6/TmhiTzN93c5rkCzizDrrQO5CmoIlQ8rRCGYG1R1DwJresEa5fBUESSwefQNpCXlhxrV4W6hMo6SJ0bVA1qsV3CzXGwVfaAVbsinI/si9o1Zssh3gQNAxQFnHwT+1lXCoZcwUGUjjgv2shSWBV8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788033224; c=relaxed/simple; bh=dycdsX2LY0tuu1ud8cW2TLZg6qlXAf751T0VqCGeNHY=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=aE6yKYw17WX2uQ5Jrw5JA3AX71jYBSMYKVbT8OfMc+IV4W77CbCWQmf2E3Gt5eqH0Nc8QyfKjF7HJGWynAA/z2oHdevCeXuQBmixWOrGCk3AYUvek9cR4X20F8NkzKJ4bUjGcwp03vmjiQzfLAALE/nzSpi9PJVtg/Lip6FDog0= 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=WjNMfjd4; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=gRmkdttm; 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="WjNMfjd4"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="gRmkdttm" Received: from pps.filterd (m0279867.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 67TJkpUI3797803 for ; Sat, 29 Aug 2026 19:53:42 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= FLqqv7Xex0VKsby3JMIwwfwTQmGDJCsxSwMP9TchycU=; b=WjNMfjd4j7Evv5JC F1TYnypC8xqjIfwiVBLT7UKza5i8Afg810vFvqXGOQDyIRucr4Knyn9USetSNvhk dODk8zryVuAGqORzRdiriwLhxBGe7nDyL2RlJ1gEgV7qVqwICxroeO9F4I2HC8R4 mA1r7PNBr7vt5+/LZO553vRFeROJCYGKx3Nm/su20i35BTJ/O4c4oE6ilhJ1bt8/ 6IzVM1NtIVsEKk89C++UzGb7aZt18Uq9/2xlp3e4/q2LhayXNB54FHjaJjgG0Zop 1+JDU0s/cp9lO0LTtpq6K0aYcd3TzPwUMMhLGWPyz5ueW9f2nOSYwaWDJ36piObY Shn9FA== 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 4gbqhmsnwq-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Sat, 29 Aug 2026 19:53:42 +0000 (GMT) Received: by mail-qt1-f198.google.com with SMTP id d75a77b69052e-52fb2a46cb5so54764241cf.3 for ; Sat, 29 Aug 2026 12:53:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1788033221; x=1788638021; 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=FLqqv7Xex0VKsby3JMIwwfwTQmGDJCsxSwMP9TchycU=; b=gRmkdttmRsJrWHPrn4AyS9nQMJnyU1gmhzNkrINPvuaGYOfXNcDhmys91Ru/eRjcbo l1t2PzsApoyla/3XaH7NtEC2Jcl0gLjJx/DiXlmotWT9xB0M7v2Yn4K5RalwY+ab91B8 Nt70c1CfDZ5Jvb7iprQWe13kjP0D7oWPnMfRhslZdh3uB5y0r2YVnN8gxHYSwZsPoQxQ qZine0R8b7/hdwyy0TSclIyipH61ZFdcIJUcXk67ntyRETCezdvw2J/tUnUGbenPD8Jp IJ/GpZNbngEfe/5LMPJWTra1DWMKfAonXfgUvE68Peig2h64V17r1jCuQFcnI+Kr3Nyq +WCw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1788033221; x=1788638021; 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=FLqqv7Xex0VKsby3JMIwwfwTQmGDJCsxSwMP9TchycU=; b=RildKqD8r4/gAhYFvufxvxjiIS8cnKHpRPofCYNzf9o5p6wV1gytiNbW25Yx+zMvh+ rBeDf+4fH/GYxCMNC0iwPOECjP/hplIXpzXW83ZP2qlLk4flRyfKmyZ9ZFGuKSw81+QZ u03Xj4h94uCd8ijNvG4gF2VyC7alahUplFaK3i2firHueOfyju5cz3mUfEvyaZ8g4JO8 Iuc49Y+Pg06VdOrHUDAQX1WQWTrWsgXf3YBUnBwCV1HlBBMkGot+fS+c3dZi6MpvwQEj nN5ARhrRpcPCtcD43drOxVJDzGN2vq4AkgDG7CIflSLyI8h6hk60uwxRdSxd58/SfHwX ArKw== X-Forwarded-Encrypted: i=1; AHgh+RoeT0RaaA+nRXQGTuCzRX834EK+pvvWT63LW2dcLyF1gssBptSZq0RGOt9vy0r64u5HrZkvahofW+p4kH0=@vger.kernel.org X-Gm-Message-State: AFuF++nVaRRtOHyUK4dTWOS6k8fjMw3KFyNwGzp87P7WvP/BlKrXn1Cu mpEzkTbEAes77r5da5aXOKH8MI7fHUpLrk3RRSiM6+0xkOegVMGESD/pQ8oj6TLhkgd+MeUux4X W4shQ2j/caGa4K4fM6Lcsv1ZStWUdZqqiOS9tlZ0qayRubA6fIKyxqWV0UJ94aOmrN7o= X-Gm-Gg: AR+sD12n4Q3/VZhC78KXNag8RgZM8RjWNYeSIdNYVr3Owu0k4D5uwC/joieG3qQuBSh 5ez3fRUn0O/6zbMGpyxX/YpB2dFb9wFkBS/XcSNaQ4XY5HOa7/2TJNZez9JPgG9t6jyzgiRowFw H7ffvy+2/wmEK+b/0DBS4Vizm6g1CmftGLKZg5oOCVWRlxzCvdmFpV+xMKUiMA/a8CPfwqdAEz8 vW4/voc+UbPp8VSo6KgcjWIxB7Zfio2R3gEN+LeO0KCBRD/M53uqNCDMAS7Ccs+jNrNtp3Is06/ DPJPkrm6ACBrA0XLBFteg6glSJYR2jEppYUNZQ+6Oeul2GQ//KmDukOC9hokUdNvfkZPtDJzjEI +CmO1YwQqnAMOSf5AkJWEm6M= X-Received: by 2002:ac8:5a47:0:b0:52c:ce3:6428 with SMTP id d75a77b69052e-52fb9406c2emr188620871cf.16.1788033221168; Sat, 29 Aug 2026 12:53:41 -0700 (PDT) X-Received: by 2002:ac8:5a47:0:b0:52c:ce3:6428 with SMTP id d75a77b69052e-52fb9406c2emr188620611cf.16.1788033220797; Sat, 29 Aug 2026 12:53:40 -0700 (PDT) Received: from [127.0.1.1] ([178.197.219.214]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-482fbb32d30sm12446343f8f.34.2026.08.29.12.53.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 29 Aug 2026 12:53:40 -0700 (PDT) From: Krzysztof Kozlowski Date: Sat, 29 Aug 2026 21:53:19 +0200 Subject: [PATCH 3/6] dtc: dt-check-style: Process property names with a question mark 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: <20260829-dts-style-checker-sort-v1-3-6693a37d7ae1@oss.qualcomm.com> References: <20260829-dts-style-checker-sort-v1-0-6693a37d7ae1@oss.qualcomm.com> In-Reply-To: <20260829-dts-style-checker-sort-v1-0-6693a37d7ae1@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=897; i=krzysztof.kozlowski@oss.qualcomm.com; h=from:subject:message-id; bh=dycdsX2LY0tuu1ud8cW2TLZg6qlXAf751T0VqCGeNHY=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBqkzi1M6FTu91NY1SBmgg0xEPok0ROTAiRjObPU olIxJWoSByJAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCapM4tQAKCRDBN2bmhouD 1+m9D/98jluDhW9+SsoMwYVRsPCcJ90y2H1lC+3IKDHRo8tjcyXskhGPXRRcxwA53Kz3oOw4JD6 6H/qdwo39BJA8GkQOfH6eCdWFTzgl8O0oXzJS7SL1Tmo/2fh5k+VYLg4S1xbjnfhnTwgOV9QGkC Y6KtdhAZo9IaJ4gMZORbfN4int3j/oBEgoEbC8isUcM/JRybVfkCzAdVx7Mt3OKpC2/ILAYAi6w Wp+gQn7wjYocfyaz2gIFxLNJnO8Nkau5N02syOcuJo+ebImL+hEU16K9IoTo/BI2CS0eNDtewGu 2A92gEhkJMgevO1d8DlKCdlLP11l0gt485D08JTuO2PG/4meSkEjsapyBru8lF5VL1H1eCQl1Z7 ov/Tf/H7J7N/64gVic+xa5uhfqlhctu+CkZkm/GBUeuk/5QBItpYaG5dAq/1GBW+pkzebttwPUJ fOwZnnNDZeW41Nrd27DKna7hiKViViBDp1S8VKGL96rrTC9tPVCijGKnztHrPPAH+TbAjsmjDwY JNOGQQWal6WY9IHDaiGGN4MpVzHrG9eEbSIOcXrnYwnwPrgPOMOt96j/+NgcrOHxC+IRVQWyEty U5e5RU+cZ4QKR3yVLXt64KoZY75ZI9iAONGq/H7Fs4i8h8xEqXV42QEtwLyvciGzpZtjf0MKFkP 2wlaDk+fepYB/lA== X-Developer-Key: i=krzysztof.kozlowski@oss.qualcomm.com; a=openpgp; fpr=9BD07E0E0C51F8D59677B7541B93437D3B41629B X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwODI5MDE3MiBTYWx0ZWRfX+7TU74RCf+o2 HW5mEYPU1d2fv0J1BM0HfTWvSaXMcpo7wukexVQRJBn+eWfHbixk0fzJZUQyp/6aSh7WenEaf5b lw/D/Wv9MATyv0yynkFL1OrXY/TWtyn6Dtt7T1TbOf+r0uFGSCKKU/5/Lapyu88oyoTuqBrn0aN 2PCE6pUhtZIyIzABUhLkdduge41DXw+FKbwqXzsLh9ywPcjm9JoVsKvPeit5UDXv+PT1Xwe3JGT AwLOOEQ9g2QFfYru7jX960kaV5+K/5W0CDv0f4WqrizvkNVVifuebJo1nJW5cO43zgDUGUpswdg c5eA/ViivStI7MuWpkmWGhSRUqdOGuRl6N2Mo5Qz7SGoQ4Qo2t1KkxpWT2Pwm7fFmNzOqIcIBY1 wVS3ChqaohSmGyHpNR/UoPCyPUAwNNPjh7ygOXYjb7EDr4Sg+n0nJ5wS0vS9oFgeoUywjd9i31h hcmIFMYjJI7lOArQEFA== X-Proofpoint-ORIG-GUID: _ELo4WQuY95_e_btUdU2qEpb0pKVBUAq X-Proofpoint-Spam-Info: AW1haW4tMjYwODI5MDE3MiBTYWx0ZWRfXzx+EgnywprAi xI2Iexhse8rXjxlAyJf/zVC3pxfI4fHYw3esG2LOfl7xzY+8u0qycio7W3hLfN/AjW7cUGNLN5v gq1xi7Ejl4SawlQYsvEQH3D2R58BYLU= X-Proofpoint-GUID: _ELo4WQuY95_e_btUdU2qEpb0pKVBUAq X-Authority-Analysis: v=2.4 cv=bpl8wkai c=1 sm=1 tr=0 ts=6a9338c6 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=eoimf2acIAo5FJnRuUoq:22 a=EUspDBNiAAAA:8 a=VUm4ztGfwmjKtcs48IoA:9 a=QEXdDO2ut3YA:10 a=zgiPjhLxNE0A:10 a=dawVfQjAaf238kedN5IG:22 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.134,FMLib:17.12.100.49 definitions=2026-08-29_06,2026-08-27_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 malwarescore=0 suspectscore=0 bulkscore=0 impostorscore=0 adultscore=0 spamscore=0 priorityscore=1501 lowpriorityscore=0 clxscore=1015 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606150000 definitions=main-2608290172 Devicetree spec allows question mark '?' in property names and such code is also accepted by DTC, thus catch such properties as a valid code, even if discouraged. Otherwise certain rules checking for property names would ignore that line. Signed-off-by: Krzysztof Kozlowski --- scripts/dtc/dt-check-style | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/dtc/dt-check-style b/scripts/dtc/dt-check-style index 5385a03f377e..7c3ee1432dc6 100755 --- a/scripts/dtc/dt-check-style +++ b/scripts/dtc/dt-check-style @@ -280,7 +280,7 @@ def parse_node_header(dl): =20 =20 def parse_property_name(dl): - m =3D re.match(r'^([a-zA-Z0-9#][a-zA-Z0-9,._+#-]*)\s*[=3D;]', dl.strip= ped) + m =3D re.match(r'^([a-zA-Z0-9#][a-zA-Z0-9,._+?#-]*)\s*[=3D;]', dl.stri= pped) if m: dl.prop_name =3D m.group(1) =20 --=20 2.53.0 From nobody Sat Sep 26 21:14:38 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 8576C379ED4 for ; Sat, 29 Aug 2026 19:53:45 +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=1788033227; cv=none; b=m0EJH9mdtLhC7FfYftF49WZfVFPcwMbglJPvznyZmQ9QWbaoGwAfldKsLeWsfPeH+tRRCi9za/zkl6naR37tt7/G/5UQM5kKbj1t2T6alMF+vzdUYJipoJ8GLHTUOCbhY9ZuxtuKfZCCQa755ybxcQZyaq6LzH6fIXJWPNP3OTA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788033227; c=relaxed/simple; bh=XZKGBzfXN9fIV4WZEgpomlfSlCPgCht6K0H1kvBSLHc=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=GHHBBn0n5fUGLEhJZll4HpVHTGKru7Gc8Yk5cfU8CorSXo1YrM+lIywi95tBuBtDOzgAZRmDZqwneAxl00Q9fPOc2fMte+QvNUQyMq34JdREZsgOFOiPrkmEFC5kjoewWuyihQgrogPsGjcmVjSNfB3EqBtI1Zh0a/ebORYeez0= 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=ezawTkjR; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=PkVg2Dtq; 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="ezawTkjR"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="PkVg2Dtq" 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 67TJlUcb3136757 for ; Sat, 29 Aug 2026 19:53:44 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= wqqghh7AT+DRz9GuT8bl/3sMfi4LSzmVdSTYMu55UNc=; b=ezawTkjRM+p5cz9o cbxXGsijIalEuCT6BQ1qtOaEQwl+xq0kAuu77yDZ5OslRPFVzsURyWt8NkiSk6pV WZjyZoVgHg45VcrnB2QbW8Ha8aIMKVhlArQfcjG2bkuduSoCa2ViFrNpoZ4+Xkap CRc8TQAYSf2++aytnuYLYxepDVHzlm4QAf3iKJ5AKSVh3BgNtdrH4K3ZfvNDhBWw M+v4pX1m3Jrb5kLlZ1BsjKWhFPkls8fQJVwymp0p12gD1//VxtykpdpWDzfady2L w7zEjWyou7g2FgToT8i7mIqeewSUDmpYFqUVkCE1Ca7vwavPc9QqYMHFSFc0/4ku 9mHMVg== 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 4gbqdvhnr2-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Sat, 29 Aug 2026 19:53:44 +0000 (GMT) Received: by mail-qt1-f198.google.com with SMTP id d75a77b69052e-52ffe24490bso14089261cf.1 for ; Sat, 29 Aug 2026 12:53:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1788033224; x=1788638024; 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=wqqghh7AT+DRz9GuT8bl/3sMfi4LSzmVdSTYMu55UNc=; b=PkVg2DtqPW9quC+1FptZpE0lIN5KQFRJnueW6J04OBdhJg9664noP+ehdXaw3xnMJr Fyya5UjG3fl+1r+hm0VxyOLeIpVL5JQA4bsRGaK7DbaAHErW2Itkt0u0XDNpMeWHRP1r TnUkjJzYI2OA31wf+C7C8FIFzhkosilRVr253BgN4nCvuLn5i+0o82LouppEGLBS+ttA nONkXwctjOXaPEebRxIyImjEMBD8LJIh82rYyx6TqYFBSu06AMUoAGQd3cJ8uTjZPM83 N/f9/b0P9+dwZvS/D8Xtrm1ES0CT2ghBniM64k9qLdXV0WEvXCJcKByMu9oWjAVCCDkh DD6g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1788033224; x=1788638024; 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=wqqghh7AT+DRz9GuT8bl/3sMfi4LSzmVdSTYMu55UNc=; b=Rxrvyd9zk2Dj8aE5b1Td0pzeK50AwK80RvlvQzl43YiuQjaHUxQ6npwist/vnLLUGz +5v5P1AU/frAKnIKNtGUyQyryC8bUh2twYew636UGfQW1SwCFDWgHbpT3WZeiO6UHr7O Ub2wKpG6OzEW3UxsGxPBp7pgMldTr2PC1ir8pwXdyKgJYJTF3Hwf3gTsSC5i9QX7qbzY ZGSV0fWLDNZjt8tISwmhtUyFAS/g6dHeUKrUj2s2qq98+ok16mFQW9MxdwhJ2EUFoAQD qtiYzKP+Z7muM7ifw1yO4/R2g7nGnJM3D3N1p8E5aDTUGDqaQ6cItzZpJPWcJZeW5Ymu DDnQ== X-Forwarded-Encrypted: i=1; AHgh+Rr9xTOSB8Mixs3fEogI6DHY7QGbGp99+bjZGL+AUrbbQFB/Pn+YP+bFM5JcFPArQxudnsRVBfQ1DLRJ7NQ=@vger.kernel.org X-Gm-Message-State: AFuF++n2RDkroFbCudKB+0uWsEl8UJl0Nc+7GvSubqayYAQfd7kTpTpK kyiIuOhBVvWqNobUbvLhBbrg08sHgxq3b5qLyUIXCXVQ0MO89jJIF4zBoD/bUpRuYLmBG66x3VT qFn0y+G0kQOtW8jMGZvwOhbtDoR9TgWoCh9X/I9gTLlPugUiywYhystHgwFaVDt7/9e1zLr3078 0= X-Gm-Gg: AR+sD101t8yKQ7GpchDM9r3upJaHNCtKwMmxpDYzfbM0vOtZ9COebxOMtF0jmm1+w7t nA5F9Cu/T1WD84SdidjpyfLNZLTrpt522ya59uPq3wmhCbMwVJdoOHRv8GN/G2/tl/K/h4xHf6i uLtrzgCAPJh5FZvejv9IRLFzGJFPIg8lLt+Ce2CxT14pOapzPFS2GF4v5uefNobn2yGZa9qyFML tnY9Rf6du8mVbA97lMDsMwkPwW0h/j4tzU817/GrLbSWqJNJNoxwoN9T7z1rmCMtLgfCpPPD7jy B+afin0EP2VcH46lzC0r4Zh+pD4l/yHDunN2E6eeS7iVjmcg/eyP4sDjsahOcpmPBi3EylQsBvl duXAzaRUkggoHcplskMvl+fc= X-Received: by 2002:a05:622a:1b87:b0:51b:fd82:22e0 with SMTP id d75a77b69052e-52fb93d39bamr176552501cf.3.1788033223485; Sat, 29 Aug 2026 12:53:43 -0700 (PDT) X-Received: by 2002:a05:622a:1b87:b0:51b:fd82:22e0 with SMTP id d75a77b69052e-52fb93d39bamr176552091cf.3.1788033222886; Sat, 29 Aug 2026 12:53:42 -0700 (PDT) Received: from [127.0.1.1] ([178.197.219.214]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-482fbb32d30sm12446343f8f.34.2026.08.29.12.53.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 29 Aug 2026 12:53:42 -0700 (PDT) From: Krzysztof Kozlowski Date: Sat, 29 Aug 2026 21:53:20 +0200 Subject: [PATCH 4/6] dtc: dt-check-style: Add test for node and property name styles 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: <20260829-dts-style-checker-sort-v1-4-6693a37d7ae1@oss.qualcomm.com> References: <20260829-dts-style-checker-sort-v1-0-6693a37d7ae1@oss.qualcomm.com> In-Reply-To: <20260829-dts-style-checker-sort-v1-0-6693a37d7ae1@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=14042; i=krzysztof.kozlowski@oss.qualcomm.com; h=from:subject:message-id; bh=XZKGBzfXN9fIV4WZEgpomlfSlCPgCht6K0H1kvBSLHc=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBqkzi2H/0qvpydYgfVZbY7AbLRLwBr6xXkJRuxg 1QublOZjKaJAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCapM4tgAKCRDBN2bmhouD 1wNAD/4k7Q0YEWtgJ+w1bkjDcvC1XkhSFYlRdbtldClF80XVgHHI9Cgewaj8URiEYl4QyYACcNo NYjyGY0aiZs8k2CucDArXxN7Ulv0Qh89PCLvHLZaiF88AT0S79yVZmhpiyuRsBmZQPlL+DVeYQW JSu2VNYVPqgnUXD35j71roiUdycj8e2HOB6ftC2g7uyQIKA/dpxc2MOjJj1fW1QZOGeuCjXT+1E IWzf3BbXs04g46zy+HzSWX9na3+bypnmkTGEXuh0otEONZL4r36SoC7rvT0/LJA29fcMFtWF9zE bBLbHPs7FRwJeQDCNbV69j3RaGKHRTB23hVCN1yQrUqt+HYbzyRalFbzVsz0yzbEJG5xY6Aa1gI sWBYg9XvHaTexgiSwBiyObxJmX4M78WtQz8m3SRPlXV745Nu/4/BIx8rUMSOWbwPhIGBw8nAvJR 84UxpbeegbOH/gvS1IrKHkYplYyK/WAxaD6Y7YV/a+m34znInLH0FE5iyCYS4NDrEYgQhia3vBX Fxh/ViR/H3KxYxz4KOvL7synwjgRHSVyEtq3aM7yJ9BjS6MjlDSLQsSs7g6i4xILt9uY/QlC1nj 4QibwW0iLl7kJMZOHsHEg61CHu1SiD/MFzt1bLRvyR9W0x9ILWpUHBF91n+IDRYl7W6y5WxqGAw JlZNHH7oVIwkpoQ== X-Developer-Key: i=krzysztof.kozlowski@oss.qualcomm.com; a=openpgp; fpr=9BD07E0E0C51F8D59677B7541B93437D3B41629B X-Proofpoint-GUID: qG-hNu_X9rujCW5UNjdr1ddTEssjqQ6_ X-Authority-Analysis: v=2.4 cv=P6EKQCAu c=1 sm=1 tr=0 ts=6a9338c8 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=3WHJM1ZQz_JShphwDgj5:22 a=gEfo2CItAAAA:8 a=EUspDBNiAAAA:8 a=VwQbUJbxAAAA:8 a=18clSmAaxCh7XbchaGQA:9 a=EkL4YHrcXgFCczJU:21 a=QEXdDO2ut3YA:10 a=dawVfQjAaf238kedN5IG:22 a=sptkURWiP4Gy88Gu7hUp:22 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwODI5MDE3MSBTYWx0ZWRfXw4VYWYiauDXq I7jxyFgEOwg01yeZlWcQFKLw33MFUkrOLmAzqJf6Mz4zudpaQlVrd6IeW0FlMFfSUnzm76b8ZVZ 6OtESk3W/BR3V1irXDqiqAlODKISNhGZuJE+VugKZsC89VY6IyLapLnGbuLUcXsDUJ46Id7acVR FK0eLb/zgzO2cRdrsS9mmxKhuKxNpvgcbTdfIruP9VD3DdMi/lqZWc8nbClAexKOUZPedU2aCIV IasiZJXeRHVd8QvTVk0GOLMx1sVBkfRndOab+qgNYPE58PcQGBiREPxNg7cpvDY7Xx7Hs5py40A U1VWksyM9d/Rv1beXUNATCGOzdllK2DDRvW7pHFWHvfb6Liv/l6PP9BoddRj8owzlV5ZjZEuVyo sIUkbg4SZ7DyWqioiu7YD6R3s2PmdxvF5o8sQ/w9091Z2TFaMXIYZZtHVP2bDlDZ47rfOkybKZo UxRo5wmbMYO6McroDVw== X-Proofpoint-Spam-Info: AW1haW4tMjYwODI5MDE3MSBTYWx0ZWRfXwUro4TI5Z90N NYoOJAalTbaDj1HQfFdnxP2bd4kWlStL3Lc18ckdRZnWFwfqnLjZLackh/zUgMaBKqFWSbZBt+N u/h5wdUfaGMV/1Nkp1SevBoneArVfyw= X-Proofpoint-ORIG-GUID: qG-hNu_X9rujCW5UNjdr1ddTEssjqQ6_ X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.134,FMLib:17.12.100.49 definitions=2026-08-29_06,2026-08-27_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 priorityscore=1501 spamscore=0 adultscore=0 impostorscore=0 suspectscore=0 lowpriorityscore=0 bulkscore=0 malwarescore=0 phishscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606150000 definitions=main-2608290171 Common style violation is usage of underscores in node or property names, so add rules for following recommended names. There is plenty of legacy approach, so add the rules only for 'strict' mode of checking. Signed-off-by: Krzysztof Kozlowski --- scripts/dtc/dt-check-style | 31 +++++++++++ .../dtc/dt-style-selftest/bad/dts-node-name.dts | 60 ++++++++++++++++++= ++++ .../dt-style-selftest/bad/dts-property-name.dts | 28 ++++++++++ .../dtc/dt-style-selftest/bad/yaml-node-name.yaml | 54 +++++++++++++++++++ .../dt-style-selftest/bad/yaml-property-name.yaml | 46 +++++++++++++++++ .../expected/dts-node-name.dts.txt | 13 +++++ .../expected/dts-property-name.dts.txt | 14 +++++ .../expected/yaml-node-name.yaml.txt | 7 +++ .../expected/yaml-property-name.yaml.txt | 14 +++++ 9 files changed, 267 insertions(+) diff --git a/scripts/dtc/dt-check-style b/scripts/dtc/dt-check-style index 7c3ee1432dc6..16586d0029ff 100755 --- a/scripts/dtc/dt-check-style +++ b/scripts/dtc/dt-check-style @@ -676,6 +676,31 @@ def check_node_close_alone(ctx): 'closing brace must be on its own line') =20 =20 +def check_node_name(ctx): + """Only recommended characters are used in node names.""" + for dl in ctx.lines: + if not dl.node_name in (None, '/'): + if not re.match(r'[0-9a-z][0-9a-z-]*(?; + #size-cells =3D <1>; + + foo_bar { + compatible =3D "example,test-node-name"; + }; + + foo,bar { + compatible =3D "example,test-node-name"; + }; + + foo.bar { + compatible =3D "example,test-node-name"; + }; + + foo+bar { + compatible =3D "example,test-node-name"; + }; + + foo-bar- { + compatible =3D "example,test-node-name"; + }; + + soc@0 { + compatible =3D "simple-bus"; + ranges =3D <0 0 0 0xc0000000>; + + #address-cells =3D <1>; + #size-cells =3D <1>; + + foo_bar@1000 { + compatible =3D "example,test-node-name"; + reg =3D <0x1000 0x100>; + }; + + foo,bar@2000 { + compatible =3D "example,test-node-name"; + reg =3D <0x2000 0x100>; + }; + + foo.bar@3000 { + compatible =3D "example,test-node-name"; + reg =3D <0x3000 0x100>; + }; + + foo+bar@4000 { + compatible =3D "example,test-node-name"; + reg =3D <0x4000 0x100>; + }; + + foo-bar-@5000 { + compatible =3D "example,test-node-name"; + reg =3D <0x5000 0x100>; + }; + }; +}; diff --git a/scripts/dtc/dt-style-selftest/bad/dts-property-name.dts b/scri= pts/dtc/dt-style-selftest/bad/dts-property-name.dts new file mode 100644 index 000000000000..110e33a524dd --- /dev/null +++ b/scripts/dtc/dt-style-selftest/bad/dts-property-name.dts @@ -0,0 +1,28 @@ +// SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +/dts-v1/; + +/ { + #address-cells =3D <1>; + #size-cells =3D <1>; + + foo { + compatible =3D "example,test-property-name"; + + property#foo; + property+foo; + property-foo; + property-foo-; + property.foo; + property?foo; + property_foo; + + vendor,property#foo; + vendor,property+foo; + vendor,property,foo; + vendor,property-foo; + vendor,property-foo-; + vendor,property.foo; + vendor,property?foo; + vendor,property_foo; + }; +}; diff --git a/scripts/dtc/dt-style-selftest/bad/yaml-node-name.yaml b/script= s/dtc/dt-style-selftest/bad/yaml-node-name.yaml new file mode 100644 index 000000000000..03373cae9a66 --- /dev/null +++ b/scripts/dtc/dt-style-selftest/bad/yaml-node-name.yaml @@ -0,0 +1,54 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/test-node-name.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Test fixture with incorrect node names + +maintainers: + - Rob Herring + +properties: + compatible: + const: example,test-node-name + reg: + maxItems: 1 + +required: + - compatible + +additionalProperties: false + +examples: + - | + foo_bar@1000 { + compatible =3D "example,test-node-name"; + reg =3D <0x1000 0x100>; + }; + + foo,bar@2000 { + compatible =3D "example,test-node-name"; + reg =3D <0x2000 0x100>; + }; + + foo.bar@3000 { + compatible =3D "example,test-node-name"; + reg =3D <0x3000 0x100>; + }; + + foo+bar@4000 { + compatible =3D "example,test-node-name"; + reg =3D <0x4000 0x100>; + }; + + foo-bar-@5000 { + compatible =3D "example,test-node-name"; + reg =3D <0x5000 0x100>; + }; + + // TODO handle also "-foo-bar" which is against spec but accepted by D= TC + + foo_bar { + compatible =3D "example,test-node-name"; + }; diff --git a/scripts/dtc/dt-style-selftest/bad/yaml-property-name.yaml b/sc= ripts/dtc/dt-style-selftest/bad/yaml-property-name.yaml new file mode 100644 index 000000000000..08e0d1eb152a --- /dev/null +++ b/scripts/dtc/dt-style-selftest/bad/yaml-property-name.yaml @@ -0,0 +1,46 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/test-property-name.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Test fixture with incorrect property names + +maintainers: + - Rob Herring + +properties: + compatible: + const: example,test-property-name + reg: + maxItems: 1 + +required: + - compatible + - reg + +additionalProperties: false + +examples: + - | + foo@1000 { + compatible =3D "example,test-property-name"; + reg =3D <0x1000 0x100>; + + property#foo; + property+foo; + property-foo; + property-foo-; + property.foo; + property?foo; + property_foo; + + vendor,property#foo; + vendor,property+foo; + vendor,property,foo; + vendor,property-foo; + vendor,property-foo-; + vendor,property.foo; + vendor,property?foo; + vendor,property_foo; + }; diff --git a/scripts/dtc/dt-style-selftest/expected/dts-node-name.dts.txt b= /scripts/dtc/dt-style-selftest/expected/dts-node-name.dts.txt new file mode 100644 index 000000000000..bd8d7e21e243 --- /dev/null +++ b/scripts/dtc/dt-style-selftest/expected/dts-node-name.dts.txt @@ -0,0 +1,13 @@ +# mode=3Dstrict +bad/dts-node-name.dts:8: [node-name] node name "foo_bar" is using discoura= ged style +bad/dts-node-name.dts:12: [child-name-order] child node 'foo,bar' out of n= ame order +bad/dts-node-name.dts:12: [node-name] node name "foo,bar" is using discour= aged style +bad/dts-node-name.dts:16: [node-name] node name "foo.bar" is using discour= aged style +bad/dts-node-name.dts:20: [child-name-order] child node 'foo+bar' out of n= ame order +bad/dts-node-name.dts:20: [node-name] node name "foo+bar" is using discour= aged style +bad/dts-node-name.dts:24: [node-name] node name "foo-bar-" is using discou= raged style +bad/dts-node-name.dts:35: [node-name] node name "foo_bar" is using discour= aged style +bad/dts-node-name.dts:40: [node-name] node name "foo,bar" is using discour= aged style +bad/dts-node-name.dts:45: [node-name] node name "foo.bar" is using discour= aged style +bad/dts-node-name.dts:50: [node-name] node name "foo+bar" is using discour= aged style +bad/dts-node-name.dts:55: [node-name] node name "foo-bar-" is using discou= raged style diff --git a/scripts/dtc/dt-style-selftest/expected/dts-property-name.dts.t= xt b/scripts/dtc/dt-style-selftest/expected/dts-property-name.dts.txt new file mode 100644 index 000000000000..f447743383da --- /dev/null +++ b/scripts/dtc/dt-style-selftest/expected/dts-property-name.dts.txt @@ -0,0 +1,14 @@ +# mode=3Dstrict +bad/dts-property-name.dts:11: [property-name] property name "property#foo"= is using discouraged style +bad/dts-property-name.dts:12: [property-name] property name "property+foo"= is using discouraged style +bad/dts-property-name.dts:14: [property-name] property name "property-foo-= " is using discouraged style +bad/dts-property-name.dts:15: [property-name] property name "property.foo"= is using discouraged style +bad/dts-property-name.dts:16: [property-name] property name "property?foo"= is using discouraged style +bad/dts-property-name.dts:17: [property-name] property name "property_foo"= is using discouraged style +bad/dts-property-name.dts:19: [property-name] property name "vendor,proper= ty#foo" is using discouraged style +bad/dts-property-name.dts:20: [property-name] property name "vendor,proper= ty+foo" is using discouraged style +bad/dts-property-name.dts:21: [property-name] property name "vendor,proper= ty,foo" is using discouraged style +bad/dts-property-name.dts:23: [property-name] property name "vendor,proper= ty-foo-" is using discouraged style +bad/dts-property-name.dts:24: [property-name] property name "vendor,proper= ty.foo" is using discouraged style +bad/dts-property-name.dts:25: [property-name] property name "vendor,proper= ty?foo" is using discouraged style +bad/dts-property-name.dts:26: [property-name] property name "vendor,proper= ty_foo" is using discouraged style diff --git a/scripts/dtc/dt-style-selftest/expected/yaml-node-name.yaml.txt= b/scripts/dtc/dt-style-selftest/expected/yaml-node-name.yaml.txt new file mode 100644 index 000000000000..d9cf749e35c2 --- /dev/null +++ b/scripts/dtc/dt-style-selftest/expected/yaml-node-name.yaml.txt @@ -0,0 +1,7 @@ +# mode=3Dstrict +bad/yaml-node-name.yaml:25: example 0 [node-name] node name "foo_bar" is u= sing discouraged style +bad/yaml-node-name.yaml:30: example 0 [node-name] node name "foo,bar" is u= sing discouraged style +bad/yaml-node-name.yaml:35: example 0 [node-name] node name "foo.bar" is u= sing discouraged style +bad/yaml-node-name.yaml:40: example 0 [node-name] node name "foo+bar" is u= sing discouraged style +bad/yaml-node-name.yaml:45: example 0 [node-name] node name "foo-bar-" is = using discouraged style +bad/yaml-node-name.yaml:52: example 0 [node-name] node name "foo_bar" is u= sing discouraged style diff --git a/scripts/dtc/dt-style-selftest/expected/yaml-property-name.yaml= .txt b/scripts/dtc/dt-style-selftest/expected/yaml-property-name.yaml.txt new file mode 100644 index 000000000000..6aa3a004532b --- /dev/null +++ b/scripts/dtc/dt-style-selftest/expected/yaml-property-name.yaml.txt @@ -0,0 +1,14 @@ +# mode=3Dstrict +bad/yaml-property-name.yaml:30: example 0 [property-name] property name "p= roperty#foo" is using discouraged style +bad/yaml-property-name.yaml:31: example 0 [property-name] property name "p= roperty+foo" is using discouraged style +bad/yaml-property-name.yaml:33: example 0 [property-name] property name "p= roperty-foo-" is using discouraged style +bad/yaml-property-name.yaml:34: example 0 [property-name] property name "p= roperty.foo" is using discouraged style +bad/yaml-property-name.yaml:35: example 0 [property-name] property name "p= roperty?foo" is using discouraged style +bad/yaml-property-name.yaml:36: example 0 [property-name] property name "p= roperty_foo" is using discouraged style +bad/yaml-property-name.yaml:38: example 0 [property-name] property name "v= endor,property#foo" is using discouraged style +bad/yaml-property-name.yaml:39: example 0 [property-name] property name "v= endor,property+foo" is using discouraged style +bad/yaml-property-name.yaml:40: example 0 [property-name] property name "v= endor,property,foo" is using discouraged style +bad/yaml-property-name.yaml:42: example 0 [property-name] property name "v= endor,property-foo-" is using discouraged style +bad/yaml-property-name.yaml:43: example 0 [property-name] property name "v= endor,property.foo" is using discouraged style +bad/yaml-property-name.yaml:44: example 0 [property-name] property name "v= endor,property?foo" is using discouraged style +bad/yaml-property-name.yaml:45: example 0 [property-name] property name "v= endor,property_foo" is using discouraged style --=20 2.53.0 From nobody Sat Sep 26 21:14:38 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 982E9418361 for ; Sat, 29 Aug 2026 19:53: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=1788033230; cv=none; b=AsNNdEGZcPUBVAo6WyeTzEiYAQ6vsN7+p2OcL+2t4/xqOnonO9Z37p5PlSpQSPoq3f1ljDW45X3DbfBWXEcUSltVEncC8xB1nSq0Y+gdo5T1vsyiuIJgvNWlL/AmHg0gUX88LlDe2McpE95+Uy8kFFrd1R9CeNIuH99hufLSsIo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788033230; c=relaxed/simple; bh=iZ7kxAYOe2OYWdnO4grzTIpuBcpF4HJqDWXR9s55Kjs=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=Elzej+WJ21lBT81KRe/xraHDoMqt6VUMp7TeO2dVHynZ9h4B6zZG73NA7dVLlLuZQ+lUAJFWVJTc18YaHWdyy5F1Z2PBSQeQRJG8zBMjjECZFn8/33pTVmpLPXMViym4Nbdy0OTjKl3GQjtt1lQ/ZA4YZHYX9VzKh7+HCDd3fz8= 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=Uoq6oqGM; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=CWzFM5R3; 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="Uoq6oqGM"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="CWzFM5R3" 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 67TJlRP62172052 for ; Sat, 29 Aug 2026 19:53: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= pNWywZRY3hqYyg7MNBi2W+xfS3nRxOvH72P+/hAKjRo=; b=Uoq6oqGM8nzPiWb1 JX4yk4Dwho80vfxVVLsFcgADiqRItwGYQqx0jVsUu15jGsYV/Bb6jlwIGbp5wE+z ciYl6NXLK3kOrnouY03+ciSw/zCE6FyfUTTAt65vnfyLB5/2qr/gEGqIpHnscN5M 23Vx8ODT16UCpktz3G0MTc1b1M4GZ/7xUH6NYrhiEBsCxIjn/xQvfi3bFzKICjR/ lg6nwvWORYDc/vR7LL7hI8/+Co/VJVsixrh76Kft71H2nafZWMCckeiexYy9mjiO 4IKuyc1UwdHfB9Z+e+lzmH9mBOuuZJXWPXUyeYkNyB26oWrA20wuFN70iHEzyrTI lluEow== 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 4gbqt6hmax-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Sat, 29 Aug 2026 19:53:47 +0000 (GMT) Received: by mail-qt1-f200.google.com with SMTP id d75a77b69052e-52fb8f67601so28106961cf.3 for ; Sat, 29 Aug 2026 12:53:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1788033227; x=1788638027; 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=pNWywZRY3hqYyg7MNBi2W+xfS3nRxOvH72P+/hAKjRo=; b=CWzFM5R3Q85i/nXCnlRvPzSbMvlsfqMkhuhydUzAkLyZubGtLUdWYGySY0QcfYihjS v2itlpSSmDMJBduyYsqjBWjOYQ96FnOgCTtGbZ9M4d2gw+u3jlldreRKz1I9/cbTImEH 6YaTWpLcXvJH7urC1U9JiPXwsXDuqOb9rj+PzeuZWikyZXfQn2vGDj1kJIECbUGVnvSJ M+SZlqmts61LmTvMjl3VoIkVSMBegiF4dQ4HICUbt9BeJH1qE+RHdQn3DULXIUqSLhzj E2ODgHiSf1H35evcMnp7wyoiGI1JgudeuVFFt5WT8fb+YulqyOdsarzOK/zSM8B7UByQ JiaQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1788033227; x=1788638027; 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=pNWywZRY3hqYyg7MNBi2W+xfS3nRxOvH72P+/hAKjRo=; b=Z2tv+zZMdaW5FSiRXqStgv9HdQQEAzF3eUuqFt3ansULXZb3v5ZCYdjKsV6eimzhSf WRq7ijbVbBh8WB2UNATMHtkNj/JmJngeuJMNsTgKAjr+TL8x4dFLEkp78ygk6fjbjz8z VEzltA2/sMy6K5kvRV4pa6TQ/Gbf1DYNhfFHu9/zAv2+of+/UHc+8i1S6IpnRE7l31hR f+jRRrEBa7JbEkro4InW/Q+McRjmwsOZCyvXUikTmYUbvs1tP5MSTi1a834S4NLKb2pk w3so4F+ivtip3KGX/9FdU5AwS1zvvewdZipm8xriLhMqfpucwQl9EbQAzGgchsYTAB2J 4lqA== X-Forwarded-Encrypted: i=1; AHgh+RqZ597Fe+3YKS8txTopkhFY894URw/Bj46nFVAQ1X2LHry7WtYUN4Xi83SojZ2a3ZOJ5b3pF+Q8QTqlNIg=@vger.kernel.org X-Gm-Message-State: AFuF++lyPAJufR5NoelfqTX83ibDcdiSXRZwwp+MAS5XMm5f4pGVXrWP KiR7zDf/NTqqypFiV69pouNmpJmeGoaBV2Ggob5b92saNsO1kwqpq4nxicWGVpAKlTf7bUcxAwh i0qC5K2sGNwBp0dli05f9Pe/seExIfEHx0ql2GQUJ0sgwWAPsx+Cqu4UhSDhfZtIupMQ= X-Gm-Gg: AR+sD10RXdxSbs2eZRdsMmnHZHtsxZQH2TRsHXLiMxzyeDgMpoYQWi7GBj0UGATxjIz OQlJr12woqWpiPLDlkMNdoKCPAzoph8qkaXF7tB76xbLB2LfJif52M2q+9ThYHD2KLAGkuQDuHq sbBHTGyaDaBIoiMLQqK0CJcOZfBuzRZNUmp4pK2W/Um0Vum3W1dvRqW/btlfZTnmrX5Z9iSJiSx JD6Rb/K2Ulni2xmSoHMv33IQAtT7UM0Qi/MOwqjwdqmRO1k8TqhmTpTpgVYo5pTD70lYe77UFjL LpqN2/nQfEIHf4DE8MAIVH1rD7TIesrnZ6owU1c3iv8chgVAaetNYFHxSVouk3eDRt3vtGaMFau zAC8GMDMBatyfgxUq2Mqt5p0= X-Received: by 2002:a05:622a:1b0e:b0:52d:4f43:d5b0 with SMTP id d75a77b69052e-52fb9640c97mr193397551cf.22.1788033226815; Sat, 29 Aug 2026 12:53:46 -0700 (PDT) X-Received: by 2002:a05:622a:1b0e:b0:52d:4f43:d5b0 with SMTP id d75a77b69052e-52fb9640c97mr193397061cf.22.1788033226243; Sat, 29 Aug 2026 12:53:46 -0700 (PDT) Received: from [127.0.1.1] ([178.197.219.214]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-482fbb32d30sm12446343f8f.34.2026.08.29.12.53.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 29 Aug 2026 12:53:44 -0700 (PDT) From: Krzysztof Kozlowski Date: Sat, 29 Aug 2026 21:53:21 +0200 Subject: [PATCH 5/6] dtc: dt-check-style: Check for indentation also in continued lines of 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: <20260829-dts-style-checker-sort-v1-5-6693a37d7ae1@oss.qualcomm.com> References: <20260829-dts-style-checker-sort-v1-0-6693a37d7ae1@oss.qualcomm.com> In-Reply-To: <20260829-dts-style-checker-sort-v1-0-6693a37d7ae1@oss.qualcomm.com> To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Saravana Kannan Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, sashiko-bot@kernel.org, Krzysztof Kozlowski X-Mailer: b4 0.16.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=2034; i=krzysztof.kozlowski@oss.qualcomm.com; h=from:subject:message-id; bh=iZ7kxAYOe2OYWdnO4grzTIpuBcpF4HJqDWXR9s55Kjs=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBqkzi3jjZUVzOqI7uY0+sjO5kFDm+1lIgJlsqL3 sSpPI/YEA6JAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCapM4twAKCRDBN2bmhouD 1zJCD/9nWclmLDjo5uaIC9A2TYLqyIJhYKMzJ0vYJKj8XyJZCeGwthZILvpPq4XAUuhF/RS5zME tk7M9hpHguFgmYhCFvNAsWv+n4hQxW56sYZcsmOpcDMoVJVYXeEV4PBZP4rwApmpBGv/pSswY7Y Mr28W3PUHJimrbgpxpxIVHBBXQBI4k9wCJ5iYjMGmweI1GL0RmYbPUby48m0039sRu5KMQCTq8+ lQv6LUgG8byeqQGDYm4aaDbTC1kL6RIpJdFxnwrxhd5I6A5rgxm18yjQHna6owg9EePeIbAPxNA GvebMmmM5Y9fO3NRL+ZSxKX1x16MD/Y+3YGt412T5xom30hvmG3/kR4HP+xzhpPAt7wFfj0VAMd GSqnhml0UjNglduBQjUPTggR7ilgUYkEbGb3r02T2VrXDoZooK/+PTdY8qmusUmIDpBLgyF2czp 09ezbf/4SEgaLzYpIiPBNmIUqAzqn00WP4eXRBT+nkjRjUVKJcsIg/uBfL7jZxfeu4kNYm3AC0M NFGa2v6mSuSc3rgGuROU0WMZogCdKsFbMAPgckbpPtwLUemfxZrbzlaoeHcJtf0Ez3fsSpU2viI tAvIebtAYQnGtNhLIdc5i3akJ1SCMFXOxSl/iNMxZg0PEJ0xvM7jWXyHFqrtz0vWyVtQPnEEqfX 1DeNUYeoFXqWc3A== X-Developer-Key: i=krzysztof.kozlowski@oss.qualcomm.com; a=openpgp; fpr=9BD07E0E0C51F8D59677B7541B93437D3B41629B X-Proofpoint-ORIG-GUID: 56m2Q_eh2h82FRqjuvffUXgdS2ZeETVb X-Proofpoint-GUID: 56m2Q_eh2h82FRqjuvffUXgdS2ZeETVb X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwODI5MDE3MSBTYWx0ZWRfX2Q6cnFGp24gP Rt7lEf+uI6HnpcPRSQ4a1rTKTkNW4zwteop/WSWzrTYKcEH7pWwZtKsEQoDwIFJ7KVJzzhqSwjN gfVB5sNJFccPLAJmuwr8w17WR/MbKqF4EfXvqKTdYq2dhDs5mXeN3Jbi5T+VlbBET9NKla1kE3b fqAKvO3eLbfAsdvvEo04x8nhW9OH0J56uePkd/ZqZQUJyd8wxNZ2NJhnQF9ZNsmVV/NtzbYV+ox 8PhB42+46oSHrwv0skMn7hJy3gn50BLXjHKclNYLvCFKIJvernDfhWojGAv64OB+4QMXNe62Fyh AZg4bpY1Qi0kCVBNHOaqO8GUB1O2prpuUBd5V8/bdKPhXlgsZjkeTmVu3q2lQdOKMzhrDskMbJF 0RlV2ft7/j2oz7XHleFxS+e9gWCQLFMm7przOc92g15KOOVLV2Tk62l+zcpyVtPEkgYhhXyYK/l tUC0epAL7pKEeUmf93g== X-Authority-Analysis: v=2.4 cv=S8/pBosP c=1 sm=1 tr=0 ts=6a9338cb cx=c_pps a=JbAStetqSzwMeJznSMzCyw==:117 a=+bKQE0WJfmhK2875HamI0Q==:17 a=IkcTkHD0fZMA:10 a=Sv0fKeRqtYgA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=yx91gb_oNiZeI1HMLzn7:22 a=VwQbUJbxAAAA:8 a=EUspDBNiAAAA:8 a=UL9HGg9XUqev0i5AKH0A:9 a=QEXdDO2ut3YA:10 a=uxP6HrT_eTzRwkO_Te1X:22 X-Proofpoint-Spam-Info: AW1haW4tMjYwODI5MDE3MSBTYWx0ZWRfXwT3m06aQXtfu yfwmkJrKTZByVKbrkiqCfP8j/fq3gdU8TRb2MWCKEl9upolLaiUmYwcBbMoBMMqTFtfX7MJPMrk LT/aJIlNdS/pdrNg1B5dTeJllqTZuz4= X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.134,FMLib:17.12.100.49 definitions=2026-08-29_06,2026-08-27_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 impostorscore=0 clxscore=1015 priorityscore=1501 suspectscore=0 bulkscore=0 malwarescore=0 spamscore=0 lowpriorityscore=0 phishscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606150000 definitions=main-2608290171 Add missing code in check_mixed_indent_chars() for DTS to apply the same rule of too many spaces for indentation also for continued lines (iterating over all DtsLines is not enough). Reported-by: sashiko-bot@kernel.org Closes: https://lore.kernel.org/all/20260709180118.6935B1F000E9@smtp.kernel= .org/ Signed-off-by: Krzysztof Kozlowski --- scripts/dtc/dt-check-style | 2 ++ scripts/dtc/dt-style-selftest/expected/dts-mixed-indent.dts.txt | 1 + 2 files changed, 3 insertions(+) diff --git a/scripts/dtc/dt-check-style b/scripts/dtc/dt-check-style index 16586d0029ff..dc5a8ee23d68 100755 --- a/scripts/dtc/dt-check-style +++ b/scripts/dtc/dt-check-style @@ -652,6 +652,8 @@ def check_mixed_indent_chars(ctx): 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)') =20 =20 def check_node_close_alone(ctx): diff --git a/scripts/dtc/dt-style-selftest/expected/dts-mixed-indent.dts.tx= t b/scripts/dtc/dt-style-selftest/expected/dts-mixed-indent.dts.txt index 93146cfb51c7..1706390f5664 100644 --- a/scripts/dtc/dt-style-selftest/expected/dts-mixed-indent.dts.txt +++ b/scripts/dtc/dt-style-selftest/expected/dts-mixed-indent.dts.txt @@ -6,4 +6,5 @@ bad/dts-mixed-indent.dts:12: [mixed-indent-chars] mixed tab= s and spaces in inden bad/dts-mixed-indent.dts:13: [indent-consistent] indent mismatch (expected= depth 2 * '\t') bad/dts-mixed-indent.dts:13: [mixed-indent-chars] mixed tabs and spaces in= indent bad/dts-mixed-indent.dts:16: [mixed-indent-chars] mixed tabs and spaces in= indent +bad/dts-mixed-indent.dts:18: [mixed-indent-chars] too many space character= s in indent (more than 7) bad/dts-mixed-indent.dts:19: [indent-consistent] indent mismatch (expected= depth 2 * '\t') --=20 2.53.0 From nobody Sat Sep 26 21:14:38 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 E2D8436606A for ; Sat, 29 Aug 2026 19:53:50 +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=1788033233; cv=none; b=iUCQU1g/SiH/Ie7Fzarba0J4TFpCZemQEgLgxyi55RHWX0pwvKj3kvXHlwc6e1vViEGiHorlIMfPljeBnLj+NUG7m1HoNplGntfE5g62IEWP6jCGeLd2XeO0tm3VW8sVutssxANlbGVzWG2bU+/lwgc6WpUqzpdTo9RdOPRTySU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788033233; c=relaxed/simple; bh=Q4xOG+7CJmOJ9HgHFoiC99hD/Y1Ja8xpzFRhtIWs8pA=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=Kd9vHqxEJWE9DQAbTRNInY3djFXKOr6/wRCRyxkk/pAGETc3kiQqkrBTPedKJ+2gss4gDfFGhYTKPv8zIYrq4+4Z8mxO9D6MHI1y1gAFtYhjxJarvtfO7lNRVvUolCr4yfxSddCjKVVfKF6Z8kq3YOm/11SFcQYaP9ZoVhqVr3o= 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=n8uVxuFD; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=T3GeLwsw; 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="n8uVxuFD"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="T3GeLwsw" 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 67TJlDRM2083369 for ; Sat, 29 Aug 2026 19:53: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= A89yu4bxsqfiwMljGx17mCYDJ7tE45j5M/CKoT10KRc=; b=n8uVxuFDuLfFmk03 dw9aaqg90VH4kFsxos1WAXFrY54HNWZZL9LBmwDzDF6gMMKMqk45Z6kLcudWLJmn aU+azpRhDC+qdf8XntC5989ItcqvsypzkbgwE+HCcukS/Dk6qsJn+BE3CFv+SbEs Zd4q3jyrarzc2mtO6sU/hgUlxSfHPutIDymBLrBbEkFRp9ZqKpt3nwbhgAzWzAAl UKFWgaVteC3Ldn40Ud8WDRPfnXh+wo2SS+7nfRr1Q+qnU+rLVm6soHW/MUGpjSbO 8wgnRpZ0qJwKC1VWBm5SoXB8huZW4XbFqnXEDNdAA7PxzDG76839QkN4R9vxH2wX gMslkg== 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 4gbrq81grj-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Sat, 29 Aug 2026 19:53:50 +0000 (GMT) Received: by mail-qt1-f197.google.com with SMTP id d75a77b69052e-51c01ff996dso23504901cf.2 for ; Sat, 29 Aug 2026 12:53:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1788033229; x=1788638029; 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=A89yu4bxsqfiwMljGx17mCYDJ7tE45j5M/CKoT10KRc=; b=T3GeLwswqhQuChAe0RnN58va8QhIwL6SLLoUWPdaZMGBuoatM6Tk7BO8gam+4nGR3/ vcWy6HyDNk/V/+qXqcxhWB652zaN+BqjEGeVBFmQKdKBGtQdE9DrlL6GLELshVnD/rqN fnoVwlPC9KOlSq1x+HBW7xm8JDXhLUaae6u5wYuL1aBCDScrI9YfufFxVrwuGN6VArDi cBE3TFaYHBNZ98fA1NHob7R5OLMdRDgVmcSS3gdiCbDqy89QnBrNccieox2vaicLBLlI B//Op8QBzOtU4PW6+LkewUMJ56gP2ho6Xye0vJ9y1D3EXFg8ynvu1w+R7GJ/uYa5TSHo YTVg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1788033229; x=1788638029; 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=A89yu4bxsqfiwMljGx17mCYDJ7tE45j5M/CKoT10KRc=; b=SCNAvAQ2oHV+MqFOYCP6BVjXDvDs1Zo+6eAqfLzgTDG0tZbIiDBHyMFIXCVNOvT881 R3qg6+88VFPAcn+8xWw/aLKen87ndYJRpVsZvU96xL1aawF1Qw8aCpQVZWqBJFpmKsXw 5MdtmQ+1Lvq27L63hRdrQpQJFip2x7gubQxJvUrpfshrOVp3zbjtjIrStnMmg3WmTsPO Rd1cxkf247cyqHO+L54chu9uAZuwmY+oIi0ow8gis0RjwfszPWXbK11M99kRa1+7Og0c lHkRWbE/sylY8MTjQtTkkkxpWroBdJL2nTx5g361vecD3JBfoCy8hCKs841NZXy3AEzb ACHg== X-Forwarded-Encrypted: i=1; AHgh+Roo35/EOvvMQvcBj2ZcdPeArIrtyjAKw2QLAg9DiAYbC2LvXIjPOXqnaBZlLIbSzJh0DerjJlZKVlZuCFM=@vger.kernel.org X-Gm-Message-State: AFuF++niNO8xOoaxh9aRdPJx+pRkdpOmOj0nfAEGaQv8JcDllcZQBV4x ApAidjOpR3qH36ZiItH/BiTZSTHZ3sUzyxX+j0FvtQMi00SxVJRhCi5hegFYy4oJN9EqQJE3FHc yAxqAZhokDgVwSnmMjuIunDrYlpFtM5kfnMfg7+H0a5cxouxETcqQ7b4eFyBpyhPsNrk= X-Gm-Gg: AR+sD12rK6NUoQe+OjsxjJOoIu2C0wQqNYEw+EFmJOqoPZ+ohvwF4s0Qes3UIIzpA4B E9PQ6kLNvBdqLD9vzzxy39ap+zm8janspMYf1ZgzRGOp5KMO97QuZN2h+nSj5CEhWY3zA+bG5Le CsQhqrSD0VcVgJOLDdDvYI2YwW3m1UfVzlVB+ARSEOGTaKuFdrQDP8+v1MjMsKcKAOz8d9PiseF aPVMKqgHGZziWGWI2E9GWfCSDIYnunhvhaUxb0axyhMO0O2wli5KtK1SKxbZOq3WwFAOrX+9/ly pIf+E+aMhYbzGs1+2z8LzBKUmBAivL/36aq2UByevXfeG0IjSBSwoItpruDV15/oDPu2g1uSZQ6 Dm9qEQm/aH91wqSAnesv7zS0= X-Received: by 2002:ac8:7f93:0:b0:52d:6c37:6853 with SMTP id d75a77b69052e-52fb9490521mr182978491cf.16.1788033229201; Sat, 29 Aug 2026 12:53:49 -0700 (PDT) X-Received: by 2002:ac8:7f93:0:b0:52d:6c37:6853 with SMTP id d75a77b69052e-52fb9490521mr182978251cf.16.1788033228798; Sat, 29 Aug 2026 12:53:48 -0700 (PDT) Received: from [127.0.1.1] ([178.197.219.214]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-482fbb32d30sm12446343f8f.34.2026.08.29.12.53.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 29 Aug 2026 12:53:47 -0700 (PDT) From: Krzysztof Kozlowski Date: Sat, 29 Aug 2026 21:53:22 +0200 Subject: [PATCH 6/6] dtc: dt-check-style: Check for indentation also in continued lines of bindings example 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: <20260829-dts-style-checker-sort-v1-6-6693a37d7ae1@oss.qualcomm.com> References: <20260829-dts-style-checker-sort-v1-0-6693a37d7ae1@oss.qualcomm.com> In-Reply-To: <20260829-dts-style-checker-sort-v1-0-6693a37d7ae1@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=2171; i=krzysztof.kozlowski@oss.qualcomm.com; h=from:subject:message-id; bh=Q4xOG+7CJmOJ9HgHFoiC99hD/Y1Ja8xpzFRhtIWs8pA=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBqkzi4kK2WK0hmKDhJ+9pPyc/G4IifUG/9KYa7E hNdiRjjFMeJAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCapM4uAAKCRDBN2bmhouD 15L8D/9ivhC+vXPLKgFj4FfvkPAdj4m9Hr5qffUfAj3ThVmq8cyafZT60dcLxaTgM2Oli0SK4V5 GxDXqCFTVuv0qtUR3GPuWVL78yHf6IlK1UXzm61TTAUHBkER6+i2WRiE4sYkTCM4P6gVBl2e3n/ nu4JOOz4BNbbfbn9tteZ09a936t/jmMtgq2Hu0lrdhlpbkPlK4BX5ki/c+95JjK6Jwcb130nyr6 mNlbyy+2/E8Ymdvx8xv35TsV18rx01vsaGZN65fUDaAKuw6+Y/JmVpg40zGNS109JwB0Jc7B/A9 c6JAru/Ru9lQW/bZ2g6XPBNynwT1nnDlcXf/bil9NKaGKwU+kqbQptG1DLgPhR7Y+HgLyFkWT1d V+SgjvDee5kzQrR3pJ1DPyqn/JEI1z4l9Y+S4iF7td6rAAT9a1BN+BdsVmNDlm+37jpnLg1lva8 BOm6sOaLMUK8TFcTK5GeFtnuXlZOOl+U+47GcewOxRD6HpDODUcL88BQ/HaVnA6SV+jTO/VapCB SFlve8ql5Eue4VdAhwELR8oG4v7xdQSd3kkSJ/rZXft4yDpSlbwGiVcMUt1pjy38pbw7W4zbjPl JBeLmd98woNrGpYuOzdxf+fN4mNw6zNS1FZk+ZO+XWnbNCXHMmcoXqL21e/BagX852Gt1om1gp8 mMNIUOdamLg3obQ== X-Developer-Key: i=krzysztof.kozlowski@oss.qualcomm.com; a=openpgp; fpr=9BD07E0E0C51F8D59677B7541B93437D3B41629B X-Proofpoint-GUID: YK6OeHFjRn6SYeC7Nfh4M8ekuocnF472 X-Proofpoint-Spam-Info: AW1haW4tMjYwODI5MDE3MiBTYWx0ZWRfX8858z5daUCxp oimRhQG1gELTyBW3DrHiZJCHsSiDzOmmuqJTf5xnya34q4gcsWwHbz+N/DabN75Fs3hS3EiIEXd TLu5p+Q9OvF19IlW/ix094yqOQ3wkW0= X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwODI5MDE3MiBTYWx0ZWRfX9TRYDvCb/tSu ZKAQ++ZygjC0fN5sIZ+8rW10y6W9FAd2gAHH1qWx9x/5YdLQNKARHHvzbahULwonrLIGqPunNmU anHHyeO4TepOLLBPyIkGnvHyszVGiUjFtWRsvbzOYO3L/SW5+eOBtLjjgpEbfWoD6q7ObfhFdC6 xo5ZQqZapKrL9hwdkaSrlwmr0ET2EtHQWkSqojlF8EoEcEdMM1cfyCdgBNL9lT8T/8LrXcAdEWh s0xQY9C/jKFQKvQi29X+KiS9/m9CJDELJY5w3zjC18plsONrGxNwyHrEhRLIWzfsHDi/st33UhP 71RkDn19jzkGDwplqkcOD9Ujq0X3HAi+daE/hLw2bcgOAlFFbs3SbUksSZUE5w2aIvSIrmVkmlE j+zQjWh/QwSm5PA+EfTow9SsWLRAhC1dUry/nYcrWv6tRD0QoMKZ7udtEd/eZcukE+2i0AMY9/C SReHuHnDDlYkvKa2Etw== X-Authority-Analysis: v=2.4 cv=ZOPnX37b c=1 sm=1 tr=0 ts=6a9338ce 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=YMgV9FUhrdKAYTUUvYB2:22 a=EUspDBNiAAAA:8 a=j2IC0oPSmSx7qzX_OycA:9 a=QEXdDO2ut3YA:10 a=a_PwQJl-kcHnX1M80qC6:22 X-Proofpoint-ORIG-GUID: YK6OeHFjRn6SYeC7Nfh4M8ekuocnF472 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.134,FMLib:17.12.100.49 definitions=2026-08-29_06,2026-08-27_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 spamscore=0 malwarescore=0 lowpriorityscore=0 priorityscore=1501 adultscore=0 bulkscore=0 impostorscore=0 phishscore=0 clxscore=1015 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606150000 definitions=main-2608290172 Add missing code in check_tab_in_yaml_example() for example in the bindings to apply the same rule of discouraged tab character also for continued lines (iterating over all DtsLines is not enough). Signed-off-by: Krzysztof Kozlowski --- scripts/dtc/dt-check-style | 3 +++ scripts/dtc/dt-style-selftest/bad/yaml-mixed-indent.yaml | 2 ++ scripts/dtc/dt-style-selftest/expected/yaml-mixed-indent.yaml.txt | 1 + 3 files changed, 6 insertions(+) diff --git a/scripts/dtc/dt-check-style b/scripts/dtc/dt-check-style index dc5a8ee23d68..0ebbe658b893 100755 --- a/scripts/dtc/dt-check-style +++ b/scripts/dtc/dt-check-style @@ -959,6 +959,9 @@ def check_tab_in_yaml_example(ctx): continue if '\t' in dl.raw: yield (dl.lineno, 'tab character not allowed in DTS example') + for cont in dl.continuations: + if '\t' in cont.raw: + yield (cont.lineno, 'tab character not allowed in DTS exam= ple') =20 =20 def check_trailing_whitespace(ctx): diff --git a/scripts/dtc/dt-style-selftest/bad/yaml-mixed-indent.yaml b/scr= ipts/dtc/dt-style-selftest/bad/yaml-mixed-indent.yaml index c25a0d1a999e..4f76188b5e23 100644 --- a/scripts/dtc/dt-style-selftest/bad/yaml-mixed-indent.yaml +++ b/scripts/dtc/dt-style-selftest/bad/yaml-mixed-indent.yaml @@ -26,4 +26,6 @@ examples: device@1000 { compatible =3D "example,test-mixed"; reg =3D <0x1000 0x100>; + clocks =3D <1>, + <2>; }; diff --git a/scripts/dtc/dt-style-selftest/expected/yaml-mixed-indent.yaml.= txt b/scripts/dtc/dt-style-selftest/expected/yaml-mixed-indent.yaml.txt index bc3fc3cf00cc..442f21f90e83 100644 --- a/scripts/dtc/dt-style-selftest/expected/yaml-mixed-indent.yaml.txt +++ b/scripts/dtc/dt-style-selftest/expected/yaml-mixed-indent.yaml.txt @@ -1,2 +1,3 @@ # mode=3Drelaxed bad/yaml-mixed-indent.yaml:27: example 0 [tab-in-yaml] tab character not a= llowed in DTS example +bad/yaml-mixed-indent.yaml:30: example 0 [tab-in-yaml] tab character not a= llowed in DTS example --=20 2.53.0