Whamcloud - gitweb
LU-16796 libcfs: Remove unsed LASSERT_ATOMIC_* macros 70/50870/4
authorArshad Hussain <arshad.hussain@aeoncomputing.com>
Fri, 5 May 2023 16:48:53 +0000 (22:18 +0530)
committerOleg Drokin <green@whamcloud.com>
Fri, 19 May 2023 07:10:13 +0000 (07:10 +0000)
This is the first up series of patchs which
replaces atomic_t with refcount_t

This patch removes unused LASSERT_ATOMIC_* macros.
There are still:
LASSERT_ATOMIC_GT
LASSERT_ATOMIC_GT_LT
LASSERT_ATOMIC_ZERO
LASSERT_ATOMIC_POS
macros being used which will be subsequently removed
in following patches. This helps in breaking up patch
logically as changes are large.

Test-Parameters: trivial
Signed-off-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Change-Id: I5c41f978d10b193365ffba6ebeca9aab2cead99c
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50870
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Neil Brown <neilb@suse.de>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
libcfs/include/libcfs/libcfs_private.h

index fb42b99..c9f3b4b 100644 (file)
@@ -254,66 +254,22 @@ int libcfs_debug_mark_buffer(const char *text);
 #define LASSERT_ATOMIC_EQ(a, v)                                \
        LASSERTF(atomic_read(a) == v, "value: %d\n", atomic_read((a)));
 
-/** assert value of @a is unequal to @v */
-#define LASSERT_ATOMIC_NE(a, v)                                \
-       LASSERTF(atomic_read(a) != v, "value: %d\n", atomic_read((a)));
-
-/** assert value of @a is little than @v */
-#define LASSERT_ATOMIC_LT(a, v)                                \
-       LASSERTF(atomic_read(a) < v, "value: %d\n", atomic_read((a)));
-
-/** assert value of @a is little/equal to @v */
-#define LASSERT_ATOMIC_LE(a, v)                                \
-       LASSERTF(atomic_read(a) <= v, "value: %d\n", atomic_read((a)));
-
 /** assert value of @a is great than @v */
 #define LASSERT_ATOMIC_GT(a, v)                                \
        LASSERTF(atomic_read(a) > v, "value: %d\n", atomic_read((a)));
 
-/** assert value of @a is great/equal to @v */
-#define LASSERT_ATOMIC_GE(a, v)                                \
-       LASSERTF(atomic_read(a) >= v, "value: %d\n", atomic_read((a)));
-
 /** assert value of @a is great than @v1 and little than @v2 */
-#define LASSERT_ATOMIC_GT_LT(a, v1, v2)                        \
-do {                                                   \
-       int __v = atomic_read(a);                       \
-       LASSERTF(__v > v1 && __v < v2, "value: %d\n", __v);\
-} while (0)
-
-/** assert value of @a is great than @v1 and little/equal to @v2 */
-#define LASSERT_ATOMIC_GT_LE(a, v1, v2)                        \
-do {                                                   \
-       int __v = atomic_read(a);                       \
-       LASSERTF(__v > v1 && __v <= v2, "value: %d\n", __v);\
-} while (0)
-
-/** assert value of @a is great/equal to @v1 and little than @v2 */
-#define LASSERT_ATOMIC_GE_LT(a, v1, v2)                        \
-do {                                                   \
-       int __v = atomic_read(a);                       \
-       LASSERTF(__v >= v1 && __v < v2, "value: %d\n", __v);\
-} while (0)
-
-/** assert value of @a is great/equal to @v1 and little/equal to @v2 */
-#define LASSERT_ATOMIC_GE_LE(a, v1, v2)                         \
-do {                                                            \
-       int __v = atomic_read(a);                               \
-       LASSERTF(__v >= v1 && __v <= v2, "value: %d\n", __v);   \
+#define LASSERT_ATOMIC_GT_LT(a, v1, v2)                        \
+do {                                                           \
+       int __v = atomic_read(a);                              \
+       LASSERTF(__v > v1 && __v < v2, "value: %d\n", __v);    \
 } while (0)
 
 #else /* !LASSERT_ATOMIC_ENABLED */
 
 #define LASSERT_ATOMIC_EQ(a, v)                 do {} while (0)
-#define LASSERT_ATOMIC_NE(a, v)                 do {} while (0)
-#define LASSERT_ATOMIC_LT(a, v)                 do {} while (0)
-#define LASSERT_ATOMIC_LE(a, v)                 do {} while (0)
 #define LASSERT_ATOMIC_GT(a, v)                 do {} while (0)
-#define LASSERT_ATOMIC_GE(a, v)                 do {} while (0)
 #define LASSERT_ATOMIC_GT_LT(a, v1, v2)         do {} while (0)
-#define LASSERT_ATOMIC_GT_LE(a, v1, v2)         do {} while (0)
-#define LASSERT_ATOMIC_GE_LT(a, v1, v2)         do {} while (0)
-#define LASSERT_ATOMIC_GE_LE(a, v1, v2)         do {} while (0)
 
 #endif /* LASSERT_ATOMIC_ENABLED */