All of lore.kernel.org
 help / color / mirror / Atom feed
From: Viresh Kumar <viresh.kumar@linaro.org>
To: Daniel Lezcano <daniel.lezcano@linaro.org>
Cc: rjw@rjwysocki.net, edubezval@gmail.com,
	linux-kernel@vger.kernel.org, Sudeep Holla <sudeep.holla@arm.com>,
	Amit Daniel Kachhap <amit.kachhap@gmail.com>,
	Javi Merino <javi.merino@kernel.org>,
	Zhang Rui <rui.zhang@intel.com>, Shawn Guo <shawnguo@kernel.org>,
	Sascha Hauer <s.hauer@pengutronix.de>,
	Pengutronix Kernel Team <kernel@pengutronix.de>,
	Fabio Estevam <festevam@gmail.com>,
	NXP Linux Team <linux-imx@nxp.com>, Keerthy <j-keerthy@ti.com>,
	"open list:CPU FREQUENCY DRIVERS - ARM BIG LITTLE" 
	<linux-pm@vger.kernel.org>,
	"moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE" 
	<linux-arm-kernel@lists.infradead.org>,
	"open list:TI BANDGAP AND THERMAL DRIVER" 
	<linux-omap@vger.kernel.org>
Subject: Re: [PATCH V3 2/3] thermal/drivers/cpu_cooling: Unregister with the policy
Date: Wed, 26 Jun 2019 12:07:16 +0530	[thread overview]
Message-ID: <20190626063716.cechnzsb75q5lclr@vireshk-i7> (raw)
In-Reply-To: <da1d2603-e30a-d877-54c3-1fad218f9d57@linaro.org>

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

WARNING: multiple messages have this Message-ID (diff)
From: Viresh Kumar <viresh.kumar@linaro.org>
To: Daniel Lezcano <daniel.lezcano@linaro.org>
Cc: Keerthy <j-keerthy@ti.com>,
	"open list:CPU FREQUENCY DRIVERS - ARM BIG LITTLE"
	<linux-pm@vger.kernel.org>, Fabio Estevam <festevam@gmail.com>,
	Amit Daniel Kachhap <amit.kachhap@gmail.com>,
	rjw@rjwysocki.net, linux-kernel@vger.kernel.org,
	edubezval@gmail.com,
	"open list:TI BANDGAP AND THERMAL DRIVER"
	<linux-omap@vger.kernel.org>, NXP Linux Team <linux-imx@nxp.com>,
	Pengutronix Kernel Team <kernel@pengutronix.de>,
	Sudeep Holla <sudeep.holla@arm.com>,
	Zhang Rui <rui.zhang@intel.com>,
	Javi Merino <javi.merino@kernel.org>,
	Shawn Guo <shawnguo@kernel.org>,
	Sascha Hauer <s.hauer@pengutronix.de>,
	"moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE"
	<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH V3 2/3] thermal/drivers/cpu_cooling: Unregister with the policy
Date: Wed, 26 Jun 2019 12:07:16 +0530	[thread overview]
Message-ID: <20190626063716.cechnzsb75q5lclr@vireshk-i7> (raw)
In-Reply-To: <da1d2603-e30a-d877-54c3-1fad218f9d57@linaro.org>

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

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2019-06-26  6:37 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-25 11:32 [PATCH V3 1/3] cpufreq: Move the IS_ENABLED(CPU_THERMAL) macro in a stub Daniel Lezcano
2019-06-25 11:32 ` [PATCH V3 2/3] thermal/drivers/cpu_cooling: Unregister with the policy Daniel Lezcano
2019-06-25 11:32   ` Daniel Lezcano
2019-06-25 11:32   ` Daniel Lezcano
2019-06-26  2:58   ` Viresh Kumar
2019-06-26  2:58     ` Viresh Kumar
2019-06-26  2:58     ` Viresh Kumar
2019-06-26  6:02     ` Daniel Lezcano
2019-06-26  6:02       ` Daniel Lezcano
2019-06-26  6:37       ` Viresh Kumar [this message]
2019-06-26  6:37         ` Viresh Kumar
2019-06-26  6:37         ` Viresh Kumar
2019-06-26  9:06         ` Rafael J. Wysocki
2019-06-26  9:06           ` Rafael J. Wysocki
2019-06-26  9:06           ` Rafael J. Wysocki
2019-06-26 10:19           ` Daniel Lezcano
2019-06-26 10:19             ` Daniel Lezcano
2019-06-26 11:28             ` Rafael J. Wysocki
2019-06-26 11:28               ` Rafael J. Wysocki
2019-06-26 11:28               ` Rafael J. Wysocki
2019-06-26 12:52               ` Daniel Lezcano
2019-06-26 12:52                 ` Daniel Lezcano
2019-06-26 12:52                 ` Daniel Lezcano
2019-06-25 11:32 ` [PATCH V3 3/3] thermal/drivers/cpu_cooling: cpufreq_cooling_register returns an int Daniel Lezcano
2019-06-25 11:32   ` Daniel Lezcano
2019-06-25 11:32   ` Daniel Lezcano
2019-06-26  2:59   ` Viresh Kumar
2019-06-26  2:59     ` Viresh Kumar
2019-06-26  2:59     ` Viresh Kumar

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=20190626063716.cechnzsb75q5lclr@vireshk-i7 \
    --to=viresh.kumar@linaro.org \
    --cc=amit.kachhap@gmail.com \
    --cc=daniel.lezcano@linaro.org \
    --cc=edubezval@gmail.com \
    --cc=festevam@gmail.com \
    --cc=j-keerthy@ti.com \
    --cc=javi.merino@kernel.org \
    --cc=kernel@pengutronix.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-imx@nxp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=rjw@rjwysocki.net \
    --cc=rui.zhang@intel.com \
    --cc=s.hauer@pengutronix.de \
    --cc=shawnguo@kernel.org \
    --cc=sudeep.holla@arm.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.