Received: by 2002:a05:7412:b10a:b0:f3:1519:9f41 with SMTP id az10csp2333430rdb; Sun, 3 Dec 2023 12:12:46 -0800 (PST) X-Google-Smtp-Source: AGHT+IEk5b4+/xiZRlTGrpKYxhuIbwxk1Z3dHp0AcQdzViwY6L3/G8DTFIP6Nssi19sAakwY5IuL X-Received: by 2002:a17:90a:5a83:b0:286:6cd8:ef11 with SMTP id n3-20020a17090a5a8300b002866cd8ef11mr2843054pji.41.1701634366041; Sun, 03 Dec 2023 12:12:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701634366; cv=none; d=google.com; s=arc-20160816; b=ntsqfuht8nhVLfCJvsIeeM74fiwg5CmrJgK0aUE3yzsGvyC8/kxGZSwmrXceqPYetE 1gKEqacGIAiQyV102vMx0YyqaRYzOuMQ3TPYQIV6p/sUD/n+xUo5lecwU4QbNcFHa9UD pjHVeJ7Hj4TNcwDLpzqiV5ZeJG9jY+uYJkSzD1kgbNGIvJJrt89UMQt7p6XE4Wwoj4YR +ZdT+J1hXIIzqoPvYwEGnDGswgpL6gr+rLRZc00+pTWfCVT1hwI3vlUEDxlstjkjndLy geCbWo8V/fUIilUladhPMUjTtFcly0oMLRnom5JTC+g7yJKfDLgm56zpZaIhlQ4iYn94 yjcA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:message-id:references :in-reply-to:subject:cc:to:from:date:dkim-signature:mime-version; bh=iNJjh+X6J9Z2/8EV0arL00UpbZzQdKWDMWVJrQFp4PA=; fh=Z15rQDzLuaMxbyQWWV+2HaM6AHnCilNvhyb/NVAd12E=; b=MOEaYr/CYzP3IcwoBInWl4/Rb4uj0u2k2UNN169b3QbTaJlzeC608O3+oUYrEFetzN g802fwr6a8neAxoBGpaj5wHlLF+eW/BWID100MIenAQPQnJRhZAugGiiVfZCRTu3EsjW bRE4r0Rvag26RkOXjLsXpo07A5pFZ4e1z/6CSNNoeVnOSyLsiidqm5Y2Z/L68Gb1iC7z +tIahw2agYo/LEfid+k3qkJb8fGzC5XqalmXmWQKyVl1uu5jDCcf4UslJutSu40xA+1R xdUz6h4+4SAQjyDDm+rUA9hhNsgWbKnQ6cK6I1UHh2jQ+RxL2BuYOYz83UI6s8XjQ+O+ ojSQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@manjaro.org header.s=2021 header.b=ljIX4sel; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=manjaro.org Return-Path: Received: from groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id e16-20020a17090301d000b001d09ec2e2absi608515plh.482.2023.12.03.12.12.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 03 Dec 2023 12:12:46 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; dkim=pass header.i=@manjaro.org header.s=2021 header.b=ljIX4sel; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=manjaro.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id D7C6D8089E5F; Sun, 3 Dec 2023 12:12:42 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231309AbjLCUM1 (ORCPT + 99 others); Sun, 3 Dec 2023 15:12:27 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54120 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229450AbjLCUM0 (ORCPT ); Sun, 3 Dec 2023 15:12:26 -0500 Received: from mail.manjaro.org (mail.manjaro.org [IPv6:2a01:4f8:c0c:51f3::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0A3ECC0; Sun, 3 Dec 2023 12:12:31 -0800 (PST) MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=manjaro.org; s=2021; t=1701634342; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=iNJjh+X6J9Z2/8EV0arL00UpbZzQdKWDMWVJrQFp4PA=; b=ljIX4selP/ND8AJ6It0KkxBLOqBtyjfUs3s0T0C6UA8PdapcWO8fuZos8pLiUl3M7doWqt /V3Gz0oO6Ih2UIXol5JsGXO8vk003riVjOyRrAN+PVlz0hp0BlO4Ft9fddsrzin2+bA4t7 xMp6H6/iz5K4jOThAsmVxrHzXL5ONg7OCm0clj6JmtpBJA8yEj0437Bc6a9uc+kyfyvbDM mRMHYfdiVuJz63EWuVpppTT0RNTqL/nA+M4FL35JgJDjKrEgZGb7LhhZsGm8mIvchOplBw yWchPPfzmaYRYzwb+xnNetndCxJqr4s8r1Kz+uNFwx8t7FkfAwXdJLYqk9NgAA== Date: Sun, 03 Dec 2023 21:12:17 +0100 From: Dragan Simic To: Krzysztof Kozlowski Cc: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Matthias Brugger , AngeloGioacchino Del Regno , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, Andrew Davis , Andrew Lunn , Arnd Bergmann , Bjorn Andersson , Chen-Yu Tsai , Dmitry Baryshkov , Geert Uytterhoeven , Heiko Stuebner , Jonathan Corbet , Konrad Dybcio , Michal Simek , Neil Armstrong , Nishanth Menon , Olof Johansson , =?UTF-8?Q?Rafa=C5=82_Mi=C5=82ecki?= , linux-rockchip@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-amlogic@lists.infradead.org, linux-arm-msm@vger.kernel.org, workflows@vger.kernel.org, linux-doc@vger.kernel.org Subject: Re: [PATCH v3] docs: dt-bindings: add DTS Coding Style document In-Reply-To: <83b413441a953e8f2bc56adf09511a80@manjaro.org> References: <20231125184422.12315-1-krzysztof.kozlowski@linaro.org> <63ec18b2758a9e385f446fb00b60ee69@manjaro.org> <0bcc0679-b883-4435-8843-cc830122c0e1@linaro.org> <83b413441a953e8f2bc56adf09511a80@manjaro.org> Message-ID: <7021717e2e747b9c119b7c5091b60bdf@manjaro.org> X-Sender: dsimic@manjaro.org Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Authentication-Results: ORIGINATING; auth=pass smtp.auth=dsimic@manjaro.org smtp.mailfrom=dsimic@manjaro.org X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Sun, 03 Dec 2023 12:12:43 -0800 (PST) Just a brief reminder about my suggestions below, which seemingly didn't find their way into the v4. At least the first one, which improves the opening sentence, is worth including, IMHO. On 2023-11-29 12:37, Dragan Simic wrote: > On 2023-11-29 11:43, Krzysztof Kozlowski wrote: >> On 28/11/2023 21:00, Dragan Simic wrote: >>> >>> I went through the language of the entire patch, after the notice >>> that >>> the v4 would no longer accept language improvements. My wording- and >>> grammar-related suggestions are available inline below. >> >> Thanks. I want to finish this at some point and it might not happen if >> grammar fixes will be coming every patch revision. Then after we >> finish >> review, new feedback will appear about using British or American >> spelling (which reminds me old quote/email about which variant of >> English is most popular in Linux kernel: the incorrect one). > > Ah, that's a good one. :) Basically, both English variants should be > fine, but a single document should obviously use only one variant. > >>>> +===================================== >>>> +Devicetree Sources (DTS) Coding Style >>>> +===================================== >>>> + >>>> +When writing Devicetree Sources (DTS) please observe below >>>> guidelines. >>>> They >>> >>> The sentence above should be replaced with: "The following guidelines >>> are to be followed when writing Devicetree Source (DTS) files." >> >> Are you sure? It's passive and I was taught it is discouraged for >> writing. See for example: >> https://www.hamilton.edu/academics/centers/writing/seven-sins-of-writing/1 > > Hmm, you're right, passive voice is usually not the best choice. > Here's my take two for the suggested replacement sentence, which is > actually a simplified version: > > "This document contains the guidelines for writing Devicetree Source > (DTS) files." > >>>> +should be considered complementary to any rules expressed already >>>> in >>>> Devicetree >>>> +Specification and dtc compiler (including W=1 and W=2 builds). >>> >>> A definite article ("the") should be added before "Devicetree >> >> ack >> >>> Specification" and "dtc". Also, "Specification" in "Devicetree >>> Specification" should be capitalized. >> >> It was. > > Oh, sorry, I see now. IIRC, it wasn't capitalized in some places, so > I made a mistake here. > >>>> + >>>> +Individual architectures and sub-architectures can add additional >>>> rules, making >>>> +the style stricter. >>> >>> "Sub-architectures" should be replaced with "subarchitectures". "Can >> >> A hint, you can write such review feedback as: >> s/sub-architectures/subarchitectures/ > > Sure, but I specifically wanted to be less terse, as a way to be > respectful. > >> BTW, my language spelling points "subarchitectures" as mistake, but >> sure, ack. > > Using hyphens or not is almost always debatable, but modern English in > general leans toward not using them. > >>>> +3. Unit addresses shall use lowercase hex, without leading zeros >>>> (padding). >>> >>> "Lowercase hex" should be replaced with "lowercase hexadecimal >>> digits". >>> >>>> + >>>> +4. Hex values in properties, e.g. "reg", shall use lowercase hex. >>>> The >>>> address >>>> + part can be padded with leading zeros. >>> >>> "Hex values" should be replaced with "Hexadecimal values". >>> "Lowercase >>> hex" should be replaced with "lowercase hexadecimal digits". >> >> ack, but that's quite picky. We are (software) engineers so we are >> supposed to know the slang. > > Sure, but this document is of a bit formal nature, so using slightly > more formal language can only be helpful. > >>>> +2. Nodes without unit addresses shall be ordered alpha-numerically >>>> by >>>> the node >>>> + name. For a few types of nodes, they can be ordered by the main >>>> property >>>> + (e.g. pin configuration states ordered by value of "pins" >>>> property). >>> >>> "Alpha-numerically" should be replaced with "alphabetically". >> >> Are you sure? Does alphabetical order include numbers? > > That's a good question, which also crossed my mind while writing the > suggestions down. A more correct word would be "lexicographically", > with something like ", with the already defined valid characters > making the symbol set and the ACSII character set defining the > ordering, " serving as an additional explanation. > > This would be a rather formal, but also very precise definition of the > applied ordering. > >>>> +3. When extending nodes in the board DTS via &label, the entries >>>> shall >>>> be >>>> + ordered either alpha-numerically or by keeping the order from >>>> DTSI >>>> (choice >>>> + depending on sub-architecture). >>> >>> "Alpha-numerically" should be replaced with "alphabetically". >> >> Similar concern > > I agree. We could use "lexicographically" instead, with the precise > definition already established earlier in the document. > >>>> +board DTS, not in the SoC or SoM DTSI. A partial exception is a >>>> common >>>> +external reference SoC-input clock, which could be coded as a >>>> fixed-clock in >>> >>> "SoC-input" should be replaced with "SoC input". >> >> ack, thanks! > > Thank you once again for working on this document!