From: Xiao Guangrong Date: Mon, 7 Nov 2016 11:13:43 +0000 (+0800) Subject: nvdimm acpi: cleanup nvdimm_build_fit X-Git-Tag: TizenStudio_2.0_p2.3.2~9^2~14^2~5^2~41^2~17 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=880f36125371a969905a3be83a9099ca451b5c12;p=sdk%2Femulator%2Fqemu.git nvdimm acpi: cleanup nvdimm_build_fit inline buf_size to refine the code a bit Suggested-by: Igor Mammedov Signed-off-by: Xiao Guangrong Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin Reviewed-by: Stefan Hajnoczi Reviewed-by: Igor Mammedov --- diff --git a/hw/acpi/nvdimm.c b/hw/acpi/nvdimm.c index f2c0659..148999e 100644 --- a/hw/acpi/nvdimm.c +++ b/hw/acpi/nvdimm.c @@ -1134,11 +1134,9 @@ static void nvdimm_build_fit(Aml *dev) aml_append(ifctx, aml_return(aml_buffer(0, NULL))); aml_append(method, ifctx); - aml_append(method, aml_store(aml_shiftleft(buf_size, aml_int(3)), - buf_size)); aml_append(method, aml_create_field(buf, aml_int(4 * BITS_PER_BYTE), /* offset at byte 4.*/ - buf_size, "BUFF")); + aml_shiftleft(buf_size, aml_int(3)), "BUFF")); aml_append(method, aml_return(aml_name("BUFF"))); aml_append(dev, method);