From: Julien Grall <julien.grall@arm.com>
To: Wei Liu <wei.liu2@citrix.com>,
Xen-devel <xen-devel@lists.xenproject.org>
Cc: Stefano Stabellini <sstabellini@kernel.org>
Subject: Re: [PATCH] libxc/arm: remove useless conditional in meminit
Date: Wed, 14 Mar 2018 11:01:45 +0000 [thread overview]
Message-ID: <a56e67f3-428e-ffce-293b-92575584997c@arm.com> (raw)
In-Reply-To: <20180314105811.23809-1-wei.liu2@citrix.com>
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.liu2@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
next prev parent reply other threads:[~2018-03-14 11:01 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-14 10:58 [PATCH] libxc/arm: remove useless conditional in meminit Wei Liu
2018-03-14 11:01 ` George Dunlap
2018-03-14 11:01 ` Julien Grall [this message]
2018-03-14 11:03 ` Wei Liu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=a56e67f3-428e-ffce-293b-92575584997c@arm.com \
--to=julien.grall@arm.com \
--cc=sstabellini@kernel.org \
--cc=wei.liu2@citrix.com \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.