Remove redundant assignment to ObjectType
Colin King
PATCH 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.
--- source/common/adwalk.c | 3 --- 1 file changed, 3 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)) &&
@@ -1189,7 +1187,6 @@ AcpiDmCommonAscendingOp (/* 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
[Devel] NACK: [PATCH] Remove redundant assignment to ObjectType
Quoted 34 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.
Signed-off-by Colin Ian King <colin.king(a)canonical.com>--- source/common/adwalk.c | 3 --- 1 file changed, 3 deletions(-)source/common/adwalk.c +0
-2@@ -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)) &&
source/common/adwalk.c AcpiDmCommonAscendingOp ( · line 1192
Quoted 7 lines
source/common/adwalk.c +0
-1@@ -1189,7 +1187,6 @@ AcpiDmCommonAscendingOp (/* Close scope if necessary */ OpInfo =AcpiPsGetOpcodeInfo (Op->Common.AmlOpcode); - ObjectType = OpInfo->ObjectType; ObjectType =AslMapNamedOpcodeToDataType (Op->Asl.AmlOpcode);if (AcpiNsOpensScope (ObjectType))
NACK this patch. This causes a build warning on newer tool chains, I'll send and updated patch that addresses the fix to remove a redundant OpInfo to go with this change.
Colin