From: Jason Baron <jbaron@redhat.com>
To: Jim Cromie <jim.cromie@gmail.com>
Cc: gregkh@suse.de, joe@perches.com, bvanassche@acm.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 3/4] dynamic_debug: use a single printk() to emit msgs
Date: Mon, 29 Aug 2011 15:14:54 -0400 [thread overview]
Message-ID: <20110829191453.GA3031@redhat.com> (raw)
In-Reply-To: <CAJfuBxyyiGYJ-DmtJG2fy0HDZ6BbpYpXwnA02uetS_0RRuh+0w@mail.gmail.com>
On Fri, Aug 26, 2011 at 03:47:49PM -0600, Jim Cromie wrote:
> On Thu, Aug 25, 2011 at 11:34 AM, Jason Baron <jbaron@redhat.com> wrote:
>
> > + if (desc->flags & _DPRINTK_FLAGS_INCL_MODNAME)
> > + pos += snprintf(buf + pos, LEFT(pos), "%s:", desc->modname);
> > + if (desc->flags & _DPRINTK_FLAGS_INCL_FUNCNAME)
> > + pos += snprintf(buf + pos, LEFT(pos), "%s:", desc->function);
> > + if (desc->flags & _DPRINTK_FLAGS_INCL_LINENO)
> > + pos += snprintf(buf + pos, LEFT(pos), "%d ", desc->lineno);
>
> this inserts a space after lineno, but not otherwize.
>
> I have patch to fix it, but maybe you want to fix it it here ?
>
Hi Jim,
Thanks for your fix...since Greg hasn't taken the series yet...I guess
I'll re-spin to include this fix. Probably wouldn't send it out until
tomorrow due to my test systems being down atm...
thanks,
-Jason
> diff --git a/lib/dynamic_debug.c b/lib/dynamic_debug.c
> index 9c8e133..122246f 100644
> --- a/lib/dynamic_debug.c
> +++ b/lib/dynamic_debug.c
> @@ -439,7 +439,9 @@ static char *dynamic_emit_prefix(const struct
> _ddebug *desc, char *buf)
> if (desc->flags & _DPRINTK_FLAGS_INCL_FUNCNAME)
> pos += snprintf(buf + pos, LEFT(pos), "%s:", desc->function);
> if (desc->flags & _DPRINTK_FLAGS_INCL_LINENO)
> - pos += snprintf(buf + pos, LEFT(pos), "%d ", desc->lineno);
> + pos += snprintf(buf + pos, LEFT(pos), "%d:", desc->lineno);
> + if (pos - strlen(KERN_DEBUG))
> + pos += snprintf(buf + pos, LEFT(pos), " ");
>
> return buf;
> }
> --
> 1.7.4.4
>
>
> also attached.
> If it doesnt apply, or you defer, I'll resend once Greg's accepted
> your whole set.
> From ec75cd50ba89bed1f0ad74b89c9a43e87b2bd767 Mon Sep 17 00:00:00 2001
> From: Jim Cromie <jim.cromie@gmail.com>
> Date: Tue, 2 Aug 2011 15:12:55 -0600
> Subject: [PATCH 03/28] dynamic_debug: add space at end of non-null
> dynamic-prefix
>
> dynamic_emit_prefix() currently adds a space after line-number,
> but not otherwize. For readability, add space whenever any prefix
> (besides the "<7>" loglevel) has been written.
>
> Signed-off-by: Jim Cromie <jim.cromie@gmail.com>
> ---
> lib/dynamic_debug.c | 4 +++-
> 1 files changed, 3 insertions(+), 1 deletions(-)
>
> diff --git a/lib/dynamic_debug.c b/lib/dynamic_debug.c
> index 9c8e133..122246f 100644
> --- a/lib/dynamic_debug.c
> +++ b/lib/dynamic_debug.c
> @@ -439,7 +439,9 @@ static char *dynamic_emit_prefix(const struct _ddebug *desc, char *buf)
> if (desc->flags & _DPRINTK_FLAGS_INCL_FUNCNAME)
> pos += snprintf(buf + pos, LEFT(pos), "%s:", desc->function);
> if (desc->flags & _DPRINTK_FLAGS_INCL_LINENO)
> - pos += snprintf(buf + pos, LEFT(pos), "%d ", desc->lineno);
> + pos += snprintf(buf + pos, LEFT(pos), "%d:", desc->lineno);
> + if (pos - strlen(KERN_DEBUG))
> + pos += snprintf(buf + pos, LEFT(pos), " ");
>
> return buf;
> }
> --
> 1.7.4.4
>
next prev parent reply other threads:[~2011-08-29 19:15 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-25 17:34 [PATCH 0/4] dynamic debug: cleanups + compile fix Jason Baron
2011-08-25 17:34 ` [PATCH 1/4] dynamic_debug: consolidate repetitive struct _ddebug descriptor definitions Jason Baron
2011-08-26 10:46 ` Bart Van Assche
2011-08-25 17:34 ` [PATCH 2/4] dynamic_debug: remove num_enabled accounting Jason Baron
2011-08-25 17:34 ` [PATCH 3/4] dynamic_debug: use a single printk() to emit msgs Jason Baron
2011-08-25 17:42 ` Bart Van Assche
2011-08-25 18:19 ` [PATCH 3/4 re-post] " Jason Baron
2011-08-26 21:47 ` [PATCH 3/4] " Jim Cromie
2011-08-29 19:14 ` Jason Baron [this message]
2011-08-25 17:34 ` [PATCH 4/4] dynamic_debug: fix undefined reference to `__netdev_printk' Jason Baron
2011-08-26 18:29 ` [PATCH 0/4] dynamic debug: cleanups + compile fix Greg KH
2011-08-26 18:47 ` Jason Baron
2011-08-26 19:04 ` Greg KH
2011-08-26 22:14 ` Joe Perches
2011-08-26 22:18 ` Greg KH
2011-08-26 22:22 ` Joe Perches
-- strict thread matches above, loose matches on Subject: below --
2011-08-30 18:28 [PATCH 0/4] dynamic debug: cleanups + compile fix v2 Jason Baron
2011-08-30 18:28 ` [PATCH 3/4] dynamic_debug: use a single printk() to emit msgs Jason Baron
2011-09-08 23:52 ` Andrew Morton
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110829191453.GA3031@redhat.com \
--to=jbaron@redhat.com \
--cc=bvanassche@acm.org \
--cc=gregkh@suse.de \
--cc=jim.cromie@gmail.com \
--cc=joe@perches.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).