Skip to contentSkip to conversation

Remove redundant assignment to ObjectType

PATCH Superseded Colin King 1 participant 2 messages Apr 18, 2017 ACPI component architecture (acpica)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Colin King

author
#0 lore raw

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.

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 -3
index 22fbfe416..1841772a7 100644
@@ -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
author
#1 lore raw

[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
index 22fbfe416..1841772a7 100644
@@ -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