From: Joe Perches <joe@perches.com>
To: Davidlohr Bueso <davidlohr.bueso@hp.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Michel Lespinasse <walken@google.com>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/3] rbtree_test: use pr_info for module prefix in messages
Date: Mon, 18 Mar 2013 17:29:39 -0700 [thread overview]
Message-ID: <1363652979.1932.23.camel@joe-AO722> (raw)
In-Reply-To: <1363650471.1774.20.camel@buesod1.americas.hpqcorp.net>
On Mon, 2013-03-18 at 16:47 -0700, Davidlohr Bueso wrote:
> On Mon, 2013-03-18 at 16:44 -0700, Joe Perches wrote:
> > On Mon, 2013-03-18 at 16:20 -0700, Davidlohr Bueso wrote:
> > > This provides nicer message output. Since it seems more appropriate
> > > for the nature of this module, also use KERN_INFO instead of other
> > > levels.
> > []
> > > diff --git a/lib/rbtree_test.c b/lib/rbtree_test.c
> > []
> > > @@ -153,7 +156,7 @@ static int rbtree_test_init(void)
> > > int i, j;
> > > cycles_t time1, time2, time;
> > >
> > > - printk(KERN_ALERT "rbtree testing");
> > > + pr_info("rbtree testing");
> > >
> > > prandom_seed_state(&rnd, 3141592653589793238ULL);
> > > init();
> > > @@ -171,7 +174,7 @@ static int rbtree_test_init(void)
> > > time = time2 - time1;
> > >
> > > time = div_u64(time, PERF_LOOPS);
> > > - printk(" -> %llu cycles\n", (unsigned long long)time);
> > > + pr_info(" -> %llu cycles\n", (unsigned long long)time);
> >
> > You change the output here by more than just adding a prefix.
> >
> > The first printk didn't have a newline.
> >
> > The old code would print:
> >
> > "rbtree testing -> <foo> cycles"
> >
> > The new code prints:
> >
> > "rbtree_test: rbtree testing"
> > "rbtree_test: -> <foo> cycles"
> >
>
> Ah, I see. This is actually the first time I'm using pr_* calls. I
> actually don't mind the new format, it looked
> ok, but if others don't agree, I can always resend it.
Your choice. I don't prefer one over the other.
I do prefer you add an explicit newline to the first
format though instead of relying on the implicit
newline the printk subsystem will emit during the next
pr_<level> call.
cheers, Joe
next prev parent reply other threads:[~2013-03-19 0:29 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-18 23:20 Davidlohr Bueso
2013-03-18 23:44 ` Joe Perches
2013-03-18 23:47 ` Davidlohr Bueso
2013-03-19 0:29 ` Joe Perches [this message]
2013-03-19 16:29 ` Shuah Khan
2013-03-19 17:14 ` Davidlohr Bueso
2013-03-19 17:54 ` Shuah Khan
2013-03-22 2:51 ` Davidlohr Bueso
2013-03-22 3:29 ` Michel Lespinasse
2013-03-22 23:06 ` Davidlohr Bueso
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=1363652979.1932.23.camel@joe-AO722 \
--to=joe@perches.com \
--cc=akpm@linux-foundation.org \
--cc=davidlohr.bueso@hp.com \
--cc=linux-kernel@vger.kernel.org \
--cc=walken@google.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
all inboxes | Powered by JetHome®