From: Wei Yang Date: Wed, 27 Feb 2019 07:51:00 +0000 (+0800) Subject: nvdimm: use NVDIMM_ACPI_IO_LEN for the proper IO size X-Git-Tag: v4.0.0-rc0~23^2~8 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=1b8fff57584d04a94cc77b8d3f535d35f5827a5e;p=thirdparty%2Fqemu.git nvdimm: use NVDIMM_ACPI_IO_LEN for the proper IO size The IO range is defined to 4 bytes with NVDIMM_ACPI_IO_LEN, so it is more proper to use this macro instead of calculating it by sizeof. Signed-off-by: Wei Yang Message-Id: <20190227075101.6263-4-richardw.yang@linux.intel.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin Reviewed-by: Igor Mammedov --- diff --git a/hw/acpi/nvdimm.c b/hw/acpi/nvdimm.c index 3e73ed456f1..9fdad6dc3fb 100644 --- a/hw/acpi/nvdimm.c +++ b/hw/acpi/nvdimm.c @@ -992,7 +992,7 @@ static void nvdimm_build_common_dsm(Aml *dev) field = aml_field(NVDIMM_DSM_IOPORT, AML_DWORD_ACC, AML_NOLOCK, AML_PRESERVE); aml_append(field, aml_named_field(NVDIMM_DSM_NOTIFY, - sizeof(uint32_t) * BITS_PER_BYTE)); + NVDIMM_ACPI_IO_LEN * BITS_PER_BYTE)); aml_append(method, field); /*