Skip to content

Commit 8b457d6

Browse files
committed
Merge branches 'acpi-dptf' and 'acpi-messages'
* acpi-dptf: ACPI: DPTF: Add battery participant for Intel SoCs * acpi-messages: ACPI: Remove the macro PREFIX "ACPI: " ACPI: sleep: Unify the message printing ACPI: sbs: Unify the message printing ACPI: scan: Unify the log message printing ACPI: sbshc: Unify the message printing ACPI: sysfs: Cleanup message printing ACPI: reboot: Unify the message printing ACPI: processor_throttling: Cleanup the printing messages ACPI: processor_perflib: Cleanup print messages ACPI: processor_thermal: Remove unused PREFIX for printing ACPI: pci_root: Unify the message printing ACPI: osl: Remove the duplicated PREFIX for message printing ACPI: nvs: Unify the message printing ACPI: glue: Clean up the printing messages ACPI: event: Use pr_*() macros to replace printk() ACPI: bus: Use pr_*() macros to replace printk() ACPI: blacklist: Unify the message printing ACPI: cmos_rtc: Using pr_fmt() and remove PREFIX
3 parents 3a616ec + 7d96611 + 0ac2c0e commit 8b457d6

19 files changed

+108
-121
lines changed

drivers/acpi/acpi_cmos_rtc.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
* Authors: Lan Tianyu <[email protected]>
77
*/
88

9+
#define pr_fmt(fmt) "ACPI: " fmt
10+
911
#include <linux/acpi.h>
1012
#include <linux/device.h>
1113
#include <linux/err.h>
@@ -59,7 +61,7 @@ static int acpi_install_cmos_rtc_space_handler(struct acpi_device *adev,
5961
&acpi_cmos_rtc_space_handler,
6062
NULL, NULL);
6163
if (ACPI_FAILURE(status)) {
62-
pr_err(PREFIX "Error installing CMOS-RTC region handler\n");
64+
pr_err("Error installing CMOS-RTC region handler\n");
6365
return -ENODEV;
6466
}
6567

@@ -70,7 +72,7 @@ static void acpi_remove_cmos_rtc_space_handler(struct acpi_device *adev)
7072
{
7173
if (ACPI_FAILURE(acpi_remove_address_space_handler(adev->handle,
7274
ACPI_ADR_SPACE_CMOS, &acpi_cmos_rtc_space_handler)))
73-
pr_err(PREFIX "Error removing CMOS-RTC region handler\n");
75+
pr_err("Error removing CMOS-RTC region handler\n");
7476
}
7577

