[lkml]   [2000]   [Aug]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    Patch in this message
    Subject[PATCH][RFC] Adding KERN_* to all printk

    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
    Please read the FAQ at

     \ /
      Last update: 2005-03-22 12:38    [W:0.033 / U:0.072 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site