Re: [PATCH V3 2/3] thermal/drivers/cpu_cooling: Unregister with the policy
From: Viresh Kumar
Date: Wed Jun 26 2019 - 02:37:21 EST
On 26-06-19, 08:02, Daniel Lezcano wrote:
> On 26/06/2019 04:58, Viresh Kumar wrote:
> > On 25-06-19, 13:32, Daniel Lezcano wrote:
> >> diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
> >> index aee024e42618..f07454249fbc 100644
> >> --- a/drivers/cpufreq/cpufreq.c
> >> +++ b/drivers/cpufreq/cpufreq.c
> >> @@ -1379,8 +1379,8 @@ static int cpufreq_online(unsigned int cpu)
> >> cpufreq_driver->ready(policy);
> >>
> >> if (cpufreq_thermal_control_enabled(cpufreq_driver))
> >> - policy->cdev = of_cpufreq_cooling_register(policy);
> >> -
> >> + of_cpufreq_cooling_register(policy);
> >> +
> >
> > We don't need any error checking here anymore ?
>
> There was no error checking initially. This comment and the others below
> are for an additional patch IMO, not a change in this one.
right, but ...
> >> -void cpufreq_cooling_unregister(struct thermal_cooling_device *cdev)
> >> +void cpufreq_cooling_unregister(struct cpufreq_policy *policy)
> >> {
> >> struct cpufreq_cooling_device *cpufreq_cdev;
> >> bool last;
> >>
> >> - if (!cdev)
> >> - return;
we used to return without any errors from here. Now we will have
problems if regsitering fails for some reason.
--
viresh