Deleted Added
full compact
316,317c316,317
< * Check that the type of the return object is what is expected for
< * this predefined name
---
> * Check that the type of the main return object is what is expected
> * for this predefined name
323c323
< goto CheckValidationStatus;
---
> goto Exit;
326,328c326,330
< /* For returned Package objects, check the type of all sub-objects */
<
< if (ReturnObject->Common.Type == ACPI_TYPE_PACKAGE)
---
> /*
> * For returned Package objects, check the type of all sub-objects.
> * Note: Package may have been newly created by call above.
> */
> if ((*ReturnObjectPtr)->Common.Type == ACPI_TYPE_PACKAGE)
330a333,336
> if (ACPI_FAILURE (Status))
> {
> goto Exit;
> }
334,335c340,345
< * Perform additional, more complicated repairs on a per-name
< * basis.
---
> * The return object was OK, or it was successfully repaired above.
> * Now make some additional checks such as verifying that package
> * objects are sorted correctly (if required) or buffer objects have
> * the correct data width (bytes vs. dwords). These repairs are
> * performed on a per-name basis, i.e., the code is specific to
> * particular predefined names.
339,340c349
<
< CheckValidationStatus:
---
> Exit:
352d360
<
546a555,560
> /*
> * For variable-length Packages, we can safely remove all embedded
> * and trailing NULL package elements
> */
> AcpiNsRemoveNullElements (Data, Package->RetInfo.Type, ReturnObject);
>
585,587c599,602
< ACPI_WARN_PREDEFINED ((AE_INFO, Data->Pathname, Data->NodeFlags,
< "Return Package is larger than needed - "
< "found %u, expected %u", Count, ExpectedCount));
---
> ACPI_DEBUG_PRINT ((ACPI_DB_REPAIR,
> "%s: Return Package is larger than needed - "
> "found %u, expected %u\n",
> Data->Pathname, Count, ExpectedCount));
803d817
< BOOLEAN NonTrailingNull = FALSE;
809,810c823,829
< /* Validate each sub-Package in the parent Package */
<
---
> /*
> * Validate each sub-Package in the parent Package
> *
> * NOTE: assumes list of sub-packages contains no NULL elements.
> * Any NULL elements should have been removed by earlier call
> * to AcpiNsRemoveNullElements.
> */
813,852d831
< /*
< * Handling for NULL package elements. For now, we will simply allow
< * a parent package with trailing NULL elements. This can happen if
< * the package was defined to be longer than the initializer list.
< * This is legal as per the ACPI specification. It is often used
< * to allow for dynamic initialization of a Package.
< *
< * A future enhancement may be to simply truncate the package to
< * remove the trailing NULL elements.
< */
< if (!(*Elements))
< {
< if (!NonTrailingNull)
< {
< /* Ensure the remaining elements are all NULL */
<
< for (j = 1; j < (Count - i + 1); j++)
< {
< if (Elements[j])
< {
< NonTrailingNull = TRUE;
< }
< }
<
< if (!NonTrailingNull)
< {
< /* Ignore the trailing NULL elements */
<
< return (AE_OK);
< }
< }
<
< /* There are trailing non-null elements, issue warning */
<
< ACPI_WARN_PREDEFINED ((AE_INFO, Data->Pathname, Data->NodeFlags,
< "Found NULL element at package index %u", i));
< Elements++;
< continue;
< }
<