]> xenbits.xensource.com Git - libvirt.git/commitdiff
qemu_domain.c: remove unneeded size check in NVDIMM alignment
authorDaniel Henrique Barboza <danielhb413@gmail.com>
Wed, 25 Mar 2020 14:15:14 +0000 (11:15 -0300)
committerMichal Privoznik <mprivozn@redhat.com>
Fri, 27 Mar 2020 11:12:57 +0000 (12:12 +0100)
Commit 5540acb9a2b added a minimum size verification for the target
size of ppc64 NVDIMMs but forgot to remove a MAX() size check that
was being used in earlier reviews of that commit. The size
verification makes this check unneeded since we're making sure
that guestArea will always be at least equal to ppc64AlignSize.

Fixes: 5540acb9a2bd33fb97a7446a610b602c9e8629a3
Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
src/qemu/qemu_domain.c

index 7d29f3f114a05d109deb6f94713d0d29874fa987..adda17a49f7a18da1701cbfe0f9a6ffdbe8a7a6f 100644 (file)
@@ -12686,8 +12686,6 @@ qemuDomainNVDimmAlignSizePseries(virDomainDefPtr def,
     }
 
     guestArea = (guestArea/ppc64AlignSize) * ppc64AlignSize;
-    guestArea = MAX(guestArea, ppc64AlignSize);
-
     mem->size = guestArea + mem->labelsize;
 
     return 0;