All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wei Liu <wei.liu2@citrix.com>
To: Xen-devel <xen-devel@lists.xenproject.org>
Cc: Julien Grall <julien.grall@arm.com>,
	Stefano Stabellini <sstabellini@kernel.org>,
	Wei Liu <wei.liu2@citrix.com>
Subject: [PATCH] libxc/arm: remove useless conditional in meminit
Date: Wed, 14 Mar 2018 10:58:11 +0000	[thread overview]
Message-ID: <20180314105811.23809-1-wei.liu2@citrix.com> (raw)

The variable named ramsize is always non-zero at that point because
there is a check for zero a few lines before.

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;
 
-- 
2.11.0


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

             reply	other threads:[~2018-03-14 10:58 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-14 10:58 Wei Liu [this message]
2018-03-14 11:01 ` [PATCH] libxc/arm: remove useless conditional in meminit George Dunlap
2018-03-14 11:01 ` Julien Grall
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=20180314105811.23809-1-wei.liu2@citrix.com \
    --to=wei.liu2@citrix.com \
    --cc=julien.grall@arm.com \
    --cc=sstabellini@kernel.org \
    --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.