staging: lustre: libcfs: remove LOGL and LOGU macros
authorJames Simmons <jsimmons@infradead.org>
Sun, 20 Aug 2017 02:26:26 +0000 (22:26 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 23 Aug 2017 01:36:49 +0000 (18:36 -0700)
The macro LOGU is not used anymore and LOGL is used in
one place. No reason to keep LOGL around anymore.

Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6245
Reviewed-on: https://review.whamcloud.com/22138
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/include/linux/libcfs/libcfs_private.h
drivers/staging/lustre/lustre/ptlrpc/pack_generic.c

index 005713b386243691e1505ce44b92d5e49e073e78..709771d27f89192b2b1005dac09eabea1373dbdc 100644 (file)
@@ -296,18 +296,4 @@ static inline size_t cfs_round_strlen(char *fset)
        return cfs_size_round((int)strlen(fset) + 1);
 }
 
-#define LOGL(var, len, ptr)                                   \
-do {                                                       \
-       if (var)                                                \
-               memcpy((char *)ptr, (const char *)var, len);    \
-       ptr += cfs_size_round(len);                          \
-} while (0)
-
-#define LOGU(var, len, ptr)                                   \
-do {                                                       \
-       if (var)                                                \
-               memcpy((char *)var, (const char *)ptr, len);    \
-       ptr += cfs_size_round(len);                          \
-} while (0)
-
 #endif
index 55e8696e7d864d22fe732eb271ae096be4f4a749..f116995dc06c9b30ae7ee037a8b1825a9c07ad28 100644 (file)
@@ -186,7 +186,9 @@ void lustre_init_msg_v2(struct lustre_msg_v2 *msg, int count, __u32 *lens,
        for (i = 0; i < count; i++) {
                char *tmp = bufs[i];
 
-               LOGL(tmp, lens[i], ptr);
+               if (tmp)
+                       memcpy(ptr, tmp, lens[i]);
+               ptr += cfs_size_round(lens[i]);
        }
 }
 EXPORT_SYMBOL(lustre_init_msg_v2);