Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1203784 > unrolled thread

[PATCH V1 Resend 02/11] PM / OPP: Drop unlikely before IS_ERR(_OR_NULL)

Started byViresh Kumar <viresh.kumar@linaro.org>
First post2015-08-10 08:20 +0200
Last post2015-08-10 23:20 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH V1 Resend 02/11] PM / OPP: Drop unlikely before IS_ERR(_OR_NULL) Viresh Kumar <viresh.kumar@linaro.org> - 2015-08-10 08:20 +0200
    Re: [PATCH V1 Resend 02/11] PM / OPP: Drop unlikely before  IS_ERR(_OR_NULL) Pavel Machek <pavel@ucw.cz> - 2015-08-10 23:20 +0200

#1203784 — [PATCH V1 Resend 02/11] PM / OPP: Drop unlikely before IS_ERR(_OR_NULL)

FromViresh Kumar <viresh.kumar@linaro.org>
Date2015-08-10 08:20 +0200
Subject[PATCH V1 Resend 02/11] PM / OPP: Drop unlikely before IS_ERR(_OR_NULL)
Message-ID<pVOBc-5JE-19@gated-at.bofh.it>
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/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 3b188f20b43f..1a6bbfa53b6f 100644
--- a/drivers/base/power/opp.c
+++ b/drivers/base/power/opp.c
@@ -134,7 +134,7 @@ static struct device_opp *_find_device_opp(struct device *dev)
 {
 	struct device_opp *tmp_dev_opp, *dev_opp = ERR_PTR(-ENODEV);
 
-	if (unlikely(IS_ERR_OR_NULL(dev))) {
+	if (IS_ERR_OR_NULL(dev)) {
 		pr_err("%s: Invalid parameters\n", __func__);
 		return ERR_PTR(-EINVAL);
 	}
@@ -172,7 +172,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;
@@ -204,7 +204,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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [next] | [standalone]


#1204570 — Re: [PATCH V1 Resend 02/11] PM / OPP: Drop unlikely before IS_ERR(_OR_NULL)

FromPavel Machek <pavel@ucw.cz>
Date2015-08-10 23:20 +0200
SubjectRe: [PATCH V1 Resend 02/11] PM / OPP: Drop unlikely before IS_ERR(_OR_NULL)
Message-ID<pW2Ea-1i4-5@gated-at.bofh.it>
In reply to#1203784
On Mon 2015-08-10 11:42:24, 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.
> 
> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>

Acked-by: Pavel Machek <pavel@ucw.cz>

-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web