lkml.org 
[lkml]   [2011]   [Jul]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 11/11] dynamic_debug: use a single printk() to emit msgs
From
Date
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);




\
 
 \ /
  Last update: 2011-07-15 08:45    [from the cache]
©2003-2011 Jasper Spaans