* [PATCH V1 Resend 02/11] PM / OPP: Drop unlikely before IS_ERR(_OR_NULL)
[not found] <cover.1439187003.git.viresh.kumar@linaro.org>
@ 2015-08-10 6:12 ` Viresh Kumar
2015-08-10 21:15 ` Pavel Machek
2015-08-10 6:12 ` [PATCH V1 Resend 03/11] drivers: devfreq: " Viresh Kumar
1 sibling, 1 reply; 3+ messages in thread
From: Viresh Kumar @ 2015-08-10 6:12 UTC (permalink / raw)
To: akpm
Cc: linaro-kernel, linux-kernel, Viresh Kumar, Greg Kroah-Hartman,
Len Brown, open list:SUSPEND TO RAM, Pavel Machek,
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.
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
^ permalink raw reply related [flat|nested] 3+ messages in thread* [PATCH V1 Resend 03/11] drivers: devfreq: Drop unlikely before IS_ERR(_OR_NULL)
[not found] <cover.1439187003.git.viresh.kumar@linaro.org>
2015-08-10 6:12 ` [PATCH V1 Resend 02/11] PM / OPP: Drop unlikely before IS_ERR(_OR_NULL) Viresh Kumar
@ 2015-08-10 6:12 ` Viresh Kumar
1 sibling, 0 replies; 3+ messages in thread
From: Viresh Kumar @ 2015-08-10 6:12 UTC (permalink / raw)
To: akpm
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] 3+ messages in thread