Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

staging: lustre: libcfs: discard MKSTR() macro



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: default avatarNeilBrown <neilb@suse.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent cf2d5dc0
Loading
Loading
Loading
Loading
+0 −8
Original line number Diff line number Diff line
@@ -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)
{
+1 −1
Original line number Diff line number Diff line
@@ -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)) {