Messages in this thread |  | | | Subject | Re: [PATCH 11/11] dynamic_debug: use a single printk() to emit msgs | | From | Joe Perches <> | | Date | Thu, 14 Jul 2011 23:41:53 -0700 |
| |
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);
|  |