Whamcloud - gitweb
LU-12923 libcfs: Use BUILD_BUG_ON() for hash.c 02/36902/6
authorArshad Hussain <arshad.super@gmail.com>
Sun, 1 Dec 2019 01:43:57 +0000 (07:13 +0530)
committerOleg Drokin <green@whamcloud.com>
Fri, 20 Dec 2019 03:27:23 +0000 (03:27 +0000)
This patch replaces all CLASSERT() with kernel defined
BUILD_BUG_ON() for file libcfs/libcfs/hash.c

Test-Parameters: trivial
Signed-off-by: Arshad Hussain <arshad.super@gmail.com>
Change-Id: Ie5dc744fc10b6e5f303fca93d342629e99a2403d
Reviewed-on: https://review.whamcloud.com/36902
Reviewed-by: Shaun Tancheff <stancheff@cray.com>
Reviewed-by: Petros Koutoupis <pkoutoupis@cray.com>
Reviewed-by: Ben Evans <bevans@cray.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
libcfs/libcfs/hash.c

index 9fee65e..55a61fd 100644 (file)
@@ -1040,7 +1040,7 @@ cfs_hash_create(char *name, unsigned cur_bits, unsigned max_bits,
 
         ENTRY;
 
-        CLASSERT(CFS_HASH_THETA_BITS < 15);
+       BUILD_BUG_ON(CFS_HASH_THETA_BITS >= 15);
 
         LASSERT(name != NULL);
         LASSERT(ops != NULL);