linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH V1 Resend 02/10] PM / OPP: Drop unlikely before IS_ERR(_OR_NULL)
       [not found] <cover.1439375087.git.viresh.kumar@linaro.org>
@ 2015-08-12 10:29 ` Viresh Kumar
  2015-08-28 14:17   ` Rafael J. Wysocki
  2015-08-12 10:29 ` [PATCH V1 Resend 03/10] drivers: devfreq: " Viresh Kumar
  1 sibling, 1 reply; 6+ messages in thread
From: Viresh Kumar @ 2015-08-12 10:29 UTC (permalink / raw)
  To: trivial
  Cc: linaro-kernel, linux-kernel, Viresh Kumar, Pavel Machek,
	Greg Kroah-Hartman, Len Brown, open list:SUSPEND TO RAM,
	Rafael J. Wysocki

IS_ERR(_OR_NULL) already contain an 'unlikely' compiler flag and there
is no need to do that again from its callers. Drop it.

Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
 drivers/base/power/opp.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/base/power/opp.c b/drivers/base/power/opp.c
index 51b220e615d3..97c31170437d 100644
--- a/drivers/base/power/opp.c
+++ b/drivers/base/power/opp.c
@@ -204,7 +204,7 @@ static struct device_opp *_find_device_opp(struct device *dev)
 {
 	struct device_opp *dev_opp;
 
-	if (unlikely(IS_ERR_OR_NULL(dev))) {
+	if (IS_ERR_OR_NULL(dev)) {
 		pr_err("%s: Invalid parameters\n", __func__);
 		return ERR_PTR(-EINVAL);
 	}
@@ -239,7 +239,7 @@ unsigned long dev_pm_opp_get_voltage(struct dev_pm_opp *opp)
 	opp_rcu_lockdep_assert();
 
 	tmp_opp = rcu_dereference(opp);
-	if (unlikely(IS_ERR_OR_NULL(tmp_opp)) || !tmp_opp->available)
+	if (IS_ERR_OR_NULL(tmp_opp) || !tmp_opp->available)
 		pr_err("%s: Invalid parameters\n", __func__);
 	else
 		v = tmp_opp->u_volt;
@@ -271,7 +271,7 @@ unsigned long dev_pm_opp_get_freq(struct dev_pm_opp *opp)
 	opp_rcu_lockdep_assert();
 
 	tmp_opp = rcu_dereference(opp);
-	if (unlikely(IS_ERR_OR_NULL(tmp_opp)) || !tmp_opp->available)
+	if (IS_ERR_OR_NULL(tmp_opp) || !tmp_opp->available)
 		pr_err("%s: Invalid parameters\n", __func__);
 	else
 		f = tmp_opp->rate;
-- 
2.4.0

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH V1 Resend 03/10] drivers: devfreq: Drop unlikely before IS_ERR(_OR_NULL)
       [not found] <cover.1439375087.git.viresh.kumar@linaro.org>
  2015-08-12 10:29 ` [PATCH V1 Resend 02/10] PM / OPP: Drop unlikely before IS_ERR(_OR_NULL) Viresh Kumar
@ 2015-08-12 10:29 ` Viresh Kumar
  1 sibling, 0 replies; 6+ messages in thread
From: Viresh Kumar @ 2015-08-12 10:29 UTC (permalink / raw)
  To: trivial
  Cc: linaro-kernel, linux-kernel, Viresh Kumar, Kyungmin Park,
	open list:DEVICE FREQUENCY DEVFREQ, MyungJoo Ham

IS_ERR(_OR_NULL) already contain an 'unlikely' compiler flag and there
is no need to do that again from its callers. Drop it.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
 drivers/devfreq/devfreq.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/devfreq/devfreq.c b/drivers/devfreq/devfreq.c
index ca1b362d77e2..f28a1fae5691 100644
--- a/drivers/devfreq/devfreq.c
+++ b/drivers/devfreq/devfreq.c
@@ -53,7 +53,7 @@ static struct devfreq *find_device_devfreq(struct device *dev)
 {
 	struct devfreq *tmp_devfreq;
 
-	if (unlikely(IS_ERR_OR_NULL(dev))) {
+	if (IS_ERR_OR_NULL(dev)) {
 		pr_err("DEVFREQ: %s: Invalid parameters\n", __func__);
 		return ERR_PTR(-EINVAL);
 	}
@@ -133,7 +133,7 @@ static struct devfreq_governor *find_devfreq_governor(const char *name)
 {
 	struct devfreq_governor *tmp_governor;
 
-	if (unlikely(IS_ERR_OR_NULL(name))) {
+	if (IS_ERR_OR_NULL(name)) {
 		pr_err("DEVFREQ: %s: Invalid parameters\n", __func__);
 		return ERR_PTR(-EINVAL);
 	}
-- 
2.4.0

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH V1 Resend 02/10] PM / OPP: Drop unlikely before IS_ERR(_OR_NULL)
  2015-08-28 14:17   ` Rafael J. Wysocki
