Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a4424bf5 authored by James Simmons's avatar James Simmons Committed by Greg Kroah-Hartman
Browse files

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: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarJames Simmons <jsimmons@infradead.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 5bcf2a92
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -96,7 +96,7 @@ do { \


#define LIBCFS_ALLOC_POST(ptr, size)					    \
#define LIBCFS_ALLOC_POST(ptr, size)					    \
do {									    \
do {									    \
	if (!unlikely((ptr))) {						    \
	if (unlikely(!(ptr))) {						    \
		CERROR("LNET: out of memory at %s:%d (tried to alloc '"	    \
		CERROR("LNET: out of memory at %s:%d (tried to alloc '"	    \
		       #ptr "' = %d)\n", __FILE__, __LINE__, (int)(size));  \
		       #ptr "' = %d)\n", __FILE__, __LINE__, (int)(size));  \
	} else {							    \
	} else {							    \
@@ -147,7 +147,7 @@ do { \


#define LIBCFS_FREE(ptr, size)					  \
#define LIBCFS_FREE(ptr, size)					  \
do {								    \
do {								    \
	if (!unlikely((ptr))) {						\
	if (unlikely(!(ptr))) {						\
		CERROR("LIBCFS: free NULL '" #ptr "' (%d bytes) at "    \
		CERROR("LIBCFS: free NULL '" #ptr "' (%d bytes) at "    \
		       "%s:%d\n", (int)(size), __FILE__, __LINE__);	\
		       "%s:%d\n", (int)(size), __FILE__, __LINE__);	\
		break;						  \
		break;						  \