Commit a59e5747 authored by James Simmons's avatar James Simmons Committed by Greg Kroah-Hartman
Browse files

staging: lustre: libcfs: fixup all header block comments



Properly format the incorrect comments sections
that were reported by checkpatch.

Signed-off-by: default avatarJames Simmons <jsimmons@infradead.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent ab16bdd8
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
@@ -29,10 +29,12 @@
#define _LIBCFS_CRYPTO_H

struct cfs_crypto_hash_type {
	char		*cht_name;      /**< hash algorithm name, equal to
					 * format name for crypto api */
	unsigned int    cht_key;	/**< init key by default (valid for
					 * 4 bytes context like crc32, adler */
	char		*cht_name;      /*< hash algorithm name, equal to
					 * format name for crypto api
					 */
	unsigned int    cht_key;	/*< init key by default (valid for
					 * 4 bytes context like crc32, adler
					 */
	unsigned int    cht_size;       /**< hash digest size */
};

+20 −10
Original line number Diff line number Diff line
@@ -103,22 +103,28 @@ static inline int cfs_fail_check_set(__u32 id, __u32 value,
#define CFS_FAIL_CHECK_QUIET(id) \
	cfs_fail_check_set(id, 0, CFS_FAIL_LOC_NOSET, 1)

/* If id hit cfs_fail_loc and cfs_fail_val == (-1 or value) return 1,
 * otherwise return 0 */
/*
 * If id hit cfs_fail_loc and cfs_fail_val == (-1 or value) return 1,
 * otherwise return 0
 */
#define CFS_FAIL_CHECK_VALUE(id, value) \
	cfs_fail_check_set(id, value, CFS_FAIL_LOC_VALUE, 0)
#define CFS_FAIL_CHECK_VALUE_QUIET(id, value) \
	cfs_fail_check_set(id, value, CFS_FAIL_LOC_VALUE, 1)

/* If id hit cfs_fail_loc, cfs_fail_loc |= value and return 1,
 * otherwise return 0 */
/*
 * If id hit cfs_fail_loc, cfs_fail_loc |= value and return 1,
 * otherwise return 0
 */
#define CFS_FAIL_CHECK_ORSET(id, value) \
	cfs_fail_check_set(id, value, CFS_FAIL_LOC_ORSET, 0)
#define CFS_FAIL_CHECK_ORSET_QUIET(id, value) \
	cfs_fail_check_set(id, value, CFS_FAIL_LOC_ORSET, 1)

/* If id hit cfs_fail_loc, cfs_fail_loc = value and return 1,
 * otherwise return 0 */
/*
 * If id hit cfs_fail_loc, cfs_fail_loc = value and return 1,
 * otherwise return 0
 */
#define CFS_FAIL_CHECK_RESET(id, value) \
	cfs_fail_check_set(id, value, CFS_FAIL_LOC_RESET, 0)
#define CFS_FAIL_CHECK_RESET_QUIET(id, value) \
@@ -138,8 +144,10 @@ static inline int cfs_fail_timeout_set(__u32 id, __u32 value, int ms, int set)
#define CFS_FAIL_TIMEOUT_MS(id, ms) \
	cfs_fail_timeout_set(id, 0, ms, CFS_FAIL_LOC_NOSET)

/* If id hit cfs_fail_loc, cfs_fail_loc |= value and
 * sleep seconds or milliseconds */
/*
 * If id hit cfs_fail_loc, cfs_fail_loc |= value and
 * sleep seconds or milliseconds
 */
#define CFS_FAIL_TIMEOUT_ORSET(id, value, secs) \
	cfs_fail_timeout_set(id, value, secs * 1000, CFS_FAIL_LOC_ORSET)

@@ -152,10 +160,12 @@ static inline int cfs_fail_timeout_set(__u32 id, __u32 value, int ms, int set)
#define CFS_FAULT_CHECK(id)			\
	CFS_FAIL_CHECK(CFS_FAULT | (id))

/* The idea here is to synchronise two threads to force a race. The
/*
 * The idea here is to synchronise two threads to force a race. The
 * first thread that calls this with a matching fail_loc is put to
 * sleep. The next thread that calls with the same fail_loc wakes up
 * the first and continues. */
 * the first and continues.
 */
static inline void cfs_race(__u32 id)
{

+16 −8
Original line number Diff line number Diff line
@@ -57,8 +57,10 @@

/** disable debug */
#define CFS_HASH_DEBUG_NONE	0
/** record hash depth and output to console when it's too deep,
 *  computing overhead is low but consume more memory */
/*
 * record hash depth and output to console when it's too deep,
 * computing overhead is low but consume more memory
 */
#define CFS_HASH_DEBUG_1	1
/** expensive, check key validation */
#define CFS_HASH_DEBUG_2	2
@@ -153,8 +155,10 @@ enum cfs_hash_tag {
	 * change on hash table is non-blocking
	 */
	CFS_HASH_NBLK_CHANGE	= 1 << 13,
	/** NB, we typed hs_flags as  __u16, please change it
	 * if you need to extend >=16 flags */
	/**
	 * NB, we typed hs_flags as  __u16, please change it
	 * if you need to extend >=16 flags
	 */
};

/** most used attributes */
@@ -201,8 +205,10 @@ enum cfs_hash_tag {
 */

struct cfs_hash {
	/** serialize with rehash, or serialize all operations if
	 * the hash-table has CFS_HASH_NO_BKTLOCK */
	/**
	 * serialize with rehash, or serialize all operations if
	 * the hash-table has CFS_HASH_NO_BKTLOCK
	 */
	union cfs_hash_lock		hs_lock;
	/** hash operations */
	struct cfs_hash_ops		*hs_ops;
@@ -369,9 +375,11 @@ cfs_hash_with_add_tail(struct cfs_hash *hs)
static inline int
cfs_hash_with_no_itemref(struct cfs_hash *hs)
{
	/* hash-table doesn't keep refcount on item,
	/*
	 * hash-table doesn't keep refcount on item,
	 * item can't be removed from hash unless it's
	 * ZERO refcount */
	 * ZERO refcount
	 */
	return (hs->hs_flags & CFS_HASH_NO_ITEMREF) != 0;
}

+3 −2
Original line number Diff line number Diff line
@@ -280,7 +280,7 @@ do { \
#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:
@@ -306,7 +306,8 @@ do { \
/* --------------------------------------------------------------------
 * Light-weight trace
 * Support for temporary event tracing with minimal Heisenberg effect.
 * -------------------------------------------------------------------- */
 * --------------------------------------------------------------------
 */

#define MKSTR(ptr) ((ptr)) ? (ptr) : ""

+4 −2
Original line number Diff line number Diff line
@@ -84,9 +84,11 @@ int cfs_expr_list_values(struct cfs_expr_list *expr_list,
static inline void
cfs_expr_list_values_free(__u32 *values, int num)
{
	/* This array is allocated by LIBCFS_ALLOC(), so it shouldn't be freed
	/*
	 * This array is allocated by LIBCFS_ALLOC(), so it shouldn't be freed
	 * by OBD_FREE() if it's called by module other than libcfs & LNet,
	 * otherwise we will see fake memory leak */
	 * otherwise we will see fake memory leak
	 */
	LIBCFS_FREE(values, num * sizeof(values[0]));
}