[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <f16d855b-28b0-b4ee-0e42-7293d0e61c21@linexp.org>
Date: Mon, 4 Jul 2022 23:24:26 +0200
From: Daniel Lezcano <daniel.lezcano@...exp.org>
To: Zhang Rui <rui.zhang@...el.com>, daniel.lezcano@...aro.org,
rafael@...nel.org
Cc: linux-pm@...r.kernel.org, linux-kernel@...r.kernel.org,
khilman@...libre.com, abailon@...libre.com,
Amit Kucheria <amitk@...nel.org>
Subject: Re: [PATCH v3 11/12] thermal/of: Use thermal trips stored in the
thermal zone
On 04/07/2022 16:14, Zhang Rui wrote:
> On Sun, 2022-07-03 at 20:30 +0200, Daniel Lezcano wrote:
>> Now that we have the thermal trip stored in the thermal zone in a
>> generic way, we can rely on them and remove one indirection we found
>> in the thermal_of code and do one more step forward the removal of
>> the
>> duplicated structures.
>>
>> Cc: Alexandre Bailon <abailon@...libre.com>
>> Cc: Kevin Hilman <khilman@...libre.com>
>> Cc; Eduardo Valentin <eduval@...zon.com>
>> Signed-off-by: Daniel Lezcano <daniel.lezcano@...exp.org>
>> ---
[ ... ]
>> EXPORT_SYMBOL_GPL(of_thermal_get_ntrips);
>>
>> @@ -139,9 +134,7 @@ EXPORT_SYMBOL_GPL(of_thermal_get_ntrips);
>> */
>> bool of_thermal_is_trip_valid(struct thermal_zone_device *tz, int
>> trip)
>> {
>> - struct __thermal_zone *data = tz->devdata;
>> -
>> - if (!data || trip >= data->ntrips || trip < 0)
>> + if (trip >= tz->ntrips || trip < 0)
>> return false;
>>
>> return true;
>> @@ -161,12 +154,7 @@ EXPORT_SYMBOL_GPL(of_thermal_is_trip_valid);
>> const struct thermal_trip *
>> of_thermal_get_trip_points(struct thermal_zone_device *tz)
>> {
>> - struct __thermal_zone *data = tz->devdata;
>> -
>> - if (!data)
>> - return NULL;
>> -
>> - return data->trips;
>> + return tz->trips;
>> }
>> EXPORT_SYMBOL_GPL(of_thermal_get_trip_points);
>
> what is the difference between
> of_thermal_get_ntrips/of_thermal_get_trip_points and
> thermal_zone_get_ntrips/thermal_zone_get_trips as introduced in this
> patch series?
>
> we need to remove the duplications.
There is no difference between those functions. There are 34 more
patches in the pipe to be sent after this series to do more cleanups and
remove code duplication.
Powered by blists - more mailing lists