aboutsummaryrefslogtreecommitdiff
path: root/drivers/staging/lustre/include/linux/libcfs/libcfs_private.h
diff options
context:
space:
mode:
authorGravatar James Simmons <jsimmons@infradead.org> 2016-11-29 20:33:33 -0500
committerGravatar Greg Kroah-Hartman <gregkh@linuxfoundation.org> 2016-11-30 12:59:52 +0100
commita4424bf50b3eefd2dd08490aab19fdb752808b50 (patch)
tree68e24a2f72c42b8659f1b4501d43d07d56ab8bb1 /drivers/staging/lustre/include/linux/libcfs/libcfs_private.h
parentstaging: unisys: fix spelling mistake of "outstanding" (diff)
downloadlinux-a4424bf50b3eefd2dd08490aab19fdb752808b50.tar.gz
linux-a4424bf50b3eefd2dd08490aab19fdb752808b50.tar.bz2
linux-a4424bf50b3eefd2dd08490aab19fdb752808b50.zip
staging: lustre: libcfs: repair improper unlikely test
The scripts to replace NULL test got confused with the macro parenthesis so the unlikely test in libcfs_private.h ended up incorrect. This fixes this error. Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/lustre/include/linux/libcfs/libcfs_private.h')
-rw-r--r--drivers/staging/lustre/include/linux/libcfs/libcfs_private.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/staging/lustre/include/linux/libcfs/libcfs_private.h b/drivers/staging/lustre/include/linux/libcfs/libcfs_private.h
index fc180b8fe922..41a651f3bd96 100644
--- a/drivers/staging/lustre/include/linux/libcfs/libcfs_private.h
+++ b/drivers/staging/lustre/include/linux/libcfs/libcfs_private.h
@@ -96,7 +96,7 @@ do { \
#define LIBCFS_ALLOC_POST(ptr, size) \
do { \
- if (!unlikely((ptr))) { \
+ if (unlikely(!(ptr))) { \
CERROR("LNET: out of memory at %s:%d (tried to alloc '" \
#ptr "' = %d)\n", __FILE__, __LINE__, (int)(size)); \
} else { \
@@ -147,7 +147,7 @@ do { \
#define LIBCFS_FREE(ptr, size) \
do { \
- if (!unlikely((ptr))) { \
+ if (unlikely(!(ptr))) { \
CERROR("LIBCFS: free NULL '" #ptr "' (%d bytes) at " \
"%s:%d\n", (int)(size), __FILE__, __LINE__); \
break; \