[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <0c525d16f34bedd1ea4ee4b7516c9dee5a92d419.camel@intel.com>
Date: Tue, 05 Jul 2022 09:20:38 +0800
From: Zhang Rui <rui.zhang@...el.com>
To: Daniel Lezcano <daniel.lezcano@...exp.org>,
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 Mon, 2022-07-04 at 23:24 +0200, Daniel Lezcano wrote:
> 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.
>
Good to know.
It would be nice to have a cover letter to describe the whole picture,
including this patch series and the following patches in your queue.
thanks,
rui
Powered by blists - more mailing lists