Skip to content

Commit 8acf410

Browse files
guohanjunrafaeljw
authored andcommitted
ACPI: scan: Unify the log message printing
The log messages in scan.c is not in consistency, some pr_*() calls have PREFIX, but some don't. Using pr_fmt() and remove PREFIX, also replace printk() with pr_*() macro to unify the message printing. Signed-off-by: Hanjun Guo <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]>
1 parent bd10c13 commit 8acf410

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

drivers/acpi/scan.c

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
* scan.c - support for transforming the ACPI namespace into individual objects
44
*/
55

6+
#define pr_fmt(fmt) "ACPI: " fmt
7+
68
#include <linux/module.h>
79
#include <linux/init.h>
810
#include <linux/slab.h>
@@ -729,7 +731,7 @@ int acpi_device_add(struct acpi_device *device,
729731

730732
result = acpi_device_setup_files(device);
731733
if (result)
732-
printk(KERN_ERR PREFIX "Error creating sysfs interface for device %s\n",
734+
pr_err("Error creating sysfs interface for device %s\n",
733735
dev_name(&device->dev));
734736

735737
return 0;
@@ -1320,8 +1322,7 @@ static void acpi_set_pnp_ids(acpi_handle handle, struct acpi_device_pnp *pnp,
13201322

13211323
acpi_get_object_info(handle, &info);
13221324
if (!info) {
1323-
pr_err(PREFIX "%s: Error reading device info\n",
1324-
__func__);
1325+
pr_err("%s: Error reading device info\n", __func__);
13251326
return;
13261327
}
13271328

@@ -2278,7 +2279,7 @@ static void __init acpi_get_spcr_uart_addr(void)
22782279
status = acpi_get_table(ACPI_SIG_SPCR, 0,
22792280
(struct acpi_table_header **)&spcr_ptr);
22802281
if (ACPI_FAILURE(status)) {
2281-
pr_warn(PREFIX "STAO table present, but SPCR is missing\n");
2282+
pr_warn("STAO table present, but SPCR is missing\n");
22822283
return;
22832284
}
22842285

@@ -2319,7 +2320,7 @@ int __init acpi_scan_init(void)
23192320
(struct acpi_table_header **)&stao_ptr);
23202321
if (ACPI_SUCCESS(status)) {
23212322
if (stao_ptr->header.length > sizeof(struct acpi_table_stao))
2322-
pr_info(PREFIX "STAO Name List not yet supported.\n");
2323+
pr_info("STAO Name List not yet supported.\n");
23232324

23242325
if (stao_ptr->ignore_uart)
23252326
acpi_get_spcr_uart_addr();

0 commit comments

Comments
 (0)