summaryrefslogtreecommitdiff
path: root/drivers/acpi/nvs.c
diff options
context:
space:
mode:
authorHanjun Guo <guohanjun@huawei.com>2021-06-02 16:54:28 +0800
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2021-06-07 15:36:45 +0200
commit4f59927d5de483f99d26bbf0c3e8089adc9f139e (patch)
treeef1f8d5187b18c83327cf5cbf206cce9e341a5df /drivers/acpi/nvs.c
parente2935abb3a3ae88f5ab832158d6ed10c599a871f (diff)
ACPI: nvs: Unify the message printing
The message printing in nvs.c is mixed with pr_*() and printk(), but with no prefix and also no pr_fmt() defined. Introduce pr_fmt() and use pr_*() macros to replace printk(), to generate a unified format string for prefix. Signed-off-by: Hanjun Guo <guohanjun@huawei.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/acpi/nvs.c')
-rw-r--r--drivers/acpi/nvs.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/acpi/nvs.c b/drivers/acpi/nvs.c
index 9f8712a557b3..7f02e399047c 100644
--- a/drivers/acpi/nvs.c
+++ b/drivers/acpi/nvs.c
@@ -5,6 +5,8 @@
* Copyright (C) 2008-2011 Rafael J. Wysocki <rjw@sisk.pl>, Novell Inc.
*/
+#define pr_fmt(fmt) "ACPI: PM: " fmt
+
#include <linux/io.h>
#include <linux/kernel.h>
#include <linux/list.h>
@@ -94,7 +96,7 @@ static int suspend_nvs_register(unsigned long start, unsigned long size)
{
struct nvs_page *entry, *next;
- pr_info("PM: Registering ACPI NVS region [mem %#010lx-%#010lx] (%ld bytes)\n",
+ pr_info("Registering ACPI NVS region [mem %#010lx-%#010lx] (%ld bytes)\n",
start, start + size - 1, size);
while (size > 0) {
@@ -170,7 +172,7 @@ int suspend_nvs_save(void)
{
struct nvs_page *entry;
- printk(KERN_INFO "PM: Saving platform NVS memory\n");
+ pr_info("Saving platform NVS memory\n");
list_for_each_entry(entry, &nvs_list, node)
if (entry->data) {
@@ -202,7 +204,7 @@ void suspend_nvs_restore(void)
{
struct nvs_page *entry;
- printk(KERN_INFO "PM: Restoring platform NVS memory\n");
+ pr_info("Restoring platform NVS memory\n");
list_for_each_entry(entry, &nvs_list, node)
if (entry->data)