All of lore.kernel.org
 help / color / mirror / Atom feed
From: Colin King <colin.king at canonical.com>
To: devel@acpica.org
Subject: [Devel] [PATCH][V2] Remove redundant assignment to ObjectType
Date: Tue, 18 Apr 2017 22:30:20 +0100	[thread overview]
Message-ID: <20170418213020.17977-1-colin.king@canonical.com> (raw)

[-- 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


             reply	other threads:[~2017-04-18 21:30 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-18 21:30 Colin King [this message]
2017-05-03 13:55 [Devel] [PATCH][V2] Remove redundant assignment to ObjectType Colin Ian King

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170418213020.17977-1-colin.king@canonical.com \
    --to=devel@acpica.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.