kernel/acpica/components/namespace/nsprepkg.c
/*******************************************************************************
 *
 * FUNCTION:    AcpiNsCheckPackageElements
 *
 * PARAMETERS:  Info            - Method execution information block
 *              Elements        - Pointer to the package elements array
 *              Type1           - Object type for first group
 *              Count1          - Count for first group
 *              Type2           - Object type for second group
 *              Count2          - Count for second group
 *              StartIndex      - Start of the first group of elements
 *
 * RETURN:      Status
 *
 * DESCRIPTION: Check that all elements of a package are of the correct object
 *              type. Supports up to two groups of different object types.
 *
 ******************************************************************************/


Status

Check that all elements of a package are of the correct object
type. Supports up to two groups of different object types.
Status Check that all elements of a package are of the correct object type . Supports up to two groups of different object types .
static ACPI_STATUS
AcpiNsCheckPackageElements (
    ACPI_EVALUATE_INFO          *Info,
    ACPI_OPERAND_OBJECT         **Elements,
    UINT8                       Type1,
    UINT32                      Count1,
    UINT8                       Type2,
    UINT32                      Count2,
    UINT32                      StartIndex)
{
    ACPI_OPERAND_OBJECT         **ThisElement = Elements;
    ACPI_STATUS                 Status;
    UINT32                      i;
    for (i = 0; i < Count1; i++)
    {
        Status = AcpiNsCheckObjectType (Info, ThisElement,
            Type1, i + StartIndex);
        if (ACPI_FAILURE (Status))
        {
            return (Status);
        }
        ThisElement++;
    }
    for (i = 0; i < Count2; i++)
    {
        Status = AcpiNsCheckObjectType (Info, ThisElement,
            Type2, (i + Count1 + StartIndex));
        if (ACPI_FAILURE (Status))
        {
            return (Status);
        }
        ThisElement++;
    }
    return (AE_OK);
}
static ACPI_STATUS AcpiNsCheckPackageElements ( ACPI_EVALUATE_INFO * Info , ACPI_OPERAND_OBJECT * * Elements , UINT8 Type1 , UINT32 Count1 , UINT8 Type2 , UINT32 Count2 , UINT32 StartIndex ) { ACPI_OPERAND_OBJECT * * ThisElement = Elements ; ACPI_STATUS Status ; UINT32 i ; for ( i = 0 ; i < Count1 ; i ++ ) { Status = AcpiNsCheckObjectType ( Info , ThisElement , Type1 , i + StartIndex ) ; if ( ACPI_FAILURE ( Status ) ) { return ( Status ) ; } ThisElement ++ ; } for ( i = 0 ; i < Count2 ; i ++ ) { Status = AcpiNsCheckObjectType ( Info , ThisElement , Type2 , ( i + Count1 + StartIndex ) ) ; if ( ACPI_FAILURE ( Status ) ) { return ( Status ) ; } ThisElement ++ ; } return ( AE_OK ) ; }
FUNCTION:    AcpiNsCheckPackageElements
 PARAMETERS:  Info            - Method execution information block
              Elements        - Pointer to the package elements array
              Type1           - Object type for first group
              Count1          - Count for first group
              Type2           - Object type for second group
              Count2          - Count for second group
              StartIndex      - Start of the first group of elements
FUNCTION : AcpiNsCheckPackageElements PARAMETERS : Info - Method execution information block Elements - Pointer to the package elements array Type1 - Object type for first group Count1 - Count for first group Type2 - Object type for second group Count2 - Count for second group StartIndex - Start of the first group of elements
/*
     * Up to two groups of package elements are supported by the data
     * structure. All elements in each group must be of the same type.
     * The second group can have a count of zero.
     */