ACPICA: AcpiGetSleepTypeData: Reduce warnings
Subsystems (2)
PATCH 1/1 ACPICA: AcpiGetSleepTypeData: Reduce warnings
From: Robert Moore <[email protected]>
ACPICA commit 7bb77313091e52a846df4c9c2bea90be31bfb9d8
Eliminate warnings for "not found" _Sx errors, since these are optional. Original NOT_FOUND status is still returned.
Original changes by Prarit Bhargava.
ACPICA BZ 1208.
Before patch:
[prarit@prarit linux]$ dmesg | grep "Sleep State"
ACPI Exception: AE_NOT_FOUND, While evaluating Sleep State [\_S1_] (20130517/hwxface-571) ACPI Exception: AE_NOT_FOUND, While evaluating Sleep State [\_S2_] (20130517/hwxface-571)
After patch:
[prarit@prarit linux]$ dmesg | grep "Sleep State"
[prarit@prarit linux]$
--- drivers/acpi/acpica/hwxface.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-)
drivers/acpi/acpica/hwxface.c +10 -5
@@ -508,7 +508,11 @@ acpi_get_sleep_type_data(u8 sleep_state, u8 *sleep_type_a, u8 *sleep_type_b)ACPI_CAST_PTR (char, acpi_gbl_sleep_state_names[sleep_state]); status =acpi_ns_evaluate (info);if (ACPI_FAILURE (status)) { - goto cleanup; +if (status ==AE_NOT_FOUND ) { +/* The _Sx states are optional, ignore NOT_FOUND */ + goto finalcleanup; + } + goto warningcleanup; }/* Must have a return object */
@@ -517,7 +521,7 @@ acpi_get_sleep_type_data(u8 sleep_state, u8 *sleep_type_a, u8 *sleep_type_b)ACPI_ERROR ((AE_INFO ,"No Sleep State object returned from [%s]" , info->relative_pathname)); status =AE_AML_NO_RETURN_VALUE ; - goto cleanup; + goto warningcleanup; }/* Return object must be of type Package */
@@ -526,7 +530,7 @@ acpi_get_sleep_type_data(u8 sleep_state, u8 *sleep_type_a, u8 *sleep_type_b)ACPI_ERROR ((AE_INFO ,"Sleep State return object is not a Package" )); status =AE_AML_OPERAND_TYPE ; - goto cleanup1; + goto returnvaluecleanup; }/*
@@ -570,16 +574,17 @@ acpi_get_sleep_type_data(u8 sleep_state, u8 *sleep_type_a, u8 *sleep_type_b)break ; } -cleanup1: +returnvaluecleanup:acpi_ut_remove_reference (info->return_object); -cleanup: +warningcleanup:if (ACPI_FAILURE (status)) {ACPI_EXCEPTION ((AE_INFO , status,"While evaluating Sleep State [%s]" , info->relative_pathname)); } +finalcleanup:ACPI_FREE (info);return_ACPI_STATUS (status); }
Signature · 1 line
1.7.9.3
Quoted 20 lines · Prarit Bhargava
From: Robert Moore <[email protected]>
ACPICA commit
7bb77313091e52a846df4c9c2bea90be31bfb9d8Eliminate warnings for "not found"
_Sxerrors, since these are optional. OriginalNOT_FOUNDstatus is still returned.Original changes by Prarit Bhargava.
ACPICA BZ 1208.Before patch:
[prarit@prarit linux]$ dmesg | grep "Sleep State"
ACPI Exception:AE_NOT_FOUND, While evaluating Sleep State [\_S1_] (20130517/hwxface-571) ACPI Exception:AE_NOT_FOUND, While evaluating Sleep State [\_S2_] (20130517/hwxface-571)After patch:
[prarit@prarit linux]$ dmesg | grep "Sleep State"
[prarit@prarit linux]$
Quoted 6 lines
Cc Robert Moore <[email protected]>Cc Lv Zheng <[email protected]>Cc "Rafael J. Wysocki" <[email protected]>Cc Len Brown <[email protected]>Signed-off-by Prarit Bhargava <[email protected]>
I'll wait until this comes to me from upstream ACPICA.
Thanks,
Rafael