* 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@linux-foundation.org
Cc: linaro-kernel@lists.linaro.org, linux-kernel@vger.kernel.org,
박경민, 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* [PATCH 00/15] trivial: Drop unlikely before IS_ERR(_OR_NULL)
@ 2015-07-31 8:38 Viresh Kumar
2015-07-31 8:38 ` [PATCH 03/15] drivers: devfreq: " Viresh Kumar
0 siblings, 1 reply; 3+ messages in thread
From: Viresh Kumar @ 2015-07-31 8:38 UTC (permalink / raw)
To: akpm; +Cc: linaro-kernel, linux-kernel, Viresh Kumar
Hi,
This cleans up the usage of IS_ERR(_OR_NULL)(), where the callers have
added additional unlikely compiler flag to them. It also fixes the
definition of IS_ERR_OR_NULL(), to use unlikely for all checks it does.
Viresh Kumar (15):
err.h: add (missing) unlikely() to IS_ERR_OR_NULL()
PM / OPP: Drop unlikely before IS_ERR(_OR_NULL)
drivers: devfreq: Drop unlikely before IS_ERR(_OR_NULL)
drivers: gpu: Drop unlikely before IS_ERR(_OR_NULL)
drivers: input: Drop unlikely before IS_ERR(_OR_NULL)
drivers: md: Drop unlikely before IS_ERR(_OR_NULL)
drivers: misc: Drop unlikely before IS_ERR(_OR_NULL)
drivers: net: Drop unlikely before IS_ERR(_OR_NULL)
drivers: rtc: Drop unlikely before IS_ERR(_OR_NULL)
drivers: staging: Drop unlikely before IS_ERR(_OR_NULL)
drivers: target: Drop unlikely before IS_ERR(_OR_NULL)
fs: Drop unlikely before IS_ERR(_OR_NULL)
blk-cgroup: Drop unlikely before IS_ERR(_OR_NULL)
mm: Drop unlikely before IS_ERR(_OR_NULL)
net: Drop unlikely before IS_ERR(_OR_NULL)
drivers/base/power/opp.c | 6 +++---
drivers/devfreq/devfreq.c | 4 ++--
drivers/gpu/drm/ttm/ttm_tt.c | 4 ++--
drivers/gpu/drm/vmwgfx/vmwgfx_context.c | 2 +-
drivers/gpu/drm/vmwgfx/vmwgfx_drv.c | 2 +-
drivers/input/mouse/alps.c | 2 +-
drivers/md/dm-snap-persistent.c | 2 +-
drivers/md/dm-verity.c | 2 +-
drivers/md/persistent-data/dm-block-manager.c | 8 ++++----
drivers/misc/c2port/core.c | 2 +-
drivers/net/ethernet/ti/netcp_core.c | 4 ++--
drivers/rtc/interface.c | 2 +-
drivers/rtc/rtc-bfin.c | 2 +-
drivers/rtc/rtc-gemini.c | 2 +-
drivers/staging/android/ashmem.c | 2 +-
drivers/staging/lustre/include/linux/libcfs/libcfs.h | 2 +-
drivers/staging/lustre/lustre/obdclass/lu_object.c | 6 +++---
drivers/target/tcm_fc/tfc_cmd.c | 2 +-
fs/cifs/readdir.c | 2 +-
fs/ecryptfs/inode.c | 2 +-
fs/ext4/extents.c | 6 +++---
fs/ext4/namei.c | 2 +-
fs/namei.c | 4 ++--
fs/ncpfs/dir.c | 2 +-
fs/nfs/objlayout/objio_osd.c | 2 +-
fs/proc/proc_sysctl.c | 2 +-
include/linux/blk-cgroup.h | 2 +-
include/linux/err.h | 2 +-
mm/huge_memory.c | 2 +-
net/openvswitch/datapath.c | 2 +-
net/sctp/socket.c | 2 +-
net/socket.c | 6 +++---
32 files changed, 47 insertions(+), 47 deletions(-)
--
2.4.0
^ 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