Staging: lustre cleanup macros in libcfs_private.h
This resolves a checkpatch warning that "Single statement macros should not use a do {} while (0) loop" by removing the loop and adjusting line length accordingly. Signed-off-by: Craig Inches <Craig@craiginches.com> Reviewed-by: Andreas Dilger <andreas.dilger@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
2e2fd6be42
commit
983ca9b321
|
@ -88,11 +88,8 @@ do { \
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define LIBCFS_ALLOC_PRE(size, mask) \
|
#define LIBCFS_ALLOC_PRE(size, mask) \
|
||||||
do { \
|
LASSERT(!in_interrupt() || ((size) <= LIBCFS_VMALLOC_SIZE && \
|
||||||
LASSERT(!in_interrupt() || \
|
!gfpflags_allow_blocking(mask)))
|
||||||
((size) <= LIBCFS_VMALLOC_SIZE && \
|
|
||||||
!gfpflags_allow_blocking(mask))); \
|
|
||||||
} while (0)
|
|
||||||
|
|
||||||
#define LIBCFS_ALLOC_POST(ptr, size) \
|
#define LIBCFS_ALLOC_POST(ptr, size) \
|
||||||
do { \
|
do { \
|
||||||
|
@ -188,45 +185,27 @@ void cfs_array_free(void *vars);
|
||||||
|
|
||||||
/** assert value of @a is equal to @v */
|
/** assert value of @a is equal to @v */
|
||||||
#define LASSERT_ATOMIC_EQ(a, v) \
|
#define LASSERT_ATOMIC_EQ(a, v) \
|
||||||
do { \
|
LASSERTF(atomic_read(a) == v, "value: %d\n", atomic_read((a)))
|
||||||
LASSERTF(atomic_read(a) == v, \
|
|
||||||
"value: %d\n", atomic_read((a))); \
|
|
||||||
} while (0)
|
|
||||||
|
|
||||||
/** assert value of @a is unequal to @v */
|
/** assert value of @a is unequal to @v */
|
||||||
#define LASSERT_ATOMIC_NE(a, v) \
|
#define LASSERT_ATOMIC_NE(a, v) \
|
||||||
do { \
|
LASSERTF(atomic_read(a) != v, "value: %d\n", atomic_read((a)))
|
||||||
LASSERTF(atomic_read(a) != v, \
|
|
||||||
"value: %d\n", atomic_read((a))); \
|
|
||||||
} while (0)
|
|
||||||
|
|
||||||
/** assert value of @a is little than @v */
|
/** assert value of @a is little than @v */
|
||||||
#define LASSERT_ATOMIC_LT(a, v) \
|
#define LASSERT_ATOMIC_LT(a, v) \
|
||||||
do { \
|
LASSERTF(atomic_read(a) < v, "value: %d\n", atomic_read((a)))
|
||||||
LASSERTF(atomic_read(a) < v, \
|
|
||||||
"value: %d\n", atomic_read((a))); \
|
|
||||||
} while (0)
|
|
||||||
|
|
||||||
/** assert value of @a is little/equal to @v */
|
/** assert value of @a is little/equal to @v */
|
||||||
#define LASSERT_ATOMIC_LE(a, v) \
|
#define LASSERT_ATOMIC_LE(a, v) \
|
||||||
do { \
|
LASSERTF(atomic_read(a) <= v, "value: %d\n", atomic_read((a)))
|
||||||
LASSERTF(atomic_read(a) <= v, \
|
|
||||||
"value: %d\n", atomic_read((a))); \
|
|
||||||
} while (0)
|
|
||||||
|
|
||||||
/** assert value of @a is great than @v */
|
/** assert value of @a is great than @v */
|
||||||
#define LASSERT_ATOMIC_GT(a, v) \
|
#define LASSERT_ATOMIC_GT(a, v) \
|
||||||
do { \
|
LASSERTF(atomic_read(a) > v, "value: %d\n", atomic_read((a)))
|
||||||
LASSERTF(atomic_read(a) > v, \
|
|
||||||
"value: %d\n", atomic_read((a))); \
|
|
||||||
} while (0)
|
|
||||||
|
|
||||||
/** assert value of @a is great/equal to @v */
|
/** assert value of @a is great/equal to @v */
|
||||||
#define LASSERT_ATOMIC_GE(a, v) \
|
#define LASSERT_ATOMIC_GE(a, v) \
|
||||||
do { \
|
LASSERTF(atomic_read(a) >= v, "value: %d\n", atomic_read((a)))
|
||||||
LASSERTF(atomic_read(a) >= v, \
|
|
||||||
"value: %d\n", atomic_read((a))); \
|
|
||||||
} while (0)
|
|
||||||
|
|
||||||
/** assert value of @a is great than @v1 and little than @v2 */
|
/** assert value of @a is great than @v1 and little than @v2 */
|
||||||
#define LASSERT_ATOMIC_GT_LT(a, v1, v2) \
|
#define LASSERT_ATOMIC_GT_LT(a, v1, v2) \
|
||||||
|
|
Loading…
Reference in New Issue