staging: lustre: libcfs: discard MKSTR() macro
authorNeilBrown <neilb@suse.com>
Wed, 13 Dec 2017 03:15:55 +0000 (14:15 +1100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 13 Dec 2017 11:32:13 +0000 (12:32 +0100)
This is only used for tracing when some strings might
be NULL.  NULL strings are not a problem for tracing,
vnsprintf() will report them as "(null)" which is probably
better (easier to parse) than an empty string.

Also remove a nearby comment that doesn't relate to the
(remaining) code at all.

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

index dee5f650197fe9648551f259b54cdb0494db8c6b..27d40a7589d41404695e185f741ddc522748b21d 100644 (file)
@@ -235,14 +235,6 @@ do {                                                           \
 /* logical equivalence */
 #define equi(a, b) (!!(a) == !!(b))
 
-/* --------------------------------------------------------------------
- * Light-weight trace
- * Support for temporary event tracing with minimal Heisenberg effect.
- * --------------------------------------------------------------------
- */
-
-#define MKSTR(ptr) ((ptr)) ? (ptr) : ""
-
 #ifndef HAVE_CFS_SIZE_ROUND
 static inline size_t cfs_size_round(int val)
 {
index c0e192ae22a9273441b5fa5385b4bc4510039d77..997c0f9aafb5505c5ae6699448844b4c70292c2f 100644 (file)
@@ -236,7 +236,7 @@ static int class_attach(struct lustre_cfg *lcfg)
        uuid = lustre_cfg_string(lcfg, 2);
 
        CDEBUG(D_IOCTL, "attach type %s name: %s uuid: %s\n",
-              MKSTR(typename), MKSTR(name), MKSTR(uuid));
+              typename, name, uuid);
 
        obd = class_newdev(typename, name);
        if (IS_ERR(obd)) {