All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 4.4.y] ACPICA: acpi_get_sleep_type_data: Reduce warnings
@ 2016-09-27 22:08 Charles (Chas) Williams
  2016-09-28  6:08 ` Greg KH
  0 siblings, 1 reply; 3+ messages in thread
From: Charles (Chas) Williams @ 2016-09-27 22:08 UTC (permalink / raw)
  To: stable
  Cc: Prarit Bhargava, Bob Moore, Lv Zheng, Rafael J. Wysocki, Chas Williams

From: Prarit Bhargava <prarit@redhat.com>

commit a59b679ab85635737947310323f2f2bcfa0664a7 upstream.

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.

Link: https://github.com/acpica/acpica/commit/7bb77313
Link: https://bugs.acpica.org/show_bug.cgi?id=1208
Signed-off-by: Prarit Bhargava <prarit@redhat.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Chas Williams <ciwillia@brocade.com>
---
 drivers/acpi/acpica/hwxface.c | 24 +++++++++++++++++-------
 1 file changed, 17 insertions(+), 7 deletions(-)

diff --git a/drivers/acpi/acpica/hwxface.c b/drivers/acpi/acpica/hwxface.c
index 5f97468..b2e50d8 100644
--- a/drivers/acpi/acpica/hwxface.c
+++ b/drivers/acpi/acpica/hwxface.c
@@ -504,11 +504,20 @@ acpi_get_sleep_type_data(u8 sleep_state, u8 *sleep_type_a, u8 *sleep_type_b)
 	 * Evaluate the \_Sx namespace object containing the register values
 	 * for this state
 	 */
-	info->relative_pathname =
-	    ACPI_CAST_PTR(char, acpi_gbl_sleep_state_names[sleep_state]);
+	info->relative_pathname = 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 final_cleanup;
+		}
+
+		goto warning_cleanup;
 	}
 
 	/* Must have a return object */
@@ -517,7 +526,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 warning_cleanup;
 	}
 
 	/* Return object must be of type Package */
@@ -526,7 +535,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 return_value_cleanup;
 	}
 
 	/*
@@ -570,16 +579,17 @@ acpi_get_sleep_type_data(u8 sleep_state, u8 *sleep_type_a, u8 *sleep_type_b)
 		break;
 	}
 
-cleanup1:
+return_value_cleanup:
 	acpi_ut_remove_reference(info->return_object);
 
-cleanup:
+warning_cleanup:
 	if (ACPI_FAILURE(status)) {
 		ACPI_EXCEPTION((AE_INFO, status,
 				"While evaluating Sleep State [%s]",
 				info->relative_pathname));
 	}
 
+final_cleanup:
 	ACPI_FREE(info);
 	return_ACPI_STATUS(status);
 }
-- 
2.5.5


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

* Re: [PATCH 4.4.y] ACPICA: acpi_get_sleep_type_data: Reduce warnings
  2016-09-27 22:08 [PATCH 4.4.y] ACPICA: acpi_get_sleep_type_data: Reduce warnings Charles (Chas) Williams
@ 2016-09-28  6:08 ` Greg KH
  2016-09-28 10:39   ` Charles (Chas) Williams
  0 siblings, 1 reply; 3+ messages in thread
From: Greg KH @ 2016-09-28  6:08 UTC (permalink / raw)
  To: Charles (Chas) Williams
  Cc: stable, Prarit Bhargava, Bob Moore, Lv Zheng, Rafael J. Wysocki

On Tue, Sep 27, 2016 at 06:08:31PM -0400, Charles (Chas) Williams wrote:
> From: Prarit Bhargava <prarit@redhat.com>
> 
> commit a59b679ab85635737947310323f2f2bcfa0664a7 upstream.
> 
> 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.
> 
> Link: https://github.com/acpica/acpica/commit/7bb77313
> Link: https://bugs.acpica.org/show_bug.cgi?id=1208
> Signed-off-by: Prarit Bhargava <prarit@redhat.com>
> Signed-off-by: Bob Moore <robert.moore@intel.com>
> Signed-off-by: Lv Zheng <lv.zheng@intel.com>
> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> Signed-off-by: Chas Williams <ciwillia@brocade.com>
> ---
>  drivers/acpi/acpica/hwxface.c | 24 +++++++++++++++++-------
>  1 file changed, 17 insertions(+), 7 deletions(-)

Why is this a patch needed for 4.4-stable?  What is it solving?  It
looks like it just maybe reduces some warning messages in the kernel
log?

I need an ack from the ACPI maintainers before I can take such a
thing...

thanks,

greg k-h

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

* Re: [PATCH 4.4.y] ACPICA: acpi_get_sleep_type_data: Reduce warnings
  2016-09-28  6:08 ` Greg KH
