From: Daniel Lezcano <daniel.lezcano@linaro.org>
To: "Rafael J. Wysocki" <rafael@kernel.org>
Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>,
Linux PM <linux-pm@vger.kernel.org>,
LKML <linux-kernel@vger.kernel.org>,
Linux ACPI <linux-acpi@vger.kernel.org>,
Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>,
Zhang Rui <rui.zhang@intel.com>,
Lukasz Luba <lukasz.luba@arm.com>
Subject: Re: [PATCH v1 02/13] ACPI: thermal: Collapse trip devices update functions
Date: Tue, 26 Sep 2023 23:16:19 +0200 [thread overview]
Message-ID: <eaf3cef4-628f-8f6c-b77d-c8b2ee62f50b@linaro.org> (raw)
In-Reply-To: <CAJZ5v0gA1488TeNTHNFb0yCjfqFBe8cEWZNteBmk6m_Eo4QTsQ@mail.gmail.com>
On 26/09/2023 20:04, Rafael J. Wysocki wrote:
> On Tue, Sep 26, 2023 at 7:56 PM Rafael J. Wysocki <rafael@kernel.org> wrote:
>>
>> On Tue, Sep 26, 2023 at 7:18 PM Daniel Lezcano
>> <daniel.lezcano@linaro.org> wrote:
>>>
>>> On 21/09/2023 19:49, Rafael J. Wysocki wrote:
>>>> From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
>>>>
>>>> In order to reduce code duplication, merge update_passive_devices() and
>>>> update_active_devices() into one function called update_trip_devices()
>>>> that will be used for updating both the passive and active trip points.
>>>>
>>>> No intentional functional impact.
>>>>
>>>> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
>>>> ---
>>>> drivers/acpi/thermal.c | 53 ++++++++++++++++++-------------------------------
[ ... ]
>>>> + if (index != ACPI_THERMAL_TRIP_PASSIVE) {
>>>> + method[1] = 'A';
>>>> + method[2] = 'L';
>>>> + method[3] = '0' + index;
>>>> + }
>>>
>>> Could be index > 9 ?
>>
>> I can add a check, but it will never be called with index > 9 anyway.
>
> To be more precise, update_trip_devices() is called in two places,
> acpi_thermal_init_trip() and acpi_thermal_update_trip_devices().
>
> Both of these are called either with ACPI_THERMAL_TRIP_PASSIVE passed
> as index, or from a loop over indices between 0 and
> ACPI_THERMAL_MAX_ACTIVE-1 inclusive.
Ok, thanks for clarifying
--
<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:[~2023-09-26 22:30 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-21 17:46 [PATCH v1 00/13] thermal: ACPI: More ACPI thermal improvements and modification of thermal instances Rafael J. Wysocki
2023-09-21 17:48 ` [PATCH v1 01/13] ACPI: thermal: Add device list to struct acpi_thermal_trip Rafael J. Wysocki
2023-09-26 15:17 ` Daniel Lezcano
2023-09-21 17:49 ` [PATCH v1 02/13] ACPI: thermal: Collapse trip devices update functions Rafael J. Wysocki
2023-09-26 17:18 ` Daniel Lezcano
2023-09-26 17:56 ` Rafael J. Wysocki
2023-09-26 18:04 ` Rafael J. Wysocki
2023-09-26 21:16 ` Daniel Lezcano [this message]
2023-09-26 21:33 ` Daniel Lezcano
2023-09-21 17:50 ` [PATCH v1 03/13] ACPI: thermal: Collapse trip devices update function wrappers Rafael J. Wysocki
2023-09-27 9:15 ` Daniel Lezcano
2023-09-21 17:51 ` [PATCH v1 04/13] ACPI: thermal: Merge trip initialization functions Rafael J. Wysocki
2023-09-27 11:58 ` Daniel Lezcano
2023-09-21 17:52 ` [PATCH v1 05/13] thermal: core: Store trip pointer in struct thermal_instance Rafael J. Wysocki
2023-09-27 14:56 ` Daniel Lezcano
2023-09-21 17:54 ` [PATCH v1 06/13] thermal: gov_fair_share: Rearrange get_trip_level() Rafael J. Wysocki
2023-09-27 15:00 ` Daniel Lezcano
2023-09-27 15:06 ` Rafael J. Wysocki
2023-09-27 15:37 ` Daniel Lezcano
2023-09-27 16:09 ` Rafael J. Wysocki
2023-09-21 17:55 ` [PATCH v1 07/13] thermal: gov_power_allocator: Use trip pointers instead of trip indices Rafael J. Wysocki
2023-09-27 15:10 ` Daniel Lezcano
2023-09-27 15:27 ` Rafael J. Wysocki
2023-09-27 15:46 ` Daniel Lezcano
2023-09-27 16:14 ` Rafael J. Wysocki
2023-09-21 17:56 ` [PATCH v1 08/13] thermal: gov_step_wise: Fold update_passive_instance() into its caller Rafael J. Wysocki
2023-09-21 17:58 ` [PATCH v1 09/13] thermal: core: Rename trip point index function arguments in governors Rafael J. Wysocki
2023-09-21 18:01 ` [PATCH v1 10/13] thermal: core: Allow trip pointers to be used for cooling device binding Rafael J. Wysocki
2023-09-28 7:10 ` Daniel Lezcano
2023-09-28 10:38 ` Rafael J. Wysocki
2023-09-28 13:31 ` Daniel Lezcano
2023-09-21 18:02 ` [PATCH v1 11/13] ACPI: thermal: Do not use trip indices " Rafael J. Wysocki
2023-09-28 7:24 ` Daniel Lezcano
2023-09-21 18:04 ` [PATCH v1 12/13] ACPI: thermal: Drop critical_valid and hot_valid trip flags Rafael J. Wysocki
2023-09-28 7:25 ` Daniel Lezcano
2023-09-21 18:06 ` [PATCH v1 13/13] ACPI: thermal: Rename structure fields holding temperature in deci-Kelvin Rafael J. Wysocki
2023-09-28 7:28 ` Daniel Lezcano
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=eaf3cef4-628f-8f6c-b77d-c8b2ee62f50b@linaro.org \
--to=daniel.lezcano@linaro.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=lukasz.luba@arm.com \
--cc=rafael@kernel.org \
--cc=rjw@rjwysocki.net \
--cc=rui.zhang@intel.com \
--cc=srinivas.pandruvada@linux.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;
as well as URLs for NNTP newsgroup(s).