ACPI: sysfs: Get rid of ACPICA message printing
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 22 Feb 2021 18:59:54 +0000 (19:59 +0100)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 8 Mar 2021 15:55:28 +0000 (16:55 +0100)
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 <rafael.j.wysocki@intel.com>
Reviewed-by: Hanjun Guo <guohanjun@huawei.com>
Documentation/firmware-guide/acpi/debug.rst
drivers/acpi/sysfs.c
include/acpi/acpi_drivers.h

index 0c979d8..6a6961c 100644 (file)
@@ -55,7 +55,6 @@ shows the supported mask values, currently these::
     ACPI_SBS_COMPONENT              0x00100000
     ACPI_FAN_COMPONENT              0x00200000
     ACPI_CONTAINER_COMPONENT        0x01000000
-    ACPI_SYSTEM_COMPONENT           0x02000000
     ACPI_MEMORY_DEVICE_COMPONENT    0x08000000
 
 debug_level
index 4f27d78..10f5149 100644 (file)
@@ -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_debug_layers[] = {
        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_event_status *ret,
        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 97e9a06..b5bdb55 100644 (file)
@@ -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
 
 /*