From: He Zhe <zhe...@windriver.com>

pr_* is preferred according to scripts/checkpatch.pl.

Signed-off-by: He Zhe <zhe...@windriver.com>
---
v2:
- Split printk cleanups into a single patch
- Add pr_fmt for mod name

 arch/x86/kernel/check.c | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/arch/x86/kernel/check.c b/arch/x86/kernel/check.c
index cc8258a..a3d9649 100644
--- a/arch/x86/kernel/check.c
+++ b/arch/x86/kernel/check.c
@@ -1,4 +1,7 @@
 // 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>
@@ -128,7 +131,8 @@ 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,7 +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",
+                       pr_err("Corrupted low memory at %p (%lx phys) = 
%08lx\n",
                               addr, __pa(addr), *addr);
                        corruption = 1;
                        *addr = 0;
@@ -172,7 +176,7 @@ 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",
+       pr_info("Scanning for low memory corruption every %d seconds\n",
               corruption_check_period);
 
        /* First time we run the checks right away */
-- 
2.7.4

Reply via email to