From: Wei Yang <richardw.yang@linux.intel.com>
To: qemu-devel@nongnu.org
Cc: mst@redhat.com, imammedo@redhat.com,
xiaoguangrong.eric@gmail.com,
Wei Yang <richardw.yang@linux.intel.com>
Subject: [Qemu-devel] [PATCH 2/4] nvdimm: use *function* directly instead of allocating it again
Date: Wed, 27 Feb 2019 15:50:59 +0800 [thread overview]
Message-ID: <20190227075101.6263-3-richardw.yang@linux.intel.com> (raw)
In-Reply-To: <20190227075101.6263-1-richardw.yang@linux.intel.com>
At the beginning or nvdimm_build_common_dsm(), variable *function* is
already allocated for Arg2.
This patch reuse variable *function* instead of allocating it again.
Signed-off-by: Wei Yang <richardw.yang@linux.intel.com>
---
hw/acpi/nvdimm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/acpi/nvdimm.c b/hw/acpi/nvdimm.c
index 39af8cdba8..e63a1ef15d 100644
--- a/hw/acpi/nvdimm.c
+++ b/hw/acpi/nvdimm.c
@@ -1086,7 +1086,7 @@ static void nvdimm_build_common_dsm(Aml *dev)
*/
aml_append(method, aml_store(handle, aml_name(NVDIMM_DSM_HANDLE)));
aml_append(method, aml_store(aml_arg(1), aml_name(NVDIMM_DSM_REVISION)));
- aml_append(method, aml_store(aml_arg(2), aml_name(NVDIMM_DSM_FUNCTION)));
+ aml_append(method, aml_store(function, aml_name(NVDIMM_DSM_FUNCTION)));
/*
* The fourth parameter (Arg3) of _DSM is a package which contains
--
2.19.1
next prev parent reply other threads:[~2019-02-27 7:52 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-27 7:50 [Qemu-devel] [PATCH 0/4] nvdimm: clean up Wei Yang
2019-02-27 7:50 ` [Qemu-devel] [PATCH 1/4] nvdimm: fix typo in nvdimm_build_nvdimm_devices argument Wei Yang
2019-03-06 16:00 ` Igor Mammedov
2019-02-27 7:50 ` Wei Yang [this message]
2019-03-06 16:02 ` [Qemu-devel] [PATCH 2/4] nvdimm: use *function* directly instead of allocating it again Igor Mammedov
2019-02-27 7:51 ` [Qemu-devel] [PATCH 3/4] nvdimm: use NVDIMM_ACPI_IO_LEN for the proper IO size Wei Yang
2019-03-06 16:10 ` Igor Mammedov
2019-02-27 7:51 ` [Qemu-devel] [PATCH 4/4] nvdimm: build FIT in nvdimm_build_acpi Wei Yang
2019-03-06 16:14 ` Igor Mammedov
2019-03-07 3:41 ` Wei Yang
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=20190227075101.6263-3-richardw.yang@linux.intel.com \
--to=richardw.yang@linux.intel.com \
--cc=imammedo@redhat.com \
--cc=mst@redhat.com \
--cc=qemu-devel@nongnu.org \
--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 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.