qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH] aml-build: append opcodes using build_append_byte
Date: Sun, 8 Mar 2015 16:22:38 +0100	[thread overview]
Message-ID: <1425828153-30617-1-git-send-email-mst@redhat.com> (raw)

Opcodes are raw bytes, they shouldn't be added
using build_append_int. This only happens to work
with 0 and 1 opcodes.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
 hw/acpi/aml-build.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/hw/acpi/aml-build.c b/hw/acpi/aml-build.c
index ff12b28..e01b8c2 100644
--- a/hw/acpi/aml-build.c
+++ b/hw/acpi/aml-build.c
@@ -112,7 +112,7 @@ build_append_namestringv(GArray *array, const char *format, va_list ap)
     switch (seg_count) {
     case 1:
         if (!*s) {
-            build_append_byte(array, 0x0); /* NullName */
+            build_append_byte(array, 0x00); /* NullName */
         } else {
             build_append_nameseg(array, s);
         }
@@ -448,7 +448,7 @@ Aml *aml_and(Aml *arg1, Aml *arg2)
     Aml *var = aml_opcode(0x7B /* AndOp */);
     aml_append(var, arg1);
     aml_append(var, arg2);
-    build_append_int(var->buf, 0x00 /* NullNameOp */);
+    build_append_byte(var->buf, 0x00 /* NullNameOp */);
     return var;
 }
 
@@ -546,7 +546,7 @@ Aml *aml_equal(Aml *arg1, Aml *arg2)
     Aml *var = aml_opcode(0x93 /* LequalOp */);
     aml_append(var, arg1);
     aml_append(var, arg2);
-    build_append_int(var->buf, 0x00); /* NullNameOp */
+    build_append_byte(var->buf, 0x00); /* NullNameOp */
     return var;
 }
 
-- 
MST

             reply	other threads:[~2015-03-08 15:22 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-08 15:22 Michael S. Tsirkin [this message]
2015-03-09  9:33 ` [Qemu-devel] [PATCH] aml-build: append opcodes using build_append_byte Igor Mammedov

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=1425828153-30617-1-git-send-email-mst@redhat.com \
    --to=mst@redhat.com \
    --cc=qemu-devel@nongnu.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).