Re: [PATCH v1 6/6] thermal: netlink: Rework cdev-related notify API

From: Rafael J. Wysocki
Date: Tue Jan 09 2024 - 07:24:19 EST


On Tue, Jan 9, 2024 at 12:36 PM Daniel Lezcano
<daniel.lezcano@xxxxxxxxxx> wrote:
>
> On 15/12/2023 21:02, Rafael J. Wysocki wrote:
> > From: Rafael J. Wysocki <rafael.j.wysocki@xxxxxxxxx>
> >
> > The only actually used thermal netlink notification routine related
> > to cooling devices is thermal_notify_cdev_state_update(). The other
> > two, thermal_notify_cdev_add() and thermal_notify_cdev_delete(), are
> > never used.
>
> I think it is an oversight. These should be called in
> thermal_cooling_device_[un]register()

OK, so for now I'll just change them to take a (const) pointer to the
cdev as the argument - the rest they can get from there.

A patch adding them to thermal_cooling_device_[un]register() would be
separate, for the next cycle. Where should they be called in there?
Under thermal_list_lock I suppose?

I'll send a replacement for the $subject patch later and I'll queue up
the rest of the series.

Thanks for the reviews!