qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Robert Hoo <robert.hu@linux.intel.com>
To: xiaoguangrong.eric@gmail.com, mst@redhat.com,
	imammedo@redhat.com, ani@anisinha.ca, qemu-devel@nongnu.org
Cc: jingqi.liu@intel.com, dan.j.williams@intel.com,
	Robert Hoo <robert.hu@linux.intel.com>,
	robert.hu@intel.com
Subject: [PATCH 2/2] acpi/nvdimm: Fix aml_or() and aml_and() in if clause
Date: Tue, 12 Apr 2022 14:57:53 +0800	[thread overview]
Message-ID: <20220412065753.3216538-3-robert.hu@linux.intel.com> (raw)
In-Reply-To: <20220412065753.3216538-1-robert.hu@linux.intel.com>

It should be some typo originally, where in If condition, using bitwise
and/or, rather than logical and/or.

The resulting change in AML code:

If (((Local6 == Zero) | (Arg0 != Local0)))
==>
If (((Local6 == Zero) || (Arg0 != Local0)))

If (((ObjectType (Arg3) == 0x04) & (SizeOf (Arg3) == One)))
==>
If (((ObjectType (Arg3) == 0x04) && (SizeOf (Arg3) == One)))

Fixes: 90623ebf603 ("nvdimm acpi: check UUID")
Fixes: 4568c948066 ("nvdimm acpi: save arg3 of _DSM method")
Signed-off-by: Robert Hoo <robert.hu@linux.intel.com>
Reviewed-by: Jingqi Liu <jingqi.liu@intel.com>
---
 hw/acpi/nvdimm.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/hw/acpi/nvdimm.c b/hw/acpi/nvdimm.c
index 7cc419401b..2cd26bb9e9 100644
--- a/hw/acpi/nvdimm.c
+++ b/hw/acpi/nvdimm.c
@@ -1040,7 +1040,7 @@ static void nvdimm_build_common_dsm(Aml *dev,
 
     uuid_invalid = aml_lnot(aml_equal(uuid, expected_uuid));
 
-    unsupport = aml_if(aml_or(unpatched, uuid_invalid, NULL));
+    unsupport = aml_if(aml_lor(unpatched, uuid_invalid));
 
     /*
      * function 0 is called to inquire what functions are supported by
@@ -1072,10 +1072,9 @@ static void nvdimm_build_common_dsm(Aml *dev,
      * in the DSM Spec.
      */
     pckg = aml_arg(3);
-    ifctx = aml_if(aml_and(aml_equal(aml_object_type(pckg),
+    ifctx = aml_if(aml_land(aml_equal(aml_object_type(pckg),
                    aml_int(4 /* Package */)) /* It is a Package? */,
-                   aml_equal(aml_sizeof(pckg), aml_int(1)) /* 1 element? */,
-                   NULL));
+                   aml_equal(aml_sizeof(pckg), aml_int(1)) /* 1 element? */));
 
     pckg_index = aml_local(2);
     pckg_buf = aml_local(3);
-- 
2.31.1



  parent reply	other threads:[~2022-04-12  7:08 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-12  6:57 [RESEND][PATCH 0/2] acpi/nvdimm: support NVDIMM _LS{I,R,W} methods Robert Hoo
2022-04-12  6:57 ` [PATCH 1/2] acpi/nvdimm: Create _LS{I,R,W} method for NVDIMM device Robert Hoo
2022-04-27 14:34   ` Igor Mammedov
2022-04-29  9:01     ` Robert Hoo
2022-05-03  8:27       ` Igor Mammedov
2022-05-05  3:07         ` Robert Hoo
2022-05-05  8:50           ` Igor Mammedov
2022-05-05 13:26             ` Robert Hoo
2022-05-06  9:23               ` Igor Mammedov
2022-05-18  0:20                 ` Robert Hoo
2022-05-19 12:35                   ` Igor Mammedov
2022-04-12  6:57 ` Robert Hoo [this message]
2022-04-27  7:38   ` [PATCH 2/2] acpi/nvdimm: Fix aml_or() and aml_and() in if clause Igor Mammedov
2022-05-13 12:39   ` Michael S. Tsirkin
2022-04-20  5:18 ` [RESEND][PATCH 0/2] acpi/nvdimm: support NVDIMM _LS{I,R,W} methods Robert Hoo
2022-04-27 14:39 ` Igor Mammedov
2022-04-29  9:02   ` Robert Hoo

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=20220412065753.3216538-3-robert.hu@linux.intel.com \
    --to=robert.hu@linux.intel.com \
    --cc=ani@anisinha.ca \
    --cc=dan.j.williams@intel.com \
    --cc=imammedo@redhat.com \
    --cc=jingqi.liu@intel.com \
    --cc=mst@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=robert.hu@intel.com \
    --cc=xiaoguangrong.eric@gmail.com \
    /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).