Commit 44a3c263 authored by NeilBrown's avatar NeilBrown Committed by Greg Kroah-Hartman
Browse files

staging: lustre: move LERRCHKSUM() to libcfs_debug.h



This macro is only used for debug messages, so use
it to the debug code.
Also improve the documentation slightly.

Signed-off-by: default avatarNeilBrown <neilb@suse.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 0f382119
Loading
Loading
Loading
Loading
+0 −7
Original line number Diff line number Diff line
@@ -89,13 +89,6 @@

#define LIBCFS_VERSION "0.7.0"

/*
 * Lustre Error Checksum: calculates checksum
 * of Hex number by XORing each bit.
 */
#define LERRCHKSUM(hexnum) (((hexnum) & 0xf) ^ ((hexnum) >> 4 & 0xf) ^ \
			   ((hexnum) >> 8 & 0xf))

/* need both kernel and user-land acceptor */
#define LNET_ACCEPTOR_MIN_RESERVED_PORT    512
#define LNET_ACCEPTOR_MAX_RESERVED_PORT    1023
+7 −0
Original line number Diff line number Diff line
@@ -165,6 +165,13 @@ do { \
	__CDEBUG(&cdls, mask, format, ## __VA_ARGS__);			\
} while (0)

/*
 * Lustre Error Checksum: calculates checksum
 * of Hex number by XORing the nybbles.
 */
#define LERRCHKSUM(hexnum) (((hexnum) & 0xf) ^ ((hexnum) >> 4 & 0xf) ^ \
			   ((hexnum) >> 8 & 0xf))

#define CWARN(format, ...)	CDEBUG_LIMIT(D_WARNING, format, ## __VA_ARGS__)
#define CERROR(format, ...)	CDEBUG_LIMIT(D_ERROR, format, ## __VA_ARGS__)
#define CNETERR(format, a...)	CDEBUG_LIMIT(D_NETERROR, format, ## a)