summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Simmons <jsimmons@infradead.org>2016-11-18 11:48:42 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-11-19 14:13:45 +0100
commit27b83b3f5b49b4d5fbc036a97a3c9e5c1d6692b2 (patch)
tree8656f1c8505c545fc036fe81790bbf34cbd9d5e9
parente230dd8bb201bf8e51a8ebca51a21118dfd0c386 (diff)
downloadop-kernel-dev-27b83b3f5b49b4d5fbc036a97a3c9e5c1d6692b2.zip
op-kernel-dev-27b83b3f5b49b4d5fbc036a97a3c9e5c1d6692b2.tar.gz
staging: lustre: libcfs: remove NULL comparisons in headers
Remove the NULL comparisions in the libcfs headers. Signed-off-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/staging/lustre/include/linux/libcfs/libcfs_hash.h2
-rw-r--r--drivers/staging/lustre/include/linux/libcfs/libcfs_private.h4
2 files changed, 3 insertions, 3 deletions
diff --git a/drivers/staging/lustre/include/linux/libcfs/libcfs_hash.h b/drivers/staging/lustre/include/linux/libcfs/libcfs_hash.h
index 85661b3..d0ba3e0 100644
--- a/drivers/staging/lustre/include/linux/libcfs/libcfs_hash.h
+++ b/drivers/staging/lustre/include/linux/libcfs/libcfs_hash.h
@@ -818,7 +818,7 @@ cfs_hash_djb2_hash(const void *key, size_t size, unsigned int mask)
{
unsigned int i, hash = 5381;
- LASSERT(key != NULL);
+ LASSERT(key);
for (i = 0; i < size; i++)
hash = hash * 33 + ((char *)key)[i];
diff --git a/drivers/staging/lustre/include/linux/libcfs/libcfs_private.h b/drivers/staging/lustre/include/linux/libcfs/libcfs_private.h
index 93bff1b..fc180b8 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) == NULL)) { \
+ 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) == NULL)) { \
+ if (!unlikely((ptr))) { \
CERROR("LIBCFS: free NULL '" #ptr "' (%d bytes) at " \
"%s:%d\n", (int)(size), __FILE__, __LINE__); \
break; \
OpenPOWER on IntegriCloud