From: <zhe.he@windriver.com>
To: <tglx@linutronix.de>, <mingo@redhat.com>, <hpa@zytor.com>,
<x86@kernel.org>, <pombredanne@nexb.com>,
<gregkh@linuxfoundation.org>, <kstewart@linuxfoundation.org>,
<linux-kernel@vger.kernel.org>
Cc: <zhe.he@windriver.com>
Subject: [PATCH v2 2/2] x86: corruption-check: Change printk to the right fashion
Date: Tue, 14 Aug 2018 23:33:43 +0800 [thread overview]
Message-ID: <1534260823-87917-2-git-send-email-zhe.he@windriver.com> (raw)
In-Reply-To: <1534260823-87917-1-git-send-email-zhe.he@windriver.com>
From: He Zhe <zhe.he@windriver.com>
pr_* is preferred according to scripts/checkpatch.pl.
Signed-off-by: He Zhe <zhe.he@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
next prev parent reply other threads:[~2018-08-14 15:34 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-14 15:33 [PATCH v2 1/2] x86: corruption-check: Passing memory_corruption_check to command line causes panic zhe.he
2018-08-14 15:33 ` zhe.he [this message]
2018-09-11 6:19 ` [tip:x86/boot] x86/corruption-check: Use pr_*() instead of printk() tip-bot for He Zhe
2018-08-20 8:56 ` [PATCH v2 1/2] x86: corruption-check: Passing memory_corruption_check to command line causes panic He Zhe
2018-08-20 17:18 ` Greg KH
2018-09-11 6:18 ` [tip:x86/boot] x86/corruption-check: Fix panic in memory_corruption_check() when boot option without value is provided tip-bot for He Zhe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1534260823-87917-2-git-send-email-zhe.he@windriver.com \
--to=zhe.he@windriver.com \
--cc=gregkh@linuxfoundation.org \
--cc=hpa@zytor.com \
--cc=kstewart@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=pombredanne@nexb.com \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).