2021-02-22 19:07:50

by Rafael J. Wysocki

[permalink] [raw]
Subject: [PATCH v1 0/4] ACPI: Get rid of ACPICA message printing from core

Hi All,

This series replaces ACPI_DEBUG_PRINT() and ACPI_EXCEPTION() in the ACPI
processor driver and sysfs code and drops definitions of related symbols
that are not used for anything meaningful any more.

Please refer to the patch changelogs for details.

Thanks!




2021-02-22 19:08:07

by Rafael J. Wysocki

[permalink] [raw]
Subject: [PATCH v1 2/4] ACPI: sysfs: Get rid of ACPICA message printing

From: Rafael J. Wysocki <[email protected]>

Replace the only ACPI_EXCEPTION() instance in sysfs.c with a
pr_warn() call, drop the _COMPONENT and ACPI_MODULE_NAME()
definitions that are not used any more and drop the
ACPI_SYSTEM_COMPONENT definition that would not be used any
more in a meaningful way after the above changes.

Signed-off-by: Rafael J. Wysocki <[email protected]>
---
Documentation/firmware-guide/acpi/debug.rst | 1 -
drivers/acpi/sysfs.c | 7 +------
include/acpi/acpi_drivers.h | 1 -
3 files changed, 1 insertion(+), 8 deletions(-)

Index: linux-pm/drivers/acpi/sysfs.c
===================================================================
--- linux-pm.orig/drivers/acpi/sysfs.c
+++ linux-pm/drivers/acpi/sysfs.c
@@ -12,9 +12,6 @@

#include "internal.h"

-#define _COMPONENT ACPI_SYSTEM_COMPONENT
-ACPI_MODULE_NAME("sysfs");
-
#ifdef CONFIG_ACPI_DEBUG
/*
* ACPI debug sysfs I/F, including:
@@ -55,7 +52,6 @@ static const struct acpi_dlayer acpi_deb
ACPI_DEBUG_INIT(ACPI_SBS_COMPONENT),
ACPI_DEBUG_INIT(ACPI_FAN_COMPONENT),
ACPI_DEBUG_INIT(ACPI_CONTAINER_COMPONENT),
- ACPI_DEBUG_INIT(ACPI_SYSTEM_COMPONENT),
ACPI_DEBUG_INIT(ACPI_MEMORY_DEVICE_COMPONENT),
};

@@ -650,8 +646,7 @@ static int get_status(u32 index, acpi_ev
if (index < num_gpes) {
status = acpi_get_gpe_device(index, handle);
if (ACPI_FAILURE(status)) {
- ACPI_EXCEPTION((AE_INFO, AE_NOT_FOUND,
- "Invalid GPE 0x%x", index));
+ pr_warn("Invalid GPE 0x%x", index);
return -ENXIO;
}
status = acpi_get_gpe_status(*handle, index, ret);
Index: linux-pm/Documentation/firmware-guide/acpi/debug.rst
===================================================================
--- linux-pm.orig/Documentation/firmware-guide/acpi/debug.rst
+++ linux-pm/Documentation/firmware-guide/acpi/debug.rst
@@ -55,7 +55,6 @@ shows the supported mask values, current
ACPI_SBS_COMPONENT 0x00100000
ACPI_FAN_COMPONENT 0x00200000
ACPI_CONTAINER_COMPONENT 0x01000000
- ACPI_SYSTEM_COMPONENT 0x02000000
ACPI_MEMORY_DEVICE_COMPONENT 0x08000000

debug_level
Index: linux-pm/include/acpi/acpi_drivers.h
===================================================================
--- linux-pm.orig/include/acpi/acpi_drivers.h
+++ linux-pm/include/acpi/acpi_drivers.h
@@ -18,7 +18,6 @@
#define ACPI_SBS_COMPONENT 0x00100000
#define ACPI_FAN_COMPONENT 0x00200000
#define ACPI_CONTAINER_COMPONENT 0x01000000
-#define ACPI_SYSTEM_COMPONENT 0x02000000
#define ACPI_MEMORY_DEVICE_COMPONENT 0x08000000

/*



2021-02-23 14:20:11

by Hanjun Guo

[permalink] [raw]
Subject: Re: [PATCH v1 0/4] ACPI: Get rid of ACPICA message printing from core

On 2021/2/23 2:57, Rafael J. Wysocki wrote:
> Hi All,
>
> This series replaces ACPI_DEBUG_PRINT() and ACPI_EXCEPTION() in the ACPI
> processor driver and sysfs code and drops definitions of related symbols
> that are not used for anything meaningful any more.
>
> Please refer to the patch changelogs for details.

Except patch 1/4, others are looking good to me. some
legacy printk(PRIFIX ...) are still there, but we can
clean up them later.

Feel feel to add my review tag with minor issue addressed.

Reviewed-by: Hanjun Guo <[email protected]>

Thanks
Hanjun