mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 1/3] rbtree_test: use pr_info for module prefix in messages
@ 2013-03-18 23:20 Davidlohr Bueso
  2013-03-18 23:44 ` Joe Perches
  2013-03-19 16:29 ` Shuah Khan
  0 siblings, 2 replies; 10+ messages in thread
From: Davidlohr Bueso @ 2013-03-18 23:20 UTC (permalink / raw)
  To: Andrew Morton, Michel Lespinasse; +Cc: LKML

This provides nicer message output. Since it seems more appropriate
for the nature of this module, also use KERN_INFO instead of other
levels.

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");
 
 	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");
 
 	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");
 }
 
 module_init(rbtree_test_init)
-- 
1.7.11.7





^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2013-03-22 23:06 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-18 23:20 [PATCH 1/3] rbtree_test: use pr_info for module prefix in messages 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
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

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®