qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 10/74] acpi: add aml_call0() helper


From: Marcel Apfelbaum
Subject: Re: [Qemu-devel] [PATCH 10/74] acpi: add aml_call0() helper
Date: Thu, 10 Dec 2015 15:04:43 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0

On 12/10/2015 01:41 AM, Igor Mammedov wrote:
it will help to call a method with 0 arguments

Signed-off-by: Igor Mammedov <address@hidden>
---
  hw/acpi/aml-build.c         | 8 ++++++++
  include/hw/acpi/aml-build.h | 1 +
  2 files changed, 9 insertions(+)

diff --git a/hw/acpi/aml-build.c b/hw/acpi/aml-build.c
index ee34771..50587de 100644
--- a/hw/acpi/aml-build.c
+++ b/hw/acpi/aml-build.c
@@ -540,6 +540,14 @@ Aml *aml_notify(Aml *arg1, Aml *arg2)
  }

  /* helper to call method with 1 argument */
+Aml *aml_call0(const char *method)
+{
+    Aml *var = aml_alloc();
+    build_append_namestring(var->buf, "%s", method);
+    return var;
+}
+
+/* helper to call method with 1 argument */
  Aml *aml_call1(const char *method, Aml *arg1)
  {
      Aml *var = aml_alloc();
diff --git a/include/hw/acpi/aml-build.h b/include/hw/acpi/aml-build.h
index 9761438..117ef46 100644
--- a/include/hw/acpi/aml-build.h
+++ b/include/hw/acpi/aml-build.h
@@ -210,6 +210,7 @@ Aml *aml_increment(Aml *arg);
  Aml *aml_decrement(Aml *arg);
  Aml *aml_index(Aml *arg1, Aml *idx);
  Aml *aml_notify(Aml *arg1, Aml *arg2);
+Aml *aml_call0(const char *method);
  Aml *aml_call1(const char *method, Aml *arg1);
  Aml *aml_call2(const char *method, Aml *arg1, Aml *arg2);
  Aml *aml_call3(const char *method, Aml *arg1, Aml *arg2, Aml *arg3);


Maybe aml_call instead of aml_call0 that implies some 'zero' initialization?
It doesn't really matter.

Reviewed-by: Marcel Apfelbaum <address@hidden>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]