From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
To: Rob Herring <robh+dt@kernel.org>
Cc: "Rafael J. Wysocki" <rafael@kernel.org>,
Daniel Lezcano <daniel.lezcano@linaro.org>,
Zhang Rui <rui.zhang@intel.com>,
Lukasz Luba <lukasz.luba@arm.com>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
Conor Dooley <conor+dt@kernel.org>,
Liviu Dudau <liviu.dudau@arm.com>,
Sudeep Holla <sudeep.holla@arm.com>,
Lorenzo Pieralisi <lpieralisi@kernel.org>,
Amit Kucheria <amit.kucheria@linaro.org>,
linux-pm@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org, stable@vger.kernel.org
Subject: Re: [PATCH 1/2] dt-bindings: thermal: correct thermal zone node name limit
Date: Wed, 3 Jan 2024 17:29:30 +0100 [thread overview]
Message-ID: <103a9eb8-c955-4a56-b9dd-9b1eea94e285@linaro.org> (raw)
In-Reply-To: <CAL_JsqKAKNHz4wPuJPX7ULhVUz=KFRtNn=coWhs3d6LWk+jtGQ@mail.gmail.com>
On 03/01/2024 16:12, Rob Herring wrote:
> On Wed, Jan 3, 2024 at 7:20 AM Krzysztof Kozlowski
> <krzysztof.kozlowski@linaro.org> wrote:
>>
>> Linux kernel uses thermal zone node name during registering thermal
>> zones and has a hard-coded limit of 20 characters, including terminating
>> NUL byte. The bindings expect node names to finish with '-thermal'
>> which is eight bytes long, thus we have only 11 characters for the reset
>> of the node name, not 12.
>>
>> Reported-by: Rob Herring <robh@kernel.org>
>> Closes: https://lore.kernel.org/all/CAL_JsqKogbT_4DPd1n94xqeHaU_J8ve5K09WOyVsRX3jxxUW3w@mail.gmail.com/
>> Fixes: 1202a442a31f ("dt-bindings: thermal: Add yaml bindings for thermal zones")
>> Cc: <stable@vger.kernel.org>
>> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
>> ---
>> Documentation/devicetree/bindings/thermal/thermal-zones.yaml | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/Documentation/devicetree/bindings/thermal/thermal-zones.yaml b/Documentation/devicetree/bindings/thermal/thermal-zones.yaml
>> index 4a8dabc48170..bbc883fd4044 100644
>> --- a/Documentation/devicetree/bindings/thermal/thermal-zones.yaml
>> +++ b/Documentation/devicetree/bindings/thermal/thermal-zones.yaml
>> @@ -49,7 +49,7 @@ properties:
>> to take when the temperature crosses those thresholds.
>>
>> patternProperties:
>> - "^[a-zA-Z][a-zA-Z0-9\\-]{1,12}-thermal$":
>> + "^[a-zA-Z][a-zA-Z0-9\\-]{1,11}-thermal$":
>
> Now off by 1 instead of 2. It should be 1 starting char, 1-10 chars,
> and 8 chars for "-thermal".
Why off by 2? prefix can be up to 11 bytes, plus 8 bytes for "-thermal"
and 1 byte for NUL. This gives 11+8+1=20, exactly the size used in Linux
kernel.
>
> Can you also add a comment that this length is due to the kernel.
Sure
Best regards,
Krzysztof
prev parent reply other threads:[~2024-01-03 16:29 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-03 14:20 [PATCH 1/2] dt-bindings: thermal: correct thermal zone node name limit Krzysztof Kozlowski
2024-01-03 14:20 ` [PATCH 2/2] arm64: dts: juno: fix thermal zone node names Krzysztof Kozlowski
2024-01-03 15:14 ` Rob Herring
2024-03-25 11:05 ` (subset) " Krzysztof Kozlowski
2024-03-25 12:52 ` Sudeep Holla
2024-01-03 15:12 ` [PATCH 1/2] dt-bindings: thermal: correct thermal zone node name limit Rob Herring
2024-01-03 16:29 ` Krzysztof Kozlowski [this message]
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=103a9eb8-c955-4a56-b9dd-9b1eea94e285@linaro.org \
--to=krzysztof.kozlowski@linaro.org \
--cc=amit.kucheria@linaro.org \
--cc=conor+dt@kernel.org \
--cc=daniel.lezcano@linaro.org \
--cc=devicetree@vger.kernel.org \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=liviu.dudau@arm.com \
--cc=lpieralisi@kernel.org \
--cc=lukasz.luba@arm.com \
--cc=rafael@kernel.org \
--cc=robh+dt@kernel.org \
--cc=rui.zhang@intel.com \
--cc=stable@vger.kernel.org \
--cc=sudeep.holla@arm.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).