[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1310712113.7582.24.camel@Joe-Laptop>
Date: Thu, 14 Jul 2011 23:41:53 -0700
From: Joe Perches <joe@...ches.com>
To: Jason Baron <jbaron@...hat.com>
Cc: gregkh@...e.de, jim.cromie@...il.com, bvanassche@....org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 11/11] dynamic_debug: use a single printk() to emit msgs
On Thu, 2011-07-14 at 12:09 -0400, Jason Baron wrote:
> We were using KERN_CONT to combine msgs with their prefix.
[]
> diff --git a/lib/dynamic_debug.c b/lib/dynamic_debug.c
Perhaps instead:
> +static int dynamic_emit_prefix(const struct _ddebug *descriptor, char *buf)
static char *dynamic_emit_prefix(...)
[]
snprintf(buf, PREFIX_SIZE, KERN_DEBUG"%s%s%s%s%s%s",
Add a space please after KERN_DEBUG
[]
return buf;
> int __dynamic_pr_debug(struct _ddebug *descriptor, const char *fmt, ...)
[]
> + res = dynamic_emit_prefix(descriptor, buf);
> + res += printk("%s %pV", buf, &vaf);
This double counts the length of dynamic_emit_prefix.
I think this and the others should be:
res = printk("%s %pV", dynamic_emit_prefix(descriptor, buf), &vaf);
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists