[lustre-devel] [PATCH 17/33] lnet: libcfs: Remove unsed LASSERT_ATOMIC_* macros
James Simmons
jsimmons at infradead.org
Sun Feb 2 12:46:17 PST 2025
From: Arshad Hussain <arshad.hussain at aeoncomputing.com>
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.
WC-bug-id: https://jira.whamcloud.com/browse/LU-16796
Lustre-commit: f875d0c714b548553 ("LU-16796 libcfs: Remove unsed LASSERT_ATOMIC_* macros")
Signed-off-by: Arshad Hussain <arshad.hussain at aeoncomputing.com>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50870
Reviewed-by: Oleg Drokin <green at whamcloud.com>
Reviewed-by: Neil Brown <neilb at suse.de>
Reviewed-by: Andreas Dilger <adilger at whamcloud.com>
Reviewed-by: James Simmons <jsimmons at infradead.org>
Signed-off-by: James Simmons <jsimmons at infradead.org>
---
include/linux/libcfs/libcfs_private.h | 44 ---------------------------
1 file changed, 44 deletions(-)
diff --git a/include/linux/libcfs/libcfs_private.h b/include/linux/libcfs/libcfs_private.h
index 378c2a56ed67..86d135a65d81 100644
--- a/include/linux/libcfs/libcfs_private.h
+++ b/include/linux/libcfs/libcfs_private.h
@@ -112,26 +112,10 @@ 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 { \
@@ -139,39 +123,11 @@ do { \
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); \
-} 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 */
--
2.39.3
More information about the lustre-devel
mailing list