From: Daniel Lezcano <daniel.lezcano@linaro.org>
To: Lukasz Luba <lukasz.luba@arm.com>
Cc: rui.zhang@intel.com, amitk@kernel.org, linux-pm@vger.kernel.org,
open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 2/3] thermal/drivers/devfreq_cooling: Use device name instead of auto-numbering
Date: Fri, 12 Mar 2021 16:53:54 +0100 [thread overview]
Message-ID: <345395f7-006d-c879-a777-c24d79ae9e23@linaro.org> (raw)
In-Reply-To: <8f17dc8b-3259-8e6a-f46b-b97495ecd550@arm.com>
On 12/03/2021 12:15, Lukasz Luba wrote:
>
>
> On 3/10/21 11:45 AM, Daniel Lezcano wrote:
>> Currently the naming of a cooling device is just a cooling technique
>> followed by a number. When there are multiple cooling devices using
>> the same technique, it is impossible to clearly identify the related
>> device as this one is just a number.
>>
>> For instance:
>>
>> thermal-devfreq-0
>> thermal-devfreq-1
>> etc ...
>>
>> The 'thermal' prefix is redundant with the subsystem namespace. This
>> patch removes the 'thermal prefix and changes the number by the device
>
> missing ' after 'thermal
>
>> name. So the naming above becomes:
>>
>> devfreq-5000000.gpu
>> devfreq-1d84000.ufshc
>> etc ...
>>
>> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
>> ---
[ ... ]
> ---------------------------------------------------------
>
> We should allocate tmp buffer for it, to not loose the meaningful part
> of that string name or end up with only the same prefix, like for the
> first 3 from top:
>
> devfreq-18321000.qco
>
> or for the GPU:
> devfreq-3d00000.qcom
>
> This is tricky area and vendors might put any non-meaningful prefix.
>
> The rest of the code looks OK, only this name construction part.
That requires a change in the thermal_core code to replace the strlcpy
into the cdev->type by a kstrdup.
Otherwise the name will be truncated in any case by the underlying
thermal_cooling_device_register() function.
--
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs
Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog
next prev parent reply other threads:[~2021-03-12 15:54 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-10 11:45 [PATCH 1/3] thermal/drivers/cpufreq_cooling: " Daniel Lezcano
2021-03-10 11:45 ` [PATCH 2/3] thermal/drivers/devfreq_cooling: " Daniel Lezcano
2021-03-12 11:15 ` Lukasz Luba
2021-03-12 15:53 ` Daniel Lezcano [this message]
2021-03-10 11:46 ` [PATCH 3/3] thermal/drivers/cpuidle_cooling: " Daniel Lezcano
2021-03-12 11:34 ` Lukasz Luba
2021-03-12 5:10 ` [PATCH 1/3] thermal/drivers/cpufreq_cooling: " Viresh Kumar
2021-03-12 10:58 ` Lukasz Luba
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=345395f7-006d-c879-a777-c24d79ae9e23@linaro.org \
--to=daniel.lezcano@linaro.org \
--cc=amitk@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=lukasz.luba@arm.com \
--cc=rui.zhang@intel.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
all inboxes | Powered by JetHome®