From: Tim Bird <tim.bird@am.sony.com>
To: Martin Peschke <mp3@de.ibm.com>
Cc: Andrew Morton <akpm@osdl.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [Patch 3/6] statistics infrastructure - prerequisite: timestamp
Date: Wed, 24 May 2006 14:16:40 -0700 [thread overview]
Message-ID: <4474CD38.5090206@am.sony.com> (raw)
In-Reply-To: <1148055080.2974.15.camel@dyn-9-152-230-71.boeblingen.de.ibm.com>
Martin Peschke wrote:
> The original piece of code was a bit promiscuous, IMHO.
> Please accept the little cleanup that comes with my patch.
In general, I like the cleanup. See comments below.
> And I think that I have fixed a printed_len related miscalculation.
> printed_len needs to be increased if no valid log level has been found
> and a log level prefix has been added by printk(). Otherwise, printed_len
> must not be increased. The old code did it the other way around (in the
> timestamp case).
I'm not following your change here. I can't find the problem you
mention in the original code. And your fix appears to mess up the
printed_len.
> + if (new_line) {
> + /* The log level token is first. */
> + int loglev_char;
> + if (p[0] == '<' && p[1] >='0' &&
> + p[1] <= '7' && p[2] == '>') {
> + loglev_char = p[1];
> + p += 3;
> + printed_len -= 3;
Here you subtract from the printed_len to account for skipping
the submitted log level.
> + } else {
> + loglev_char = default_message_loglevel + '0';
> + }
> + emit_log_char('<');
> + emit_log_char(loglev_char);
> + emit_log_char('>');
But here you don't re-count the chars for the log-level
you are adding back in. There's a discrepancy here.
Please look at this again. NAK
-- Tim
=============================
Tim Bird
Architecture Group Chair, CE Linux Forum
Senior Staff Engineer, Sony Electronics
=============================
next prev parent reply other threads:[~2006-05-24 21:16 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-05-19 16:11 [Patch 3/6] statistics infrastructure - prerequisite: timestamp Martin Peschke
2006-05-23 13:06 ` Balbir Singh
2006-05-23 13:33 ` Martin Peschke
2006-05-24 21:16 ` Tim Bird [this message]
2006-06-01 8:40 ` Martin Peschke
2006-06-01 8:50 ` Andrew Morton
-- strict thread matches above, loose matches on Subject: below --
2006-05-24 12:31 Martin Peschke
2006-05-24 22:08 ` Andrew Morton
2006-05-24 22:45 ` Thomas Gleixner
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=4474CD38.5090206@am.sony.com \
--to=tim.bird@am.sony.com \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mp3@de.ibm.com \
/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