All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ACPICA: AcpiGetSleepTypeData: Reduce warnings
@ 2015-10-22 17:17 Prarit Bhargava
  2015-10-24 13:45 ` Rafael J. Wysocki
  0 siblings, 1 reply; 2+ messages in thread
From: Prarit Bhargava @ 2015-10-22 17:17 UTC (permalink / raw)
  To: linux-acpi
  Cc: Robert Moore, Lv Zheng, Rafael J. Wysocki, Len Brown, Prarit Bhargava

From: Robert Moore <Robert.Moore@intel.com>

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]$

Cc: Robert Moore <Robert.Moore@intel.com>
Cc: Lv Zheng <lv.zheng@intel.com>
Cc: "Rafael J. Wysocki" <rafael.j.wysocki@intel.com>
Cc: Len Brown <lenb@kernel.org>

Signed-off-by: Prarit Bhargava <prarit@redhat.com>
---
 drivers/acpi/acpica/hwxface.c |   15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)

diff --git a/drivers/acpi/acpica/hwxface.c b/drivers/acpi/acpica/hwxface.c
index 5f97468..ea0cee4 100644
--- a/drivers/acpi/acpica/hwxface.c
+++ b/drivers/acpi/acpica/hwxface.c
@@ -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);
 }
-- 
1.7.9.3


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] ACPICA: AcpiGetSleepTypeData: Reduce warnings
  2015-10-22 17:17 [PATCH] ACPICA: AcpiGetSleepTypeData: Reduce warnings Prarit Bhargava
@ 2015-10-24 13:45 ` Rafael J. Wysocki
  0 siblings, 0 replies; 2+ messages in thread
From: Rafael J. Wysocki @ 2015-10-24 13:45 UTC (permalink / raw)
  To: Prarit Bhargava
  Cc: linux-acpi, Robert Moore, Lv Zheng, Rafael J. Wysocki, Len Brown

On Thursday, October 22, 2015 01:17:18 PM Prarit Bhargava wrote:
> From: Robert Moore <Robert.Moore@intel.com>
> 
> 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]$
> 
> Cc: Robert Moore <Robert.Moore@intel.com>
> Cc: Lv Zheng <lv.zheng@intel.com>
> Cc: "Rafael J. Wysocki" <rafael.j.wysocki@intel.com>
> Cc: Len Brown <lenb@kernel.org>
> 
> Signed-off-by: Prarit Bhargava <prarit@redhat.com>

I'll wait until this comes to me from upstream ACPICA.

Thanks,
Rafael


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-10-24 13:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-10-22 17:17 [PATCH] ACPICA: AcpiGetSleepTypeData: Reduce warnings Prarit Bhargava
2015-10-24 13:45 ` Rafael J. Wysocki

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.