kernel/acpica/compiler/asltree.c
/*******************************************************************************
 *
 * FUNCTION:    TrLinkChildOp
 *
 * PARAMETERS:  Op1           - Parent op
 *              Op2           - Op to become a child
 *
 * RETURN:      The parent op
 *
 * DESCRIPTION: Link two ops together as a parent and child
 *
 ******************************************************************************/
TrLinkChildOp
PARAMETERS:  Op1           - Parent op
Op2           - Op to become a child

The parent op

Link two ops together as a parent and child
TrLinkChildOp PARAMETERS : Op1 - Parent op Op2 - Op to become a child The parent op Link two ops together as a parent and child
ACPI_PARSE_OBJECT *
TrLinkChildOp (
    ACPI_PARSE_OBJECT       *Op1,
    ACPI_PARSE_OBJECT       *Op2)
{
    ACPI_PARSE_OBJECT       *Next;
    DbgPrint (ASL_PARSE_OUTPUT,
        "\nLinkChildOp: Parent=%p (%s), Child=%p (%s)\n",
        Op1, Op1 ? UtGetOpName(Op1->Asl.ParseOpcode): NULL,
        Op2, Op2 ? UtGetOpName(Op2->Asl.ParseOpcode): NULL);
    if (Gbl_CaptureComments && Op1)
    {
        if (Op1->Asl.ParseOpcode == PARSEOP_METHODCALL)
        {
            Gbl_CommentState.CaptureComments = TRUE;
        }
        Gbl_CommentState.LatestParseOp = Op1;
    }
    if (!Op1 || !Op2)
    {
        return (Op1);
    }
    Op1->Asl.Child = Op2;
    Next = Op2;
    while (Next)
    {
        Next->Asl.Parent = Op1;
        Next = Next->Asl.Next;
    }
    return (Op1);
}
ACPI_PARSE_OBJECT * TrLinkChildOp ( ACPI_PARSE_OBJECT * Op1 , ACPI_PARSE_OBJECT * Op2 ) { ACPI_PARSE_OBJECT * Next ; DbgPrint ( ASL_PARSE_OUTPUT , " \n \n " , Op1 , Op1 ? UtGetOpName ( Op1 -> Asl . ParseOpcode ) : NULL , Op2 , Op2 ? UtGetOpName ( Op2 -> Asl . ParseOpcode ) : NULL ) ; if ( Gbl_CaptureComments && Op1 ) { if ( Op1 -> Asl . ParseOpcode == PARSEOP_METHODCALL ) { Gbl_CommentState . CaptureComments = TRUE ; } Gbl_CommentState . LatestParseOp = Op1 ; } if ( ! Op1 || ! Op2 ) { return ( Op1 ) ; } Op1 -> Asl . Child = Op2 ; Next = Op2 ; while ( Next ) { Next -> Asl . Parent = Op1 ; Next = Next -> Asl . Next ; } return ( Op1 ) ; }
FUNCTION:    TrLinkChildOp
 PARAMETERS:  Op1           - Parent op
              Op2           - Op to become a child
FUNCTION : TrLinkChildOp PARAMETERS : Op1 - Parent op Op2 - Op to become a child
/*
     * Converter: if TrLinkChildOp is called to link a method call,
     * turn on capture comments as it signifies that we are done parsing
     * a method call.
     */ /* Set the child and all peers of the child to point to the parent */