@ 2015-08-28 13:52     ` Jiri Kosina
  2015-08-28 14:30       ` Rafael J. Wysocki
  2015-09-09  2:43       ` Viresh Kumar
  0 siblings, 2 replies; 6+ messages in thread
From: Jiri Kosina @ 2015-08-28 13:52 UTC (permalink / raw)
  To: Rafael J. Wysocki
  Cc: Viresh Kumar, linaro-kernel, linux-kernel, Pavel Machek,
	Greg Kroah-Hartman, Len Brown, open list:SUSPEND TO RAM

On Fri, 28 Aug 2015, Rafael J. Wysocki wrote:

> > IS_ERR(_OR_NULL) already contain an 'unlikely' compiler flag and there
> > is no need to do that again from its callers. Drop it.
> > 
> > Acked-by: Pavel Machek <pavel@ucw.cz>
> > Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
> 
> Did that go anywhere or should I apply it?

I didn't take it yet, so feel free to do so if you want.

With series like this, I usually wait a couple weeks and the pick the ones 
which haven't been picked into maintainer trees (I check that by looking 
for its presence in linux-next) through trivial.git afterwards.

-- 
Jiri Kosina
SUSE Labs


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH V1 Resend 02/10] PM / OPP: Drop unlikely before IS_ERR(_OR_NULL)
  2015-08-12 10:29 ` [PATCH V1 Resend 02/10] PM / OPP: Drop unlikely before IS_ERR(_OR_NULL) Viresh Kumar
@ 2015-08-28 14:17   ` Rafael J. Wysocki
  2015-08-28 13:52     ` Jiri Kosina
  0 siblings, 1 reply; 6+ messages in thread
From: Rafael J. Wysocki @ 2015-08-28 14:17 UTC (permalink / raw)
  To: Viresh Kumar
  Cc: trivial, linaro-kernel, linux-kernel, Pavel Machek,
	Greg Kroah-Hartman, Len Brown, open list:SUSPEND TO RAM

On Wednesday, August 12, 2015 03:59:39 PM Viresh Kumar wrote:
> IS_ERR(_OR_NULL) already contain an 'unlikely' compiler flag and there
> is no need to do that again from its callers. Drop it.
> 
> Acked-by: Pavel Machek <pavel@ucw.cz>
> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>

Did that go anywhere or should I apply it?

