staging: lustre: move LERRCHKSUM() to libcfs_debug.h
authorNeilBrown <neilb@suse.com>
Mon, 21 May 2018 04:35:12 +0000 (14:35 +1000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 25 May 2018 16:29:10 +0000 (18:29 +0200)
This macro is only used for debug messages, so use
it to the debug code.
Also improve the documentation slightly.

Signed-off-by: NeilBrown <neilb@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/include/linux/libcfs/libcfs.h
drivers/staging/lustre/include/linux/libcfs/libcfs_debug.h

index 57d66aff546b88d7a6e1f081c6143fd2007bba24..be40cf4fb44a2c4eb19c61f4f8204141dc32ae4a 100644 (file)
 
 #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
index 0dc7b91efe7c168e1bdfc58d553bc947cab694c7..07f7d306ba9aa13563d03b55414987d21886b305 100644 (file)
@@ -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)