[coreboot-gerrit] Change in coreboot[master]: ec/google/chromeec: Fix ACPI FWTS error
Martin Roth (Code Review)
gerrit at coreboot.org
Fri Aug 17 23:09:50 CEST 2018
Martin Roth has submitted this change and it was merged. ( https://review.coreboot.org/28123 )
Change subject: ec/google/chromeec: Fix ACPI FWTS error
......................................................................
ec/google/chromeec: Fix ACPI FWTS error
Fix the following FWTS error:
FAILED [MEDIUM] AMLAsmASL_MSG_RETURN_TYPES: Test 1, Assembler warning in line
3038
Line | AML source
--------------------------------------------------------------------------------
03035| Return (One)
03036| }
03037|
03038| Method (_Q09, 0, NotSerialized) // _Qxx: EC Query
| ^
| Warning 3115: Not all control paths return a value (_Q09)
03039| {
03040| If (Acquire (PATM, 0x03E8))
03041| {
================================================================================
ADVICE: (for Warning #3115, ASL_MSG_RETURN_TYPES): Some of the execution paths
do not return a value. All control paths that return must return a value
otherwise unexpected behaviour may occur. This error occurs because a branch on
an conditional op-code returns a value and another does not, which is
inconsistent behaviour.
_Q09 is a reserved method and can't return a value. Change the logic
so that no return is used and avoid this test error.
BUG=b:112476331
TEST=Run FWTS.
Change-Id: Ibbda1649ec2eb9cdf9966d4ec92bfd203bb78d07
Signed-off-by: Marc Jones <marcj303 at gmail.com>
Reviewed-on: https://review.coreboot.org/28123
Tested-by: build bot (Jenkins) <no-reply at coreboot.org>
Reviewed-by: Duncan Laurie <dlaurie at chromium.org>
---
M src/ec/google/chromeec/acpi/ec.asl
1 file changed, 12 insertions(+), 14 deletions(-)
Approvals:
build bot (Jenkins): Verified
Duncan Laurie: Looks good to me, approved
diff --git a/src/ec/google/chromeec/acpi/ec.asl b/src/ec/google/chromeec/acpi/ec.asl
index 94917dd..453a6d7 100644
--- a/src/ec/google/chromeec/acpi/ec.asl
+++ b/src/ec/google/chromeec/acpi/ec.asl
@@ -467,25 +467,23 @@
*/
Method (_Q09, 0, NotSerialized)
{
- If (Acquire (^PATM, 1000)) {
- Return ()
- }
+ If (LNot(Acquire (^PATM, 1000))) {
+ /* Read sensor ID for event */
+ Store (^PATI, Local0)
- /* Read sensor ID for event */
- Store (^PATI, Local0)
-
- /* When sensor ID returns 0xFF then no more events */
- While (LNotEqual (Local0, EC_TEMP_SENSOR_NOT_PRESENT))
- {
+ /* When sensor ID returns 0xFF then no more events */
+ While (LNotEqual (Local0, EC_TEMP_SENSOR_NOT_PRESENT))
+ {
#ifdef HAVE_THERM_EVENT_HANDLER
- \_SB.DPTF.TEVT (Local0)
+ \_SB.DPTF.TEVT (Local0)
#endif
- /* Keep reaading sensor ID for event */
- Store (^PATI, Local0)
- }
+ /* Keep reaading sensor ID for event */
+ Store (^PATI, Local0)
+ }
- Release (^PATM)
+ Release (^PATM)
+ }
}
/*
--
To view, visit https://review.coreboot.org/28123
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: Ibbda1649ec2eb9cdf9966d4ec92bfd203bb78d07
Gerrit-Change-Number: 28123
Gerrit-PatchSet: 2
Gerrit-Owner: Marc Jones <marc at marcjonesconsulting.com>
Gerrit-Reviewer: Duncan Laurie <dlaurie at chromium.org>
Gerrit-Reviewer: Marc Jones <marc at marcjonesconsulting.com>
Gerrit-Reviewer: Marshall Dawson <marshalldawson3rd at gmail.com>
Gerrit-Reviewer: Martin Roth <martinroth at google.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply at coreboot.org>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20180817/f459f73a/attachment.html>
More information about the coreboot-gerrit
mailing list