qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Amit Shah <amit.shah@redhat.com>
To: qemu list <qemu-devel@nongnu.org>
Cc: Amit Shah <amit.shah@redhat.com>,
	Anthony Liguori <anthony@codemonkey.ws>
Subject: [Qemu-devel] [PATCH 1/3] virtio: use unsigned int for counting bytes in vq
Date: Fri,  6 Jul 2012 16:07:07 +0530	[thread overview]
Message-ID: <fed53883b0d62a999d0cd48f6094f528be5ba89d.1341569262.git.amit.shah@redhat.com> (raw)
In-Reply-To: <cover.1341569262.git.amit.shah@redhat.com>
In-Reply-To: <cover.1341569262.git.amit.shah@redhat.com>

The virtqueue_avail_bytes() function counts bytes in an int.  Use an
unsigned int instead.

Signed-off-by: Amit Shah <amit.shah@redhat.com>
---
 hw/virtio.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/hw/virtio.c b/hw/virtio.c
index 168abe4..b21dcac 100644
--- a/hw/virtio.c
+++ b/hw/virtio.c
@@ -338,7 +338,7 @@ static unsigned virtqueue_next_desc(target_phys_addr_t desc_pa,
 int virtqueue_avail_bytes(VirtQueue *vq, int in_bytes, int out_bytes)
 {
     unsigned int idx;
-    int total_bufs, in_total, out_total;
+    unsigned int total_bufs, in_total, out_total;
 
     idx = vq->last_avail_idx;
 
-- 
1.7.7.6

  reply	other threads:[~2012-07-06 10:37 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-06 10:37 [Qemu-devel] [PATCH 0/3] Introduce virtqueue_get_avail_bytes() Amit Shah
2012-07-06 10:37 ` Amit Shah [this message]
2012-07-06 10:37 ` [Qemu-devel] [PATCH 2/3] virtio: " Amit Shah
2012-07-06 10:37 ` [Qemu-devel] [PATCH 3/3] virtio-serial-bus: let chardev know the exact number of bytes requested Amit Shah
2012-07-16 12:58 ` [Qemu-devel] [PATCH 0/3] Introduce virtqueue_get_avail_bytes() Amit Shah
2012-07-26 14:27 ` Amit Shah

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=fed53883b0d62a999d0cd48f6094f528be5ba89d.1341569262.git.amit.shah@redhat.com \
    --to=amit.shah@redhat.com \
    --cc=anthony@codemonkey.ws \
    --cc=qemu-devel@nongnu.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).