All of lore.kernel.org
 help / color / mirror / Atom feed
From: Waqar Hameed <waqar.hameed@axis.com>
To: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Cc: Bjorn Andersson <andersson@kernel.org>,
	Konrad Dybcio <konradybcio@kernel.org>,
	Abel Vesa <abelvesa@kernel.org>, Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>, <kernel@axis.com>,
	<linux-arm-msm@vger.kernel.org>, <devicetree@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 22/38] arm: dts: qcom: ipq8064: Break long property array data
Date: Fri, 16 Oct 2026 16:15:24 +0200	[thread overview]
Message-ID: <pndfqy5n343.a.out@axis.com> (raw)
In-Reply-To: <4451c072-3a11-4819-aff4-e7de100cab8b@oss.qualcomm.com>

On Mon, Oct 12, 2026 at 17:31 +0200 Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> wrote:

> On 10/2/26 12:36 AM, Waqar Hameed wrote:
>> There is an awkward line break at the last elements expression. Put all
>> elements on a newline instead. Found/fixed with dtfmt (Devicetree Source
>> formatter).
>> 
>> Signed-off-by: Waqar Hameed <waqar.hameed@axis.com>
>> ---
>>  arch/arm/boot/dts/qcom/qcom-ipq8064.dtsi | 5 +++--
>>  1 file changed, 3 insertions(+), 2 deletions(-)
>> 
>> diff --git a/arch/arm/boot/dts/qcom/qcom-ipq8064.dtsi b/arch/arm/boot/dts/qcom/qcom-ipq8064.dtsi
>> index 24632af28d52e..d2b576a37c47d 100644
>> --- a/arch/arm/boot/dts/qcom/qcom-ipq8064.dtsi
>> +++ b/arch/arm/boot/dts/qcom/qcom-ipq8064.dtsi
>> @@ -278,8 +278,9 @@ memory {
>>  
>>  	cpu-pmu {
>>  		compatible = "qcom,krait-pmu";
>> -		interrupts = <GIC_PPI 10 (GIC_CPU_MASK_SIMPLE(2) |
>> -					  IRQ_TYPE_LEVEL_HIGH)>;
>> +		interrupts = <
>> +			GIC_PPI 10 (GIC_CPU_MASK_SIMPLE(2) | IRQ_TYPE_LEVEL_HIGH)
>> +		>;
>
> Let's wrap it at 100 chars. For lines that overflow, I think we may
> need some brainstorming from the wider audience.

Yeah, as I responded in patch 19, this is hard and needs some
discussions. Having the braces on separate lines like this is one way to
do it, and in fact that's how `black` for Python does it. `rustfmt` also
chooses this but first tries to fit it on one line with a newline after
the assignment:

		interrupts =
			<GIC_PPI 10 (GIC_CPU_MASK_SIMPLE(2) | IRQ_TYPE_LEVEL_HIGH)>;

If it still doesn't fit 100 chars (like here), it then formats long
arrays as

		interrupts = <
			GIC_PPI 10 (GIC_CPU_MASK_SIMPLE(2) | IRQ_TYPE_LEVEL_HIGH)
		>;

This still doesn't fit 100 chars. Maybe we could then wrap the
individual items like:

		interrupts = <
			GIC_PPI 10
			(GIC_CPU_MASK_SIMPLE(2) | IRQ_TYPE_LEVEL_HIGH)
		>;

I think that's a reasonable algorithm to have in dtfmt for wrapping
arrays, or?

>
> For reference, we have a couple of very long lines in the Qualcomm
> soundwire nodes (qcom,soundwire-vXXX), and we just kinda let them
> overflow for the time being

I think the above approach would format them quite nicely, for example

		swr3: soundwire@6ab0000 {
			compatible = "qcom,soundwire-v2.2.0", "qcom,soundwire-v2.0.0";

			...

			qcom,ports-sinterval = /bits/ 16 <
				0x07 0x1f 0x3f 0x07 0x1f 0x3f 0x18f 0xff 0xff 0x0f 0x0f 0xff 0x31f
			>;
			qcom,ports-offset1 = /bits/ 8 <
				0x01 0x03 0x05 0x02 0x04 0x15 0x00 0xff 0xff 0x06 0x0d 0xff 0x00
			>;
			qcom,ports-offset2 = /bits/ 8 <
				0xff 0x07 0x1f 0xff 0x07 0x1f 0xff 0xff 0xff 0xff 0xff 0xff 0xff
			>;

			...
		};

in `arch/arm64/boot/dts/qcom/kaanapali.dtsi`. What do you think?

  reply	other threads:[~2026-10-16 14:15 UTC|newest]

Thread overview: 91+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-01 22:36 [PATCH 00/38] arm: dts: qcom: Format with dtfmt Waqar Hameed
2026-10-01 22:36 ` [PATCH 01/38] arm: dts: qcom: pm8226: Add newline between subnodes Waqar Hameed
2026-10-12 15:22   ` Konrad Dybcio
2026-10-01 22:36 ` [PATCH 02/38] arm: dts: qcom: pm8841: Remove superfluous empty lines Waqar Hameed
2026-10-12 15:21   ` Konrad Dybcio
2026-10-01 22:36 ` [PATCH 03/38] arm: dts: qcom: pm8921: " Waqar Hameed
2026-10-12 15:22   ` Konrad Dybcio
2026-10-01 22:36 ` [PATCH 04/38] arm: dts: qcom: pm8941: " Waqar Hameed
2026-10-12 15:22   ` Konrad Dybcio
2026-10-01 22:36 ` [PATCH 05/38] arm: dts: qcom: pm8084: Remove superfluous empty line Waqar Hameed
2026-10-12 15:22   ` Konrad Dybcio
2026-10-01 22:36 ` [PATCH 06/38] arm: dts: qcom: apq8026: Add newline between subnodes Waqar Hameed
2026-10-12 15:22   ` Konrad Dybcio
2026-10-01 22:36 ` [PATCH 07/38] arm: dts: qcom: apq8026: Add space between OR-operator Waqar Hameed
2026-10-12 15:22   ` Konrad Dybcio
2026-10-01 22:36 ` [PATCH 09/38] arm: dts: qcom: apq8060: Align multiple property data Waqar Hameed
2026-10-12 15:23   ` Konrad Dybcio
2026-10-01 22:36 ` [PATCH 08/38] arm: dts: qcom: apq8060: Add newline between subnodes Waqar Hameed
2026-10-12 15:22   ` Konrad Dybcio
2026-10-01 22:36 ` [PATCH 11/38] arm: dts: qcom: apq8064: " Waqar Hameed
2026-10-12 15:23   ` Konrad Dybcio
2026-10-16 14:14     ` Waqar Hameed
2026-10-01 22:36 ` [PATCH 10/38] arm: dts: qcom: apq8060: Indent property data with tab Waqar Hameed
2026-10-12 15:24   ` Konrad Dybcio
2026-10-16 14:14     ` Waqar Hameed
2026-10-01 22:36 ` [PATCH 12/38] arm: dts: qcom: apq8064: Remove empty line at end of node Waqar Hameed
2026-10-12 15:24   ` Konrad Dybcio
2026-10-01 22:36 ` [PATCH 14/38] arm: dts: qcom: apq8064: Align multiple property data Waqar Hameed
2026-10-12 15:52   ` Konrad Dybcio
2026-10-16 14:14     ` Waqar Hameed
2026-10-01 22:36 ` [PATCH 13/38] arm: dts: qcom: apq8064: Add space before line comments Waqar Hameed
2026-10-12 15:24   ` Konrad Dybcio
2026-10-01 22:36 ` [PATCH 15/38] arm: dts: qcom: apq8064: Remove tab after property name Waqar Hameed
2026-10-12 15:24   ` Konrad Dybcio
2026-10-01 22:36 ` [PATCH 16/38] arm: dts: qcom: ipq4018: Indent closing brace properly Waqar Hameed
2026-10-12 15:25   ` Konrad Dybcio
2026-10-01 22:36 ` [PATCH 17/38] arm: dts: qcom: ipq4019: Add newline between subnodes Waqar Hameed
2026-10-12 15:25   ` Konrad Dybcio
2026-10-01 22:36 ` [PATCH 19/38] arm: dts: qcom: ipq4019: Break long property array data Waqar Hameed
2026-10-12 15:26   ` Konrad Dybcio
2026-10-16 14:15     ` Waqar Hameed
2026-10-01 22:36 ` [PATCH 18/38] arm: dts: qcom: ipq4019: Align multiple property data Waqar Hameed
2026-10-12 15:26   ` Konrad Dybcio
2026-10-01 22:36 ` [PATCH 20/38] arm: dts: qcom: ipq8064: Add newline between subnodes Waqar Hameed
2026-10-12 15:28   ` Konrad Dybcio
2026-10-01 22:36 ` [PATCH 21/38] arm: dts: qcom: ipq8064: Align multiple property data Waqar Hameed
2026-10-12 15:28   ` Konrad Dybcio
2026-10-01 22:36 ` [PATCH 22/38] arm: dts: qcom: ipq8064: Break long property array data Waqar Hameed
2026-10-12 15:31   ` Konrad Dybcio
2026-10-16 14:15     ` Waqar Hameed [this message]
2026-10-16 14:48       ` Krzysztof Kozlowski
2026-10-01 22:36 ` [PATCH 23/38] arm: dts: qcom: msm8226: Add space between OR-operator Waqar Hameed
2026-10-12 15:28   ` Konrad Dybcio
2026-10-01 22:36 ` [PATCH 25/38] arm: dts: qcom: ipq8064: Break long property array data Waqar Hameed
2026-10-02  9:13   ` sashiko-bot
2026-10-02  9:16     ` Waqar Hameed
2026-10-01 22:36 ` [PATCH 24/38] arm: dts: qcom: msm8226: Add newline between subnodes Waqar Hameed
2026-10-12 15:28   ` Konrad Dybcio
2026-10-01 22:36 ` [PATCH 26/38] arm: dts: qcom: msm8226: Align multiple property data Waqar Hameed
2026-10-12 15:31   ` Konrad Dybcio
2026-10-16 14:15     ` Waqar Hameed
2026-10-01 22:36 ` [PATCH 27/38] arm: dts: qcom: msm8660: Remove empty line at end of node Waqar Hameed
2026-10-12 15:31   ` Konrad Dybcio
2026-10-01 22:36 ` [PATCH 28/38] arm: dts: qcom: msm8660: Remove space inside array property Waqar Hameed
2026-10-12 15:31   ` Konrad Dybcio
2026-10-01 22:36 ` [PATCH 30/38] arm: dts: qcom: msm8916: Add newline between subnodes Waqar Hameed
2026-10-12 15:31   ` Konrad Dybcio
2026-10-01 22:36 ` [PATCH 29/38] arm: dts: qcom: msm8660: Align closing array bracket Waqar Hameed
2026-10-12 15:31   ` Konrad Dybcio
2026-10-01 22:36 ` [PATCH 31/38] arm: dts: qcom: msm8960: Properly indent subnodes Waqar Hameed
2026-10-12 15:50   ` Konrad Dybcio
2026-10-01 22:36 ` [PATCH 32/38] arm: dts: qcom: msm8660: Align closing array bracket Waqar Hameed
2026-10-02  9:14   ` sashiko-bot
2026-10-02  9:16     ` Waqar Hameed
2026-10-12 15:50   ` Konrad Dybcio
2026-10-01 22:36 ` [PATCH 34/38] arm: dts: qcom: msm8974: Align closing brace properly Waqar Hameed
2026-10-12 15:51   ` Konrad Dybcio
2026-10-01 22:36 ` [PATCH 33/38] arm: dts: qcom: msm8974: Align multiple property data Waqar Hameed
2026-10-12 15:51   ` Konrad Dybcio
2026-10-01 22:36 ` [PATCH 35/38] arm: dts: qcom: msm8974: Add newline between subnodes Waqar Hameed
2026-10-12 15:51   ` Konrad Dybcio
2026-10-16 14:15     ` Waqar Hameed
2026-10-16 14:44       ` Konrad Dybcio
2026-10-01 22:36 ` [PATCH 36/38] arm: dts: qcom: sdx55: Properly indent subnode Waqar Hameed
2026-10-12 15:51   ` Konrad Dybcio
2026-10-01 22:36 ` [PATCH 37/38] arm: dts: qcom: sdx65: Remove empty line at end of node Waqar Hameed
2026-10-12 15:51   ` Konrad Dybcio
2026-10-01 22:36 ` [PATCH 38/38] arm: dts: qcom: sdx65: Align multiple property data Waqar Hameed
2026-10-12 15:52   ` Konrad Dybcio
2026-10-12 15:28 ` [PATCH 00/38] arm: dts: qcom: Format with dtfmt Konrad Dybcio
2026-10-16 14:13   ` Waqar Hameed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=pndfqy5n343.a.out@axis.com \
    --to=waqar.hameed@axis.com \
    --cc=abelvesa@kernel.org \
    --cc=andersson@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=kernel@axis.com \
    --cc=konrad.dybcio@oss.qualcomm.com \
    --cc=konradybcio@kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robh@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.