@ 2016-09-28 10:39   ` Charles (Chas) Williams
  0 siblings, 0 replies; 3+ messages in thread
From: Charles (Chas) Williams @ 2016-09-28 10:39 UTC (permalink / raw)
  To: Greg KH; +Cc: stable, Prarit Bhargava, Bob Moore, Lv Zheng, Rafael J. Wysocki



On 09/28/2016 02:08 AM, Greg KH wrote:
> On Tue, Sep 27, 2016 at 06:08:31PM -0400, Charles (Chas) Williams wrote:
>> From: Prarit Bhargava <prarit@redhat.com>
>>
>> commit a59b679ab85635737947310323f2f2bcfa0664a7 upstream.
>>
>> 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.
>>
>> Link: https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_acpica_acpica_commit_7bb77313&d=DQIBAg&c=IL_XqQWOjubgfqINi2jTzg&r=fW5qRnAJyT1k33A0K2qxJUiM_Fvn25jBh6w5nZa0Av0&m=YKKMBH_Gf4p-1il4ccw3hyLri8yTMU5XVCo5WYuyFME&s=rSUXu0SVaMeo25EuS8kOBW7LahXj-pQY2NX989d_tsk&e=
>> Link: https://urldefense.proofpoint.com/v2/url?u=https-3A__bugs.acpica.org_show-5Fbug.cgi-3Fid-3D1208&d=DQIBAg&c=IL_XqQWOjubgfqINi2jTzg&r=fW5qRnAJyT1k33A0K2qxJUiM_Fvn25jBh6w5nZa0Av0&m=YKKMBH_Gf4p-1il4ccw3hyLri8yTMU5XVCo5WYuyFME&s=BNSdDtJiVLNjvXdV2y5FAkfZOODSN4lu0y507fBOY0c&e=
>> Signed-off-by: Prarit Bhargava <prarit@redhat.com>
>> Signed-off-by: Bob Moore <robert.moore@intel.com>
>> Signed-off-by: Lv Zheng <lv.zheng@intel.com>
>> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
>> Signed-off-by: Chas Williams <ciwillia@brocade.com>
>> ---
>>  drivers/acpi/acpica/hwxface.c | 24 +++++++++++++++++-------
>>  1 file changed, 17 insertions(+), 7 deletions(-)
>
> Why is this a patch needed for 4.4-stable?  What is it solving?  It
> looks like it just maybe reduces some warning messages in the kernel
> log?

Yes, that's exactly the reason.  End users get very nervous about
anything with big capitals letters that says NOT FOUND.  Yes, you
and I know they are harmless warnings but others perhaps haven't
dug far enough into ACPI to know this.  This is an attempt to
mitigate support callbacks for a non-issue.

Do a quick google seach for AE_NOT_FOUND Sleep State and you will
see endless posts about this "issue":

https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1485223
https://bbs.archlinux.org/viewtopic.php?id=189256
https://access.redhat.com/solutions/2478221

> I need an ack from the ACPI maintainers before I can take such a
> thing...
>
> thanks,
>
> greg k-h
>

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

end of thread, other threads:[~2016-09-28 10:39 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-27 22:08 [PATCH 4.4.y] ACPICA: acpi_get_sleep_type_data: Reduce warnings Charles (Chas) Williams
2016-09-28  6:08 ` Greg KH
2016-09-28 10:39   ` Charles (Chas) Williams

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.