* [Devel] [PATCH][V2] Remove redundant assignment to ObjectType
@ 2017-04-18 21:30 Colin King
0 siblings, 0 replies; 2+ messages in thread
From: Colin King @ 2017-04-18 21:30 UTC (permalink / raw)
To: devel
[-- Attachment #1: Type: text/plain, Size: 1679 bytes --]
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(-)
diff --git a/source/common/adwalk.c b/source/common/adwalk.c
index 22fbfe416..73533027e 100644
--- a/source/common/adwalk.c
+++ b/source/common/adwalk.c
@@ -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))
--
2.11.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Devel] [PATCH][V2] Remove redundant assignment to ObjectType
@ 2017-05-03 13:55 Colin Ian King
0 siblings, 0 replies; 2+ messages in thread
From: Colin Ian King @ 2017-05-03 13:55 UTC (permalink / raw)
To: devel
[-- Attachment #1: Type: text/plain, Size: 1837 bytes --]
On 18/04/17 22:30, Colin King wrote:
> 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(-)
>
> diff --git a/source/common/adwalk.c b/source/common/adwalk.c
> index 22fbfe416..73533027e 100644
> --- a/source/common/adwalk.c
> +++ b/source/common/adwalk.c
> @@ -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))
>
Any chance this will be reviewed?
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-05-03 13:55 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-18 21:30 [Devel] [PATCH][V2] Remove redundant assignment to ObjectType Colin King
2017-05-03 13:55 Colin Ian King
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.