Skip to content

Commit

Permalink
AcpiGetSleepTypeData: Reduce warnings
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
acpibob committed Oct 8, 2015
1 parent c2a7d00 commit 7bb7731
Showing 1 changed file with 18 additions and 8 deletions.
26 changes: 18 additions & 8 deletions source/components/hardware/hwxface.c
Original file line number Diff line number Diff line change
Expand Up @@ -637,12 +637,20 @@ AcpiGetSleepTypeData (
* Evaluate the \_Sx namespace object containing the register values
* for this state
*/
Info->RelativePathname = ACPI_CAST_PTR (
char, AcpiGbl_SleepStateNames[SleepState]);
Info->RelativePathname = ACPI_CAST_PTR (char,
AcpiGbl_SleepStateNames[SleepState]);

Status = AcpiNsEvaluate (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 */
Expand All @@ -652,7 +660,7 @@ AcpiGetSleepTypeData (
ACPI_ERROR ((AE_INFO, "No Sleep State object returned from [%s]",
Info->RelativePathname));
Status = AE_AML_NO_RETURN_VALUE;
goto Cleanup;
goto WarningCleanup;
}

/* Return object must be of type Package */
Expand All @@ -661,7 +669,7 @@ AcpiGetSleepTypeData (
{
ACPI_ERROR ((AE_INFO, "Sleep State return object is not a Package"));
Status = AE_AML_OPERAND_TYPE;
goto Cleanup1;
goto ReturnValueCleanup;
}

/*
Expand Down Expand Up @@ -708,16 +716,18 @@ AcpiGetSleepTypeData (
break;
}

Cleanup1:
ReturnValueCleanup:
AcpiUtRemoveReference (Info->ReturnObject);

Cleanup:
WarningCleanup:
if (ACPI_FAILURE (Status))
{
ACPI_EXCEPTION ((AE_INFO, Status,
"While evaluating Sleep State [%s]", Info->RelativePathname));
"While evaluating Sleep State [%s]",
Info->RelativePathname));
}

FinalCleanup:
ACPI_FREE (Info);
return_ACPI_STATUS (Status);
}
Expand Down

0 comments on commit 7bb7731

Please sign in to comment.