mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Davidlohr Bueso <davidlohr.bueso@hp.com>
To: Shuah Khan <shuahkhan@gmail.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: Tue, 19 Mar 2013 10:14:42 -0700	[thread overview]
Message-ID: <1363713282.2781.2.camel@buesod1.americas.hpqcorp.net> (raw)
In-Reply-To: <CAKocOOOj80R2nP+B_k=jTS-UgA27VvMa-kAFiJbORZg4pKRS1Q@mail.gmail.com>

On Tue, 2013-03-19 at 10:29 -0600, Shuah Khan wrote:
> On Mon, Mar 18, 2013 at 5:20 PM, Davidlohr Bueso <davidlohr.bueso@hp.com> 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.
> 
> Why are you changing the ALERTs to INFO?

Because of the nature of the messages. They don't justify having a
KERN_ALERT level (requiring immediate attention), and it seems a lot
more suitable to use INFO instead.

> 
> >
> > Signed-off-by: Davidlohr Bueso <davidlohr.bueso@hp.com>
> > ---
> >  lib/rbtree_test.c | 13 ++++++++-----
> >  1 file changed, 8 insertions(+), 5 deletions(-)
> >
> > diff --git a/lib/rbtree_test.c b/lib/rbtree_test.c
> > index af38aed..66ca26d 100644
> > --- a/lib/rbtree_test.c
> > +++ b/lib/rbtree_test.c
> > @@ -1,3 +1,6 @@
> > +#define KMSG_COMPONENT "rbtree_test"
> > +#define pr_fmt(fmt) KMSG_COMPONENT ": " fmt
> > +
> >  #include <linux/module.h>
> >  #include <linux/rbtree_augmented.h>
> >  #include <linux/random.h>
> > @@ -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");
> 
> This is changing the output from KERN_ALERT to KERN_INFO. Why is this
> necessary? Should this be pr_alert() instead?
> 
> 
> >
> >         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);
> >
> >         for (i = 0; i < CHECK_LOOPS; i++) {
> >                 init();
> > @@ -186,7 +189,7 @@ static int rbtree_test_init(void)
> >                 check(0);
> >         }
> >
> > -       printk(KERN_ALERT "augmented rbtree testing");
> > +       pr_info("augmented rbtree testing");
> 
> This is changing the output from KERN_ALERT to KERN_INFO. Why is this
> necessary? Should this be pr_alert() instead?
> 
> >
> >         init();
> >
> > @@ -203,7 +206,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);
> >
> >         for (i = 0; i < CHECK_LOOPS; i++) {
> >                 init();
> > @@ -223,7 +226,7 @@ static int rbtree_test_init(void)
> >
> >  static void rbtree_test_exit(void)
> >  {
> > -       printk(KERN_ALERT "test exit\n");
> > +       pr_info("test exit\n");
> 
> This is changing the output from KERN_ALERT to KERN_INFO. Why is this
> necessary? Should this be pr_alert() instead?
> 
> >  }
> >
> >  module_init(rbtree_test_init)
> > --
> > 1.7.11.7
> >
> >
> >
> >
> > --
> > To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> > the body of a message to majordomo@vger.kernel.org
> > More majordomo info at  http://vger.kernel.org/majordomo-info.html
> > Please read the FAQ at  http://www.tux.org/lkml/



  reply	other threads:[~2013-03-19 17:14 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
2013-03-19 16:29 ` Shuah Khan
2013-03-19 17:14   ` Davidlohr Bueso [this message]
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=1363713282.2781.2.camel@buesod1.americas.hpqcorp.net \
    --to=davidlohr.bueso@hp.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=shuahkhan@gmail.com \
    --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®