[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <7ab853de15e1c183ef184d2700a13d98@manjaro.org>
Date: Sat, 18 Jan 2025 11:10:22 +0100
From: Dragan Simic <dsimic@...jaro.org>
To: Krzysztof Kozlowski <krzk@...nel.org>
Cc: Diederik de Haas <didi.debian@...ow.org>, Peter Geis
<pgwipeout@...il.com>, Heiko Stuebner <heiko@...ech.de>, zyw@...k-chips.com,
kever.yang@...k-chips.com, frank.wang@...k-chips.com,
william.wu@...k-chips.com, wulf@...k-chips.com,
linux-rockchip@...ts.infradead.org, Alex Bee <knaerzche@...il.com>, Conor
Dooley <conor+dt@...nel.org>, Johan Jonker <jbx6244@...il.com>, Jonas
Karlman <jonas@...boo.se>, Krzysztof Kozlowski <krzk+dt@...nel.org>, Rob
Herring <robh@...nel.org>, devicetree@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [RFC PATCH v1 4/6] arm64: dts: rockchip: add rk3328 usb3 phy node
On 2025-01-18 10:52, Krzysztof Kozlowski wrote:
> On 18/01/2025 10:43, Dragan Simic wrote:
>>>>
>>>> Please see the commit bdc48fa11e46 (checkpatch/coding-style:
>>>> deprecate
>>>> 80-column warning, 2020-05-29), which clearly shows that the
>>>> 80-column
>>>> rule is still _preferred_, but no longer _mandatory_.
>>>
>>> I brought that commit, but nice that you also found it.
>>>
>>> Still: read the coding style, not checkpatch tool.
>>>
>>>>>> 80 columns is really not much (for the record, I've been around
>>>>>> when
>>>>>> using 80x25 _physical_ CRT screens was the norm).
>>>>>
>>>>> You mistake agreement on dropping strong restriction in 2020 in
>>>>> checkpatch, which is "not for years" and even read that commit:
>>>>> "Yes,
>>>>> staying withing 80 columns is certainly still _preferred_."
>>>>>
>>>>> Checkpatch is not coding style. Since when it would be? It's just a
>>>>> tool.
>>>>>
>>>>> And there were more talks and the 80-preference got relaxed yet
>>>>> still
>>>>> "not for years" (last talk was 2022?) and sill kernel coding style
>>>>> is
>>>>> here specific.
>>>>
>>>> It's perhaps again about the semantics, this time about the meaning
>>>> of "for years". I don't think there's some strict definition of
>>>> that
>>>> term, so perhaps different people see it differently.
>>>>
>>>> To get back to the above-mentioned commit bdc48fa11e46, the
>>>> 80-column
>>>> limit has obviously been lifted, putting the new 100-column limit as
>>>
>>> "Lifted" on *CHECKPATCH*, not on coding style. Do you see the
>
> Repeating myself about because you are not addressing the actual
> difference.
Please see below.
>>> difference? One is a helper tool which people were using blindly and
>>> wrapping lines without thinking, claiming that checkpatch told them
>>> to
>>> do so. Other is the actual coding style.
>>>
>>> You claim that coding style was changed. This never happened.
>>
>> It was obviously changed in the commit bdc48fa11e46, by making the
>> 80-column width preferred, instead of if being mandatory. The way
>> I read the changes to the coding style introduced in that commit,
>> it's now possible to go over 80 columns, up to 100 columns, _if_
>> that actually improves the readability of the source code.
>
> The commit is for checkpatch. Point to the change in coding style. You
> are bringing argument for checkpatch, so only a tool, as argument for
> coding style. Again, coding style did not change since years.
Commit bdc48fa11e46 obviously addresses
Documentation/process/coding-style.rst
as well, as visible in the quotation from the commit below:
-The limit on the length of lines is 80 columns and this is a strongly
-preferred limit.
-
-Statements longer than 80 columns will be broken into sensible
chunks, unless
-exceeding 80 columns significantly increases readability and does not
hide
-information. Descendants are always substantially shorter than the
parent and
-are placed substantially to the right. The same applies to function
headers
-with a long argument list. However, never break user-visible strings
such as
-printk messages, because that breaks the ability to grep for them.
+The preferred limit on the length of a single line is 80 columns.
+
+Statements longer than 80 columns should be broken into sensible
chunks,
+unless exceeding 80 columns significantly increases readability and
does
+not hide information.
+
+Descendants are always substantially shorter than the parent and are
+are placed substantially to the right. A very commonly used style
+is to align descendants to a function open parenthesis.
+
+These same rules are applied to function headers with a long argument
list.
+
+However, never break user-visible strings such as printk messages
because
+that breaks the ability to grep for them.
I think it's obvious that the 80-column width is no longer _strongly_
preferred, but has been demoted to some kind of a bit weaker preference.
Also, please note that the coding style explicitly says that the 80-
column rule is to be followed "unless exceeding 80 columns significantly
increases readability and does not hide information".
This just reinforces my opinion that the readability is what matters
most when deciding on the column width, instead of following the rules
blindly, both when deciding whether to wrap some lines at column 50,
for example, or to wrap them at column 98.
Powered by blists - more mailing lists