mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rjw@rjwysocki.net>
To: Viresh Kumar <viresh.kumar@linaro.org>
Cc: trivial@kernel.org, linaro-kernel@lists.linaro.org,
	linux-kernel@vger.kernel.org, Pavel Machek <pavel@ucw.cz>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Len Brown <len.brown@intel.com>,
	"open list:SUSPEND TO RAM" <linux-pm@vger.kernel.org>
Subject: Re: [PATCH V1 Resend 02/10] PM / OPP: Drop unlikely before IS_ERR(_OR_NULL)
Date: Fri, 28 Aug 2015 16:17:56 +0200	[thread overview]
Message-ID: <4143341.O8kzUSgY49@vostro.rjw.lan> (raw)
In-Reply-To: <455a29a594b92b9ba06b14249d8f61a7ffbbecc1.1439375087.git.viresh.kumar@linaro.org>

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.

  reply	other threads:[~2015-08-28 13:50 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-12 10:29 [PATCH V1 Resend 00/10] trivial: " Viresh Kumar
2015-08-12 10:29 ` [PATCH V1 Resend 01/10] err.h: add (missing) unlikely() to IS_ERR_OR_NULL() Viresh Kumar
2015-10-07 10:35   ` Viresh Kumar
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 [this message]
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
2015-08-12 10:29 ` [PATCH V1 Resend 04/10] drivers: misc: " Viresh Kumar
2015-08-12 10:29 ` [PATCH V1 Resend 05/10] drivers: net: " Viresh Kumar
2015-08-12 10:29 ` [PATCH V1 Resend 06/10] drivers: rtc: Drop (un)likely " Viresh Kumar
2015-08-12 10:41   ` Alexandre Belloni
2015-08-12 10:46     ` Viresh Kumar
2015-08-12 11:42       ` Alexandre Belloni
2015-08-12 11:47         ` Viresh Kumar
2015-08-12 10:29 ` [PATCH V1 Resend 07/10] fs: Drop unlikely " Viresh Kumar
     [not found]   ` <20150812142815.27968b32@tlielax.poochiereds.net>
2015-08-20 16:08     ` Steve French
2015-08-20 16:14       ` Viresh Kumar
2015-08-12 10:29 ` [PATCH V1 Resend 08/10] blk-cgroup: " Viresh Kumar
2015-08-12 10:29 ` [PATCH V1 Resend 09/10] mm: " Viresh Kumar
2015-08-12 10:29 ` [PATCH V1 Resend 10/10] net: " Viresh Kumar
2015-08-18  9:08 ` [PATCH V1 Resend 00/10] trivial: " 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=4143341.O8kzUSgY49@vostro.rjw.lan \
    --to=rjw@rjwysocki.net \
    --cc=gregkh@linuxfoundation.org \
    --cc=len.brown@intel.com \
    --cc=linaro-kernel@lists.linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=pavel@ucw.cz \
    --cc=trivial@kernel.org \
    --cc=viresh.kumar@linaro.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®