Remove redundant assignment to ObjectType
Colin King
PATCH v2 1/1 Remove redundant assignment to ObjectType
From: Colin Ian King <colin.king(a)canonical.com>
There are several occurrances of ObjectType being assigned twice successively and the first assignment is clearly unncessary and can hence be removed. Remove the redundant assignments and also a no longer needed OpInfo.
Signed-off-by Colin Ian King <colin.king(a)canonical.com>
--- source/common/adwalk.c | 5 ----- 1 file changed, 5 deletions(-)
source/common/adwalk.c +0 -5
@@ -747,7 +747,6 @@ AcpiDmLoadDescendingOp ( WalkState = Info->WalkState; OpInfo =AcpiPsGetOpcodeInfo (Op->Common.AmlOpcode); - ObjectType = OpInfo->ObjectType; ObjectType =AslMapNamedOpcodeToDataType (Op->Asl.AmlOpcode);/* Only interested in operators that create new names */
@@ -885,7 +884,6 @@ AcpiDmXrefDescendingOp ( WalkState = Info->WalkState; OpInfo =AcpiPsGetOpcodeInfo (Op->Common.AmlOpcode); - ObjectType = OpInfo->ObjectType; ObjectType =AslMapNamedOpcodeToDataType (Op->Asl.AmlOpcode); if ((!(OpInfo->Flags & AML_NAMED)) &&
@@ -1182,14 +1180,11 @@ AcpiDmCommonAscendingOp ( void *Context) {ACPI_OP_WALK_INFO *Info = Context; -const ACPI_OPCODE_INFO *OpInfo;ACPI_OBJECT_TYPE ObjectType;/* Close scope if necessary */ - OpInfo =AcpiPsGetOpcodeInfo (Op->Common.AmlOpcode); - ObjectType = OpInfo->ObjectType; ObjectType =AslMapNamedOpcodeToDataType (Op->Asl.AmlOpcode);if (AcpiNsOpensScope (ObjectType))
Signature · 1 line
2.11.0
Colin Ian King
Quoted 38 lines · Colin King
From: Colin Ian King <colin.king(a)canonical.com>
There are several occurrances of ObjectType being assigned twice successively and the first assignment is clearly unncessary and can hence be removed. Remove the redundant assignments and also a no longer needed OpInfo.
Signed-off-by Colin Ian King <colin.king(a)canonical.com>--- source/common/adwalk.c | 5 ----- 1 file changed, 5 deletions(-)source/common/adwalk.c +0
-3@@ -747,7 +747,6 @@ AcpiDmLoadDescendingOp ( WalkState = Info->WalkState; OpInfo =AcpiPsGetOpcodeInfo (Op->Common.AmlOpcode); - ObjectType = OpInfo->ObjectType; ObjectType =AslMapNamedOpcodeToDataType (Op->Asl.AmlOpcode);/* Only interested in operators that create new names */ @@ -885,7 +884,6 @@ AcpiDmXrefDescendingOp ( WalkState = Info->WalkState; OpInfo =AcpiPsGetOpcodeInfo (Op->Common.AmlOpcode); - ObjectType = OpInfo->ObjectType; ObjectType =AslMapNamedOpcodeToDataType (Op->Asl.AmlOpcode); if ((!(OpInfo->Flags & AML_NAMED)) &&@@ -1182,14 +1180,11 @@ AcpiDmCommonAscendingOp ( void *Context) {ACPI_OP_WALK_INFO *Info = Context; -const ACPI_OPCODE_INFO *OpInfo;
source/common/adwalk.c AcpiDmCommonAscendingOp ( · line 1190
Quoted 10 lines
source/common/adwalk.c +0
-2ACPI_OBJECT_TYPE ObjectType;/* Close scope if necessary */ - OpInfo =AcpiPsGetOpcodeInfo (Op->Common.AmlOpcode); - ObjectType = OpInfo->ObjectType; ObjectType =AslMapNamedOpcodeToDataType (Op->Asl.AmlOpcode);if (AcpiNsOpensScope (ObjectType))
Any chance this will be reviewed?