Re: [PATCH 22/38] arm: dts: qcom: ipq8064: Break long property array data
From: Waqar Hameed
Date: Fri Oct 16 2026 - 10:49:46 EST
On Mon, Oct 12, 2026 at 17:31 +0200 Konrad Dybcio <konrad.dybcio@xxxxxxxxxxxxxxxx> 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@xxxxxxxx>
>> ---
>> 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?