x86/debug: Add KERN_<LEVEL> to bare printks, convert printks to pr_<level>
[linux-2.6-block.git] / arch / x86 / kernel / cpu / mcheck / mce.c
index 0a687fd185e6c97b496578d1dc6acb4001c2833d..5623b4b5d51176c624d72261265b64db4f0db068 100644 (file)
@@ -7,6 +7,9 @@
  * Copyright 2008 Intel Corporation
  * Author: Andi Kleen
  */
+
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
 #include <linux/thread_info.h>
 #include <linux/capability.h>
 #include <linux/miscdevice.h>
@@ -210,7 +213,7 @@ static void drain_mcelog_buffer(void)
                                cpu_relax();
 
                                if (!m->finished && retries >= 4) {
-                                       pr_err("MCE: skipping error being logged currently!\n");
+                                       pr_err("skipping error being logged currently!\n");
                                        break;
                                }
                        }
@@ -1167,8 +1170,9 @@ int memory_failure(unsigned long pfn, int vector, int flags)
 {
        /* mce_severity() should not hand us an ACTION_REQUIRED error */
        BUG_ON(flags & MF_ACTION_REQUIRED);
-       printk(KERN_ERR "Uncorrected memory error in page 0x%lx ignored\n"
-               "Rebuild kernel with CONFIG_MEMORY_FAILURE=y for smarter handling\n", pfn);
+       pr_err("Uncorrected memory error in page 0x%lx ignored\n"
+              "Rebuild kernel with CONFIG_MEMORY_FAILURE=y for smarter handling\n",
+              pfn);
 
        return 0;
 }
@@ -1358,11 +1362,10 @@ static int __cpuinit __mcheck_cpu_cap_init(void)
 
        b = cap & MCG_BANKCNT_MASK;
        if (!banks)
-               printk(KERN_INFO "mce: CPU supports %d MCE banks\n", b);
+               pr_info("CPU supports %d MCE banks\n", b);
 
        if (b > MAX_NR_BANKS) {
-               printk(KERN_WARNING
-                      "MCE: Using only %u machine check banks out of %u\n",
+               pr_warn("Using only %u machine check banks out of %u\n",
                        MAX_NR_BANKS, b);
                b = MAX_NR_BANKS;
        }
@@ -1419,7 +1422,7 @@ static void __mcheck_cpu_init_generic(void)
 static int __cpuinit __mcheck_cpu_apply_quirks(struct cpuinfo_x86 *c)
 {
        if (c->x86_vendor == X86_VENDOR_UNKNOWN) {
-               pr_info("MCE: unknown CPU type - not enabling MCE support.\n");
+               pr_info("unknown CPU type - not enabling MCE support\n");
                return -EOPNOTSUPP;
        }
 
@@ -1574,7 +1577,7 @@ static void __mcheck_cpu_init_timer(void)
 /* Handle unconfigured int18 (should never happen) */
 static void unexpected_machine_check(struct pt_regs *regs, long error_code)
 {
-       printk(KERN_ERR "CPU#%d: Unexpected int18 (Machine Check).\n",
+       pr_err("CPU#%d: Unexpected int18 (Machine Check)\n",
               smp_processor_id());
 }
 
@@ -1893,8 +1896,7 @@ static int __init mcheck_enable(char *str)
                        get_option(&str, &monarch_timeout);
                }
        } else {
-               printk(KERN_INFO "mce argument %s ignored. Please use /sys\n",
-                      str);
+               pr_info("mce argument %s ignored. Please use /sys\n", str);
                return 0;
        }
        return 1;