[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <bf3ed6eb4a6adc4f2ee14147a33fd2a1cdb09001.1438331416.git.viresh.kumar@linaro.org>
Date: Fri, 31 Jul 2015 14:08:30 +0530
From: Viresh Kumar <viresh.kumar@...aro.org>
To: akpm@...ux-foundation.org
Cc: linaro-kernel@...ts.linaro.org, linux-kernel@...r.kernel.org,
Viresh Kumar <viresh.kumar@...aro.org>,
Andreas Dilger <andreas.dilger@...el.com>,
Arve Hjønnevåg <arve@...roid.com>,
Aya Mahfouz <mahfouz.saif.elyazal@...il.com>,
devel@...verdev.osuosl.org (open list:ANDROID DRIVERS),
Dmitry Eremin <dmiter4ever@...il.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Gulsah Kose <gulsah.1004@...il.com>,
HPDD-discuss@...ts.01.org (moderated list:STAGING - LUSTRE PARALLEL
FILESYSTEM), James Simmons <jsimmons@...radead.org>,
Joe Perches <joe@...ches.com>,
Julia Lawall <Julia.Lawall@...6.fr>,
Oleg Drokin <oleg.drokin@...el.com>,
Pekka Enberg <penberg@...nel.org>,
Riley Andrews <riandrews@...roid.com>,
Serguey Parkhomovsky <sergueyparkhomovsky@...il.com>,
Supriya Karanth <iskaranth@...il.com>
Subject: [PATCH 10/15] drivers: staging: Drop unlikely before IS_ERR(_OR_NULL)
IS_ERR(_OR_NULL) already contain an 'unlikely' compiler flag and there
is no need to do that again from its callers. Drop it.
This also replaces an IS_ERR(x) + (x == NULL) check to IS_ERR_OR_NULL
check.
Signed-off-by: Viresh Kumar <viresh.kumar@...aro.org>
---
drivers/staging/android/ashmem.c | 2 +-
drivers/staging/lustre/include/linux/libcfs/libcfs.h | 2 +-
drivers/staging/lustre/lustre/obdclass/lu_object.c | 6 +++---
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/staging/android/ashmem.c b/drivers/staging/android/ashmem.c
index c5c037ccf32c..9db321c63e79 100644
--- a/drivers/staging/android/ashmem.c
+++ b/drivers/staging/android/ashmem.c
@@ -388,7 +388,7 @@ static int ashmem_mmap(struct file *file, struct vm_area_struct *vma)
/* ... and allocate the backing shmem file */
vmfile = shmem_file_setup(name, asma->size, vma->vm_flags);
- if (unlikely(IS_ERR(vmfile))) {
+ if (IS_ERR(vmfile)) {
ret = PTR_ERR(vmfile);
goto out;
}
diff --git a/drivers/staging/lustre/include/linux/libcfs/libcfs.h b/drivers/staging/lustre/include/linux/libcfs/libcfs.h
index 5dd9cdfae30c..d585041041c7 100644
--- a/drivers/staging/lustre/include/linux/libcfs/libcfs.h
+++ b/drivers/staging/lustre/include/linux/libcfs/libcfs.h
@@ -134,7 +134,7 @@ void cfs_get_random_bytes(void *buf, int size);
/* container_of depends on "likely" which is defined in libcfs_private.h */
static inline void *__container_of(void *ptr, unsigned long shift)
{
- if (unlikely(IS_ERR(ptr) || ptr == NULL))
+ if (IS_ERR_OR_NULL(ptr))
return ptr;
return (char *)ptr - shift;
}
diff --git a/drivers/staging/lustre/lustre/obdclass/lu_object.c b/drivers/staging/lustre/lustre/obdclass/lu_object.c
index 4d9b6333eeae..6cd3af8c6237 100644
--- a/drivers/staging/lustre/lustre/obdclass/lu_object.c
+++ b/drivers/staging/lustre/lustre/obdclass/lu_object.c
@@ -602,7 +602,7 @@ static struct lu_object *lu_object_new(const struct lu_env *env,
struct lu_site_bkt_data *bkt;
o = lu_object_alloc(env, dev, f, conf);
- if (unlikely(IS_ERR(o)))
+ if (IS_ERR(o))
return o;
hs = dev->ld_site->ls_obj_hash;
@@ -666,7 +666,7 @@ static struct lu_object *lu_object_find_try(const struct lu_env *env,
* operations, including fld queries, inode loading, etc.
*/
o = lu_object_alloc(env, dev, f, conf);
- if (unlikely(IS_ERR(o)))
+ if (IS_ERR(o))
return o;
LASSERT(lu_fid_eq(lu_object_fid(o), f));
@@ -1558,7 +1558,7 @@ static int keys_fill(struct lu_context *ctx)
LINVRNT(key->lct_index == i);
value = key->lct_init(ctx, key);
- if (unlikely(IS_ERR(value)))
+ if (IS_ERR(value))
return PTR_ERR(value);
if (!(ctx->lc_tags & LCT_NOREF))
--
2.4.0
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists