* [bug report] cpufreq: scpi: remove arm_big_little dependency
@ 2018-01-22 10:48 Dan Carpenter
2018-01-22 14:39 ` Sudeep Holla
2018-01-22 14:41 ` [PATCH] cpufreq: scpi: fix static checker warning cdev isn't an ERR_PTR Sudeep Holla
0 siblings, 2 replies; 5+ messages in thread
From: Dan Carpenter @ 2018-01-22 10:48 UTC (permalink / raw)
To: Sudeep.Holla; +Cc: linux-pm
Hello Sudeep Holla,
The patch 343a8d17fa8d: "cpufreq: scpi: remove arm_big_little
dependency" from Jan 10, 2018, leads to the following static checker
warning:
drivers/cpufreq/scpi-cpufreq.c:203 scpi_cpufreq_ready()
warn: 'cdev' isn't an ERR_PTR
drivers/cpufreq/scpi-cpufreq.c
198 static void scpi_cpufreq_ready(struct cpufreq_policy *policy)
199 {
200 struct scpi_data *priv = policy->driver_data;
201 struct thermal_cooling_device *cdev;
202
203 cdev = of_cpufreq_cooling_register(policy);
204 if (!IS_ERR(cdev))
205 priv->cdev = cdev;
of_cpufreq_cooling_register() returns NULL on error. Probably just
remove the if statement?
206 }
regards,
dan carpenter
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [bug report] cpufreq: scpi: remove arm_big_little dependency
2018-01-22 10:48 [bug report] cpufreq: scpi: remove arm_big_little dependency Dan Carpenter
@ 2018-01-22 14:39 ` Sudeep Holla
2018-01-22 14:41 ` [PATCH] cpufreq: scpi: fix static checker warning cdev isn't an ERR_PTR Sudeep Holla
1 sibling, 0 replies; 5+ messages in thread
From: Sudeep Holla @ 2018-01-22 14:39 UTC (permalink / raw)
To: Dan Carpenter; +Cc: Sudeep Holla, linux-pm
Hi Dan,
On 22/01/18 10:48, Dan Carpenter wrote:
> Hello Sudeep Holla,
>
> The patch 343a8d17fa8d: "cpufreq: scpi: remove arm_big_little
> dependency" from Jan 10, 2018, leads to the following static checker
> warning:
>
> drivers/cpufreq/scpi-cpufreq.c:203 scpi_cpufreq_ready()
> warn: 'cdev' isn't an ERR_PTR
>
> drivers/cpufreq/scpi-cpufreq.c
> 198 static void scpi_cpufreq_ready(struct cpufreq_policy *policy)
> 199 {
> 200 struct scpi_data *priv = policy->driver_data;
> 201 struct thermal_cooling_device *cdev;
> 202
> 203 cdev = of_cpufreq_cooling_register(policy);
> 204 if (!IS_ERR(cdev))
> 205 priv->cdev = cdev;
>
> of_cpufreq_cooling_register() returns NULL on error. Probably just
> remove the if statement?
>
> 206 }
>
Thanks for the report, will post the fix soon.
--
Regards,
Sudeep
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH] cpufreq: scpi: fix static checker warning cdev isn't an ERR_PTR
2018-01-22 10:48 [bug report] cpufreq: scpi: remove arm_big_little dependency Dan Carpenter
2018-01-22 14:39 ` Sudeep Holla
@ 2018-01-22 14:41 ` Sudeep Holla
2018-01-23 2:41 ` Viresh Kumar
1 sibling, 1 reply; 5+ messages in thread
From: Sudeep Holla @ 2018-01-22 14:41 UTC (permalink / raw)
To: linux-pm; +Cc: Sudeep Holla, Rafael J . Wysocki, Viresh Kumar
Commit 343a8d17fa8d ("cpufreq: scpi: remove arm_big_little dependency")
leads to the following static checker warning:
drivers/cpufreq/scpi-cpufreq.c:203 scpi_cpufreq_ready()
warn: 'cdev' isn't an ERR_PTR
of_cpufreq_cooling_register() returns NULL on error. This patch removes
the incorrect IS_ERR check on the returned pointer.
Fixes: 343a8d17fa8d ("cpufreq: scpi: remove arm_big_little dependency")
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Rafael J. Wysocki <rjw@rjwysocki.net>
Cc: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
---
drivers/cpufreq/scpi-cpufreq.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/cpufreq/scpi-cpufreq.c b/drivers/cpufreq/scpi-cpufreq.c
index 247fcbfa4cb5..efe32cbefa06 100644
--- a/drivers/cpufreq/scpi-cpufreq.c
+++ b/drivers/cpufreq/scpi-cpufreq.c
@@ -197,11 +197,8 @@ static int scpi_cpufreq_exit(struct cpufreq_policy *policy)
static void scpi_cpufreq_ready(struct cpufreq_policy *policy)
{
struct scpi_data *priv = policy->driver_data;
- struct thermal_cooling_device *cdev;
- cdev = of_cpufreq_cooling_register(policy);
- if (!IS_ERR(cdev))
- priv->cdev = cdev;
+ priv->cdev = of_cpufreq_cooling_register(policy);
}
static struct cpufreq_driver scpi_cpufreq_driver = {
--
2.7.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] cpufreq: scpi: fix static checker warning cdev isn't an ERR_PTR
2018-01-22 14:41 ` [PATCH] cpufreq: scpi: fix static checker warning cdev isn't an ERR_PTR Sudeep Holla
@ 2018-01-23 2:41 ` Viresh Kumar
2018-02-08 10:06 ` Rafael J. Wysocki
0 siblings, 1 reply; 5+ messages in thread
From: Viresh Kumar @ 2018-01-23 2:41 UTC (permalink / raw)
To: Sudeep Holla; +Cc: linux-pm, Rafael J . Wysocki
On 22-01-18, 14:41, Sudeep Holla wrote:
> Commit 343a8d17fa8d ("cpufreq: scpi: remove arm_big_little dependency")
> leads to the following static checker warning:
>
> drivers/cpufreq/scpi-cpufreq.c:203 scpi_cpufreq_ready()
> warn: 'cdev' isn't an ERR_PTR
>
> of_cpufreq_cooling_register() returns NULL on error. This patch removes
> the incorrect IS_ERR check on the returned pointer.
>
> Fixes: 343a8d17fa8d ("cpufreq: scpi: remove arm_big_little dependency")
> Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
> Cc: Rafael J. Wysocki <rjw@rjwysocki.net>
> Cc: Viresh Kumar <viresh.kumar@linaro.org>
> Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
> ---
> drivers/cpufreq/scpi-cpufreq.c | 5 +----
> 1 file changed, 1 insertion(+), 4 deletions(-)
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
--
viresh
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] cpufreq: scpi: fix static checker warning cdev isn't an ERR_PTR
2018-01-23 2:41 ` Viresh Kumar
@ 2018-02-08 10:06 ` Rafael J. Wysocki
0 siblings, 0 replies; 5+ messages in thread
From: Rafael J. Wysocki @ 2018-02-08 10:06 UTC (permalink / raw)
To: Viresh Kumar, Sudeep Holla; +Cc: linux-pm
On Tuesday, January 23, 2018 3:41:42 AM CET Viresh Kumar wrote:
> On 22-01-18, 14:41, Sudeep Holla wrote:
> > Commit 343a8d17fa8d ("cpufreq: scpi: remove arm_big_little dependency")
> > leads to the following static checker warning:
> >
> > drivers/cpufreq/scpi-cpufreq.c:203 scpi_cpufreq_ready()
> > warn: 'cdev' isn't an ERR_PTR
> >
> > of_cpufreq_cooling_register() returns NULL on error. This patch removes
> > the incorrect IS_ERR check on the returned pointer.
> >
> > Fixes: 343a8d17fa8d ("cpufreq: scpi: remove arm_big_little dependency")
> > Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
> > Cc: Rafael J. Wysocki <rjw@rjwysocki.net>
> > Cc: Viresh Kumar <viresh.kumar@linaro.org>
> > Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
> > ---
> > drivers/cpufreq/scpi-cpufreq.c | 5 +----
> > 1 file changed, 1 insertion(+), 4 deletions(-)
>
> Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Patch applied, thanks!
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2018-02-08 10:08 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-22 10:48 [bug report] cpufreq: scpi: remove arm_big_little dependency Dan Carpenter
2018-01-22 14:39 ` Sudeep Holla
2018-01-22 14:41 ` [PATCH] cpufreq: scpi: fix static checker warning cdev isn't an ERR_PTR Sudeep Holla
2018-01-23 2:41 ` Viresh Kumar
2018-02-08 10:06 ` Rafael J. Wysocki
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.