* Re: [PATCH 03/15] drivers: devfreq: Drop unlikely before IS_ERR(_OR_NULL)
@ 2015-08-03 5:10 MyungJoo Ham
2015-08-03 5:47 ` Viresh Kumar
0 siblings, 1 reply; 3+ messages in thread
From: MyungJoo Ham @ 2015-08-03 5:10 UTC (permalink / raw)
To: Viresh Kumar, akpm
Cc: linaro-kernel, linux-kernel, 박경민,
open list:DEVICE FREQUENCY (DEVFREQ)
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=utf-8, Size: 680 bytes --]
> 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>
@ from include/linux/err.h
#define IS_ERR_VALUE(x) unlikely((x) >= (unsigned long)-MAX_ERRNO)
...
static inline bool __must_check IS_ERR_OR_NULL(__force const void *ptr)
{
return !ptr || IS_ERR_VALUE((unsigned long)ptr);
}
"!ptr" appears not covered with IS_ERR_OR_NULL.
(only the IS_ERR part seems covered)
Cheers,
MyungJoo
ÿôèº{.nÇ+·®+%Ëÿ±éݶ\x17¥wÿº{.nÇ+·¥{±þG«éÿ{ayº\x1dÊÚë,j\a¢f£¢·hïêÿêçz_è®\x03(éÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?¨èÚ&£ø§~á¶iOæ¬z·vØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?I¥
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH 03/15] drivers: devfreq: Drop unlikely before IS_ERR(_OR_NULL)
2015-08-03 5:10 [PATCH 03/15] drivers: devfreq: Drop unlikely before IS_ERR(_OR_NULL) MyungJoo Ham
@ 2015-08-03 5:47 ` Viresh Kumar
0 siblings, 0 replies; 3+ messages in thread
From: Viresh Kumar @ 2015-08-03 5:47 UTC (permalink / raw)
To: MyungJoo Ham
Cc: akpm, linaro-kernel, linux-kernel, 박경민,
open list:DEVICE FREQUENCY (DEVFREQ)
On 03-08-15, 05:10, MyungJoo Ham 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>
>
> @ from include/linux/err.h
> #define IS_ERR_VALUE(x) unlikely((x) >= (unsigned long)-MAX_ERRNO)
> ...
> static inline bool __must_check IS_ERR_OR_NULL(__force const void *ptr)
> {
> return !ptr || IS_ERR_VALUE((unsigned long)ptr);
> }
>
> "!ptr" appears not covered with IS_ERR_OR_NULL.
> (only the IS_ERR part seems covered)
Right, the first patch of the series has fixed that.
http://permalink.gmane.org/gmane.linux.kernel/2009151
--
viresh
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH 03/15] drivers: devfreq: Drop unlikely before IS_ERR(_OR_NULL)
2015-07-31 8:38 [PATCH 00/15] trivial: " Viresh Kumar
@ 2015-07-31 8:38 ` Viresh Kumar
0 siblings, 0 replies; 3+ messages in thread
From: Viresh Kumar @ 2015-07-31 8:38 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
end of thread, other threads:[~2015-08-03 5:48 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-08-03 5:10 [PATCH 03/15] drivers: devfreq: Drop unlikely before IS_ERR(_OR_NULL) MyungJoo Ham
2015-08-03 5:47 ` Viresh Kumar
-- strict thread matches above, loose matches on Subject: below --
2015-07-31 8:38 [PATCH 00/15] trivial: " Viresh Kumar
2015-07-31 8:38 ` [PATCH 03/15] 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).