ACPI: reboot: Unify the message printing
authorHanjun Guo <guohanjun@huawei.com>
Wed, 2 Jun 2021 08:54:34 +0000 (16:54 +0800)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 7 Jun 2021 13:36:46 +0000 (15:36 +0200)
The meesage printing in this file is mixed with pr_*() and
printk() but with no prefix and no pr_fmt() defined.

Intoduce 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>
drivers/acpi/reboot.c

index 2a61f884e2228c8c64a62e1c15a0b73988ea7f90..b79b7c99c237c331a4ca7dbba5f738b9a4b88a61 100644 (file)
@@ -1,5 +1,7 @@
 // SPDX-License-Identifier: GPL-2.0
 
+#define pr_fmt(fmt) "ACPI: " fmt
+
 #include <linux/pci.h>
 #include <linux/acpi.h>
 #include <acpi/reboot.h>
@@ -63,7 +65,7 @@ void acpi_reboot(void)
 
        case ACPI_ADR_SPACE_SYSTEM_MEMORY:
        case ACPI_ADR_SPACE_SYSTEM_IO:
-               printk(KERN_DEBUG "ACPI MEMORY or I/O RESET_REG.\n");
+               pr_debug("ACPI MEMORY or I/O RESET_REG.\n");
                acpi_reset();
                break;
        }