On 03/14/2018 10:58 AM, Wei Liu wrote:
The variable named ramsize is always non-zero at that point because
there is a check for zero a few lines before.
The body of the loop has:
ramsize -= ...
We want to exit the loop either when we have no more banks left or we
fulfilled all the RAM requested.
Cheers,
Signed-off-by: Wei Liu <wei.l...@citrix.com>
---
tools/libxc/xc_dom_arm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/libxc/xc_dom_arm.c b/tools/libxc/xc_dom_arm.c
index 5b9eca6087..5acb32148e 100644
--- a/tools/libxc/xc_dom_arm.c
+++ b/tools/libxc/xc_dom_arm.c
@@ -425,7 +425,7 @@ static int meminit(struct xc_dom_image *dom)
if ( rc )
return rc;
- for ( i = 0; ramsize && i < GUEST_RAM_BANKS; i++ )
+ for ( i = 0; i < GUEST_RAM_BANKS; i++ )
{
uint64_t banksize = ramsize > bankmax[i] ? bankmax[i] : ramsize;
--
Julien Grall
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel