From fa70e91747dc712f3083649cb82194bd7c0c856f Mon Sep 17 00:00:00 2001 From: Arshad Hussain Date: Tue, 31 Dec 2019 04:58:56 +0530 Subject: [PATCH] LU-12923 libcfs: Remove CLASSERT() for libcfs_private.h This patch removes final CLASSERT() define from file libcfs/include/libcfs/libcfs_private.h. For compile time assertion kernel defined BUILD_BUG_ON() is preferred Test-Parameters: trivial Signed-off-by: Arshad Hussain Change-Id: I6d7dd55489824631ae61393413598fe6dc4365a2 Reviewed-on: https://review.whamcloud.com/37188 Reviewed-by: James Simmons Reviewed-by: Petros Koutoupis Tested-by: jenkins Tested-by: Maloo Reviewed-by: Ben Evans Reviewed-by: Shaun Tancheff Reviewed-by: Oleg Drokin --- libcfs/include/libcfs/libcfs_private.h | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/libcfs/include/libcfs/libcfs_private.h b/libcfs/include/libcfs/libcfs_private.h index a3e2bbd..e0fcdbe 100644 --- a/libcfs/include/libcfs/libcfs_private.h +++ b/libcfs/include/libcfs/libcfs_private.h @@ -346,22 +346,6 @@ do { \ #define CFS_ALLOC_PTR(ptr) LIBCFS_ALLOC(ptr, sizeof (*(ptr))); #define CFS_FREE_PTR(ptr) LIBCFS_FREE(ptr, sizeof (*(ptr))); -/** Compile-time assertion. - - * Check an invariant described by a constant expression at compile time by - * forcing a compiler error if it does not hold. \a cond must be a constant - * expression as defined by the ISO C Standard: - * - * 6.8.4.2 The switch statement - * .... - * [#3] The expression of each case label shall be an integer - * constant expression and no two of the case constant - * expressions in the same switch statement shall have the same - * value after conversion... - * - */ -#define CLASSERT(cond) do {switch (1) {case (cond): case 0: break; } } while (0) - /* implication */ #define ergo(a, b) (!(a) || (b)) /* logical equivalence */ -- 1.8.3.1