Commit b1e3a25f authored by He Zhe's avatar He Zhe Committed by Ingo Molnar

x86/corruption-check: Use pr_*() instead of printk()

pr_*() is the preferred style.
Signed-off-by: default avatarHe Zhe <zhe.he@windriver.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: gregkh@linuxfoundation.org
Cc: kstewart@linuxfoundation.org
Cc: pombredanne@nexb.com
Link: http://lkml.kernel.org/r/1534260823-87917-2-git-send-email-zhe.he@windriver.com
[ Moved all console output into a single line. ]
Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
parent ccde460b
// SPDX-License-Identifier: GPL-2.0
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
#include <linux/init.h>
#include <linux/sched.h>
#include <linux/kthread.h>
......@@ -41,6 +44,7 @@ static __init int set_corruption_check(char *arg)
return ret;
memory_corruption_check = val;
return 0;
}
early_param("memory_corruption_check", set_corruption_check);
......@@ -128,7 +132,7 @@ void __init setup_bios_corruption_check(void)
}
if (num_scan_areas)
printk(KERN_INFO "Scanning %d areas for low memory corruption\n", num_scan_areas);
pr_info("Scanning %d areas for low memory corruption\n", num_scan_areas);
}
......@@ -147,8 +151,7 @@ void check_for_bios_corruption(void)
for (; size; addr++, size -= sizeof(unsigned long)) {
if (!*addr)
continue;
printk(KERN_ERR "Corrupted low memory at %p (%lx phys) = %08lx\n",
addr, __pa(addr), *addr);
pr_err("Corrupted low memory at %p (%lx phys) = %08lx\n", addr, __pa(addr), *addr);
corruption = 1;
*addr = 0;
}
......@@ -172,11 +175,11 @@ static int start_periodic_check_for_corruption(void)
if (!num_scan_areas || !memory_corruption_check || corruption_check_period == 0)
return 0;
printk(KERN_INFO "Scanning for low memory corruption every %d seconds\n",
corruption_check_period);
pr_info("Scanning for low memory corruption every %d seconds\n", corruption_check_period);
/* First time we run the checks right away */
schedule_delayed_work(&bios_check_work, 0);
return 0;
}
device_initcall(start_periodic_check_for_corruption);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment