From: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
To: kvm@vger.kernel.org, qemu-devel@nongnu.org
Cc: Cam Macdonell <cam@cs.ualberta.ca>,
"Hao, Xudong" <xudong.hao@intel.com>,
Jes.Sorensen@redhat.com
Subject: Re: [PATCH] ivshmem: remove unnecessary checks for unsigned
Date: Fri, 03 Sep 2010 11:54:27 +0900 [thread overview]
Message-ID: <4C806363.3080109@jp.fujitsu.com> (raw)
In-Reply-To: <4C80555B.102@jp.fujitsu.com>
(2010/09/03 10:54), Hidetoshi Seto wrote:
> fixes gcc 4.1 warning:
> In function 'ivshmem_io_writel':
> 202: warning: comparison is always false due to limited range of data type
> 208: warning: comparison is always true due to limited range of data type
>
> Signed-off-by: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
> ---
> hw/ivshmem.c | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/hw/ivshmem.c b/hw/ivshmem.c
> index bbb5cba..afebbc3 100644
> --- a/hw/ivshmem.c
> +++ b/hw/ivshmem.c
> @@ -199,13 +199,13 @@ static void ivshmem_io_writel(void *opaque, target_phys_addr_t addr,
>
> case DOORBELL:
> /* check that dest VM ID is reasonable */
> - if ((dest < 0) || (dest > s->max_peer)) {
> + if (dest > s->max_peer) {
> IVSHMEM_DPRINTF("Invalid destination VM ID (%d)\n", dest);
> break;
> }
>
> /* check doorbell range */
> - if ((vector >= 0) && (vector < s->peers[dest].nb_eventfds)) {
> + if (vector < s->peers[dest].nb_eventfds) {
> IVSHMEM_DPRINTF("Writing %" PRId64 " to VM %d on vector %d\n",
> write_one, dest, vector);
> if (write(s->peers[dest].eventfds[vector],
Oops, since I've registered qemu-kvm ML but not qemu-devel ML, I could not
noticed that Jes have already posted same patch to qemu-devel.
Now build of ivshmem is enabled only on KVM systems, please apply this patch
to qemu-kvm.git asap.
Thanks,
H.Seto
WARNING: multiple messages have this Message-ID (diff)
From: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
To: kvm@vger.kernel.org, qemu-devel@nongnu.org
Cc: Jes.Sorensen@redhat.com, Cam Macdonell <cam@cs.ualberta.ca>,
"Hao, Xudong" <xudong.hao@intel.com>
Subject: [Qemu-devel] Re: [PATCH] ivshmem: remove unnecessary checks for unsigned
Date: Fri, 03 Sep 2010 11:54:27 +0900 [thread overview]
Message-ID: <4C806363.3080109@jp.fujitsu.com> (raw)
In-Reply-To: <4C80555B.102@jp.fujitsu.com>
(2010/09/03 10:54), Hidetoshi Seto wrote:
> fixes gcc 4.1 warning:
> In function 'ivshmem_io_writel':
> 202: warning: comparison is always false due to limited range of data type
> 208: warning: comparison is always true due to limited range of data type
>
> Signed-off-by: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
> ---
> hw/ivshmem.c | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/hw/ivshmem.c b/hw/ivshmem.c
> index bbb5cba..afebbc3 100644
> --- a/hw/ivshmem.c
> +++ b/hw/ivshmem.c
> @@ -199,13 +199,13 @@ static void ivshmem_io_writel(void *opaque, target_phys_addr_t addr,
>
> case DOORBELL:
> /* check that dest VM ID is reasonable */
> - if ((dest < 0) || (dest > s->max_peer)) {
> + if (dest > s->max_peer) {
> IVSHMEM_DPRINTF("Invalid destination VM ID (%d)\n", dest);
> break;
> }
>
> /* check doorbell range */
> - if ((vector >= 0) && (vector < s->peers[dest].nb_eventfds)) {
> + if (vector < s->peers[dest].nb_eventfds) {
> IVSHMEM_DPRINTF("Writing %" PRId64 " to VM %d on vector %d\n",
> write_one, dest, vector);
> if (write(s->peers[dest].eventfds[vector],
Oops, since I've registered qemu-kvm ML but not qemu-devel ML, I could not
noticed that Jes have already posted same patch to qemu-devel.
Now build of ivshmem is enabled only on KVM systems, please apply this patch
to qemu-kvm.git asap.
Thanks,
H.Seto
next prev parent reply other threads:[~2010-09-03 2:54 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-03 1:54 [PATCH] ivshmem: remove unnecessary checks for unsigned Hidetoshi Seto
2010-09-03 1:54 ` [Qemu-devel] " Hidetoshi Seto
2010-09-03 2:54 ` Hidetoshi Seto [this message]
2010-09-03 2:54 ` [Qemu-devel] " Hidetoshi Seto
2010-09-05 8:21 ` Avi Kivity
2010-09-05 8:21 ` [Qemu-devel] " Avi Kivity
2010-09-06 1:59 ` Hao, Xudong
2010-09-06 1:59 ` [Qemu-devel] " Hao, Xudong
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=4C806363.3080109@jp.fujitsu.com \
--to=seto.hidetoshi@jp.fujitsu.com \
--cc=Jes.Sorensen@redhat.com \
--cc=cam@cs.ualberta.ca \
--cc=kvm@vger.kernel.org \
--cc=qemu-devel@nongnu.org \
--cc=xudong.hao@intel.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.