7678
static struct acpi_scan_handler cmos_rtc_handler = {

drivers/acpi/blacklist.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
* Copyright (C) 2002 Andy Grover <[email protected]>
1111
*/
1212

13+
#define pr_fmt(fmt) "ACPI: " fmt
14+
1315
#include <linux/kernel.h>
1416
#include <linux/init.h>
1517
#include <linux/acpi.h>
@@ -49,12 +51,12 @@ int __init acpi_blacklisted(void)
4951

5052
i = acpi_match_platform_list(acpi_blacklist);
5153
if (i >= 0) {
52-
pr_err(PREFIX "Vendor \"%6.6s\" System \"%8.8s\" Revision 0x%x has a known ACPI BIOS problem.\n",
54+
pr_err("Vendor \"%6.6s\" System \"%8.8s\" Revision 0x%x has a known ACPI BIOS problem.\n",
5355
acpi_blacklist[i].oem_id,
5456
acpi_blacklist[i].oem_table_id,
5557
acpi_blacklist[i].oem_revision);
5658

57-
pr_err(PREFIX "Reason: %s. This is a %s error\n",
59+
pr_err("Reason: %s. This is a %s error\n",
5860
acpi_blacklist[i].reason,
5961
(acpi_blacklist[i].data ?
6062
"non-recoverable" : "recoverable"));
@@ -73,8 +75,7 @@ int __init acpi_blacklisted(void)
7375
#ifdef CONFIG_ACPI_REV_OVERRIDE_POSSIBLE
7476
static int __init dmi_enable_rev_override(const struct dmi_system_id *d)
7577
{
76-
printk(KERN_NOTICE PREFIX "DMI detected: %s (force ACPI _REV to 5)\n",
77-
d->ident);
78+
pr_notice("DMI detected: %s (force ACPI _REV to 5)\n", d->ident);
7879
acpi_rev_override_setup(NULL);
7980
return 0;
8081
}

drivers/acpi/bus.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,7 @@ EXPORT_SYMBOL_GPL(osc_sb_native_usb4_control);
359359

360360
static void acpi_bus_decode_usb_osc(const char *msg, u32 bits)
361361
{
362-
printk(KERN_INFO PREFIX "%s USB3%c DisplayPort%c PCIe%c XDomain%c\n", msg,
362+
pr_info("%s USB3%c DisplayPort%c PCIe%c XDomain%c\n", msg,
363363
(bits & OSC_USB_USB3_TUNNELING) ? '+' : '-',
364364
(bits & OSC_USB_DP_TUNNELING) ? '+' : '-',
365365
(bits & OSC_USB_PCIE_TUNNELING) ? '+' : '-',
@@ -398,7 +398,7 @@ static void acpi_bus_osc_negotiate_usb_control(void)
398398
return;
399399

400400
if (context.ret.length != sizeof(capbuf)) {
401-
printk(KERN_INFO PREFIX "USB4 _OSC: returned invalid length buffer\n");
401+
pr_info("USB4 _OSC: returned invalid length buffer\n");
402402
goto out_free;
403403
}
404404

drivers/acpi/dptf/int340x_thermal.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ static const struct acpi_device_id int340x_thermal_device_ids[] = {
2424
{"INT3409"},
2525
{"INT340A"},
2626
{"INT340B"},
27+
{"INT3532"},
2728
{"INTC1040"},
2829
{"INTC1041"},
2930
{"INTC1043"},
@@ -33,6 +34,7 @@ static const struct acpi_device_id int340x_thermal_device_ids[] = {
3334
{"INTC1047"},
3435
{"INTC1048"},
3536
{"INTC1049"},
37+
{"INTC1050"},
3638
{"INTC1060"},
3739
{"INTC1061"},
3840
{""},

drivers/acpi/event.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
*
88
*/
99

10+
#define pr_fmt(fmt) "ACPI: " fmt
11+
1012
#include <linux/spinlock.h>
1113
#include <linux/export.h>
1214
#include <linux/proc_fs.h>
@@ -173,8 +175,8 @@ static int __init acpi_event_init(void)
173175
/* create genetlink for acpi event */
174176
error = acpi_event_genetlink_init();
175177
if (error)
176-
printk(KERN_WARNING PREFIX
177-
"Failed to create genetlink family for ACPI event\n");
178+
pr_warn("Failed to create genetlink family for ACPI event\n");
179+
178180
return 0;
179181
}
180182

drivers/acpi/glue.c

Lines changed: 9 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
* Copyright (c) 2005 Intel Corp.
77
*/
88

9+
#define pr_fmt(fmt) "ACPI: " fmt
10+
911
#include <linux/acpi_iort.h>
1012
#include <linux/export.h>
1113
#include <linux/init.h>
@@ -19,17 +21,6 @@
1921

2022
#include "internal.h"
2123

22-
#define ACPI_GLUE_DEBUG 0
23-
#if ACPI_GLUE_DEBUG
24-
#define DBG(fmt, ...) \
25-
printk(KERN_DEBUG PREFIX fmt, ##__VA_ARGS__)
26-
#else
27-
#define DBG(fmt, ...) \
28-
do { \
29-
if (0) \
30-
printk(KERN_DEBUG PREFIX fmt, ##__VA_ARGS__); \
31-
} while (0)
32-
#endif
3324
static LIST_HEAD(bus_type_list);
3425
static DECLARE_RWSEM(bus_type_sem);
3526

@@ -44,7 +35,7 @@ int register_acpi_bus_type(struct acpi_bus_type *type)
4435
down_write(&bus_type_sem);
4536
list_add_tail(&type->list, &bus_type_list);
4637
up_write(&bus_type_sem);
47-
printk(KERN_INFO PREFIX "bus type %s registered\n", type->name);
38+
pr_info("bus type %s registered\n", type->name);
4839
return 0;
4940
}
5041
return -ENODEV;
@@ -59,8 +50,7 @@ int unregister_acpi_bus_type(struct acpi_bus_type *type)
5950
down_write(&bus_type_sem);
6051
list_del_init(&type->list);
6152
up_write(&bus_type_sem);
62-
printk(KERN_INFO PREFIX "bus type %s unregistered\n",
63-
type->name);
53+
pr_info("bus type %s unregistered\n", type->name);
6454
return 0;
6555
}
6656
return -ENODEV;
@@ -307,7 +297,7 @@ static int acpi_device_notify(struct device *dev)
307297

308298
adev = type->find_companion(dev);
309299
if (!adev) {
310-
DBG("Unable to get handle for %s\n", dev_name(dev));
300+
pr_debug("Unable to get handle for %s\n", dev_name(dev));
311301
ret = -ENODEV;
312302
goto out;
313303
}
@@ -328,16 +318,15 @@ static int acpi_device_notify(struct device *dev)
328318
adev->handler->bind(dev);
329319

330320
out:
331-
#if ACPI_GLUE_DEBUG
332321
if (!ret) {
333322
struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL };
334323

335324
acpi_get_name(ACPI_HANDLE(dev), ACPI_FULL_PATHNAME, &buffer);
336-
DBG("Device %s -> %s\n", dev_name(dev), (char *)buffer.pointer);
325+
pr_debug("Device %s -> %s\n", dev_name(dev), (char *)buffer.pointer);
337326
kfree(buffer.pointer);
338-
} else
339-
DBG("Device %s -> No ACPI support\n", dev_name(dev));
340-
#endif
327+
} else {
328+
pr_debug("Device %s -> No ACPI support\n", dev_name(dev));
329+
}
341330

342331
return ret;
343332
}

drivers/acpi/internal.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@
1111

1212
#include <linux/idr.h>
1313

14-
#define PREFIX "ACPI: "
15-
1614
int early_acpi_osi_init(void);
1715
int acpi_osi_init(void);
1816
acpi_status acpi_os_initialize1(void);

drivers/acpi/nvs.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
* Copyright (C) 2008-2011 Rafael J. Wysocki <[email protected]>, Novell Inc.
66
*/
77

8+
#define pr_fmt(fmt) "ACPI: PM: " fmt
9+
810
#include <linux/io.h>
911
#include <linux/kernel.h>
1012
#include <linux/list.h>
@@ -94,7 +96,7 @@ static int suspend_nvs_register(unsigned long start, unsigned long size)
9496
{
9597
struct nvs_page *entry, *next;
9698

97-
pr_info("PM: Registering ACPI NVS region [mem %#010lx-%#010lx] (%ld bytes)\n",
99+
pr_info("Registering ACPI NVS region [mem %#010lx-%#010lx] (%ld bytes)\n",
98100
start, start + size - 1, size);
99101

100102
while (size > 0) {
@@ -170,7 +172,7 @@ int suspend_nvs_save(void)
170172
{
171173
struct nvs_page *entry;
172174

173-
printk(KERN_INFO "PM: Saving platform NVS memory\n");
175+
pr_info("Saving platform NVS memory\n");
174176

175177
list_for_each_entry(entry, &nvs_list, node)
176178
if (entry->data) {
@@ -202,7 +204,7 @@ void suspend_nvs_restore(void)
202204
{
203205
struct nvs_page *entry;
204206

205-
printk(KERN_INFO "PM: Restoring platform NVS memory\n");
207+
pr_info("Restoring platform NVS memory\n");
206208

207209
list_for_each_entry(entry, &nvs_list, node)
208210
if (entry->data)

drivers/acpi/osl.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ acpi_physical_address __init acpi_os_get_root_pointer(void)
212212
return efi.acpi20;
213213
if (efi.acpi != EFI_INVALID_TABLE_ADDR)
214214
return efi.acpi;
215-
pr_err(PREFIX "System description tables not found\n");
215+
pr_err("System description tables not found\n");
216216
} else if (IS_ENABLED(CONFIG_ACPI_LEGACY_TABLES_LOOKUP)) {
217217
acpi_find_root_pointer(&pa);
218218
}
@@ -430,7 +430,7 @@ void __ref acpi_os_unmap_iomem(void __iomem *virt, acpi_size size)
430430
map = acpi_map_lookup_virt(virt, size);
431431
if (!map) {
432432
mutex_unlock(&acpi_ioremap_lock);
433-
WARN(true, PREFIX "%s: bad address %p\n", __func__, virt);
433+
WARN(true, "ACPI: %s: bad address %p\n", __func__, virt);
434434
return;
435435
}
436436
acpi_os_drop_map_ref(map);

drivers/acpi/pci_root.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
* Copyright (C) 2001, 2002 Paul Diefenbaugh <[email protected]>
77
*/
88

9+
#define pr_fmt(fmt) "ACPI: " fmt
10+
911
#include <linux/kernel.h>
1012
#include <linux/module.h>
1113
#include <linux/init.h>
@@ -574,7 +576,7 @@ static int acpi_pci_root_add(struct acpi_device *device,
574576
goto end;
575577
}
576578

577-
pr_info(PREFIX "%s [%s] (domain %04x %pR)\n",
579+
pr_info("%s [%s] (domain %04x %pR)\n",
578580
acpi_device_name(device), acpi_device_bid(device),
579581
root->segment, &root->secondary);
580582

0 commit comments

Comments
 (0)