> ---
>  drivers/base/power/opp.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/base/power/opp.c b/drivers/base/power/opp.c
> index 51b220e615d3..97c31170437d 100644
> --- a/drivers/base/power/opp.c
> +++ b/drivers/base/power/opp.c
> @@ -204,7 +204,7 @@ static struct device_opp *_find_device_opp(struct device *dev)
>  {
>  	struct device_opp *dev_opp;
>  
> -	if (unlikely(IS_ERR_OR_NULL(dev))) {
> +	if (IS_ERR_OR_NULL(dev)) {
>  		pr_err("%s: Invalid parameters\n", __func__);
>  		return ERR_PTR(-EINVAL);
>  	}
> @@ -239,7 +239,7 @@ unsigned long dev_pm_opp_get_voltage(struct dev_pm_opp *opp)
>  	opp_rcu_lockdep_assert();
>  
>  	tmp_opp = rcu_dereference(opp);
> -	if (unlikely(IS_ERR_OR_NULL(tmp_opp)) || !tmp_opp->available)
> +	if (IS_ERR_OR_NULL(tmp_opp) || !tmp_opp->available)
>  		pr_err("%s: Invalid parameters\n", __func__);
>  	else
>  		v = tmp_opp->u_volt;
> @@ -271,7 +271,7 @@ unsigned long dev_pm_opp_get_freq(struct dev_pm_opp *opp)
>  	opp_rcu_lockdep_assert();
>  
>  	tmp_opp = rcu_dereference(opp);
> -	if (unlikely(IS_ERR_OR_NULL(tmp_opp)) || !tmp_opp->available)
> +	if (IS_ERR_OR_NULL(tmp_opp) || !tmp_opp->available)
>  		pr_err("%s: Invalid parameters\n", __func__);
>  	else
>  		f = tmp_opp->rate;
> 

-- 
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH V1 Resend 02/10] PM / OPP: Drop unlikely before IS_ERR(_OR_NULL)
  2015-08-28 13:52     ` Jiri Kosina
@ 2015-08-28 14:30       ` Rafael J. Wysocki
  2015-09-09  2:43       ` Viresh Kumar
  1 sibling, 0 replies; 6+ messages in thread
From: Rafael J. Wysocki @ 2015-08-28 14:30 UTC (permalink / raw)
  To: Jiri Kosina
  Cc: Viresh Kumar, linaro-kernel, linux-kernel, Pavel Machek,
	Greg Kroah-Hartman, Len Brown, open list:SUSPEND TO RAM

On Friday, August 28, 2015 03:52:46 PM Jiri Kosina wrote:
> On Fri, 28 Aug 2015, Rafael J. Wysocki wrote:
> 
> > > IS_ERR(_OR_NULL) already contain an 'unlikely' compiler flag and there
> > > is no need to do that again from its callers. Drop it.
> > > 
> > > Acked-by: Pavel Machek <pavel@ucw.cz>
> > > Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
> > 
> > Did that go anywhere or should I apply it?
> 
> I didn't take it yet, so feel free to do so if you want.
> 
> With series like this, I usually wait a couple weeks and the pick the ones 
> which haven't been picked into maintainer trees (I check that by looking 
> for its presence in linux-next) through trivial.git afterwards.

OK, I'll apply it then, thanks!

Rafael


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH V1 Resend 02/10] PM / OPP: Drop unlikely before IS_ERR(_OR_NULL)
  2015-08-28 13:52     ` Jiri Kosina
  2015-08-28 14:30       ` Rafael J. Wysocki
@ 2015-09-09  2:43       ` Viresh Kumar
  1 sibling, 0 replies; 6+ messages in thread
From: Viresh Kumar @ 2015-09-09  2:43 UTC (permalink / raw)
  To: Jiri Kosina
  Cc: Rafael J. Wysocki, linaro-kernel, linux-kernel, Pavel Machek,
	Greg Kroah-Hartman, Len Brown, open list:SUSPEND TO RAM

On 28-08-15, 15:52, Jiri Kosina wrote:
> With series like this, I usually wait a couple weeks and the pick the ones 
> which haven't been picked into maintainer trees (I check that by looking 
> for its presence in linux-next) through trivial.git afterwards.

Is it the right to get the remaining patches applied now?

-- 
viresh

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2015-09-09  2:43 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <cover.1439375087.git.viresh.kumar@linaro.org>
2015-08-12 10:29 ` [PATCH V1 Resend 02/10] PM / OPP: Drop unlikely before IS_ERR(_OR_NULL) Viresh Kumar
2015-08-28 14:17   ` Rafael J. Wysocki
2015-08-28 13:52     ` Jiri Kosina
2015-08-28 14:30       ` Rafael J. Wysocki
2015-09-09  2:43       ` Viresh Kumar
2015-08-12 10:29 ` [PATCH V1 Resend 03/10] drivers: devfreq: " Viresh Kumar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).