From: Tiejun Chen <tiejun.chen@intel.com>
To: pbonzini@redhat.com
Cc: kvm@vger.kernel.org
Subject: [PATCH] kvm: coalesced_mmio: remove one redundant check inside of coalesced_mmio_in_range()
Date: Thu, 11 Dec 2014 11:02:41 +0800 [thread overview]
Message-ID: <1418266961-27277-1-git-send-email-tiejun.chen@intel.com> (raw)
We already check 'len' above to make sure it already isn't
negative here, so indeed, (addr + len < addr) should never be happened.
Signed-off-by: Tiejun Chen <tiejun.chen@intel.com>
---
virt/kvm/coalesced_mmio.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/virt/kvm/coalesced_mmio.c b/virt/kvm/coalesced_mmio.c
index 00d8642..60f59cd 100644
--- a/virt/kvm/coalesced_mmio.c
+++ b/virt/kvm/coalesced_mmio.c
@@ -30,8 +30,6 @@ static int coalesced_mmio_in_range(struct kvm_coalesced_mmio_dev *dev,
*/
if (len < 0)
return 0;
- if (addr + len < addr)
- return 0;
if (addr < dev->zone.addr)
return 0;
if (addr + len > dev->zone.addr + dev->zone.size)
--
1.9.1
next reply other threads:[~2014-12-11 3:04 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-11 3:02 Tiejun Chen [this message]
2014-12-11 11:29 ` [PATCH] kvm: coalesced_mmio: remove one redundant check inside of coalesced_mmio_in_range() Paolo Bonzini
2014-12-12 1:02 ` Chen, Tiejun
2014-12-12 1:24 ` Chen, Tiejun
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=1418266961-27277-1-git-send-email-tiejun.chen@intel.com \
--to=tiejun.chen@intel.com \
--cc=kvm@vger.kernel.org \
--cc=pbonzini@redhat.com \
/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.