aboutsummaryrefslogtreecommitdiff
path: root/hw/acpi
diff options
context:
space:
mode:
authorWei Yang <richardw.yang@linux.intel.com>2019-02-27 15:50:59 +0800
committerMichael S. Tsirkin <mst@redhat.com>2019-03-12 22:31:21 -0400
commitac265cacdd117ae965515df41bb4452478d22179 (patch)
treec7b25c14ef85060c0951f93f7fcf289f63fe9fc8 /hw/acpi
parentb096c11458e58ddcebf8e6ae239a3c608de1ef78 (diff)
downloadqemu-ac265cacdd117ae965515df41bb4452478d22179.zip
qemu-ac265cacdd117ae965515df41bb4452478d22179.tar.gz
qemu-ac265cacdd117ae965515df41bb4452478d22179.tar.bz2
nvdimm: use *function* directly instead of allocating it again
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> Message-Id: <20190227075101.6263-3-richardw.yang@linux.intel.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Diffstat (limited to 'hw/acpi')
-rw-r--r--hw/acpi/nvdimm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/acpi/nvdimm.c b/hw/acpi/nvdimm.c
index 280bfb9..3e73ed4 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