[PATCH][RFC] Adding KERN_* to all printk

From: Cesar Eduardo Barros (cesarb@nitnet.com.br)
Date: Sat Aug 26 2000 - 18:00:31 EST

I think all or almost all uses of the printk function should indicate its
severity, instead of relying on the default. So I want to ask if anybody has
any reason for NOT doing so.

Since it looks like I ended up being the defacto drivers/char/{rtc,nvram}.c odd
fixer, I made a patch for rtc.c which adds the severity to the three places
where it wasn't supplied and fixed one which was wrong.

Linus, please apply if you think it's correct.

diff -Naur linux-2.4.0-test7.orig/drivers/char/rtc.c linux-2.4.0-test7/drivers/char/rtc.c
--- linux-2.4.0-test7.orig/drivers/char/rtc.c Sat Aug 26 15:37:06 2000
+++ linux-2.4.0-test7/drivers/char/rtc.c Sat Aug 26 19:50:37 2000
@@ -633,7 +633,7 @@
- printk("rtc_init: no PC rtc found\n");
+ printk (KERN_ERR "rtc_init: no PC rtc found\n");
         return -EIO;
@@ -649,7 +649,7 @@
                  * Standard way for sparc to print irq's is to use
                  * __irq_itoa(). I think for EBus it's ok to use %d.
- printk("rtc: cannot register IRQ %d\n", rtc_irq);
+ printk (KERN_ERR "rtc: cannot register IRQ %d\n", rtc_irq);
                 return -EIO;
@@ -704,7 +704,8 @@
                 guess = "Digital DECstation";
         if (guess)
- printk("rtc: %s epoch (%lu) detected\n", guess, epoch);
+ printk (KERN_INFO "rtc: %s epoch (%lu) detected\n", guess,
+ epoch);
 #if RTC_IRQ
@@ -783,7 +784,7 @@
- printk(KERN_INFO "rtc: lost some interrupts at %ldHz.\n", freq);
+ printk (KERN_WARNING "rtc: lost some interrupts at %ldHz.\n", freq);
         /* Now we have new data */

Cesar Eduardo Barros
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

This archive was generated by hypermail 2b29 : Thu Aug 31 2000 - 21:00:18 EST