From patchwork Mon Sep 24 18:35:14 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Shah X-Patchwork-Id: 186508 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 2988F2C008D for ; Tue, 25 Sep 2012 04:36:09 +1000 (EST) Received: from localhost ([::1]:53532 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TGDVn-0004sZ-8C for incoming@patchwork.ozlabs.org; Mon, 24 Sep 2012 14:36:07 -0400 Received: from eggs.gnu.org ([208.118.235.92]:34283) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TGDVJ-0003ny-HP for qemu-devel@nongnu.org; Mon, 24 Sep 2012 14:35:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TGDVE-0000Er-HX for qemu-devel@nongnu.org; Mon, 24 Sep 2012 14:35:37 -0400 Received: from mx1.redhat.com ([209.132.183.28]:4930) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TGDVE-0000Dv-A7 for qemu-devel@nongnu.org; Mon, 24 Sep 2012 14:35:32 -0400 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q8OIZUL5004047 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 24 Sep 2012 14:35:30 -0400 Received: from localhost (ovpn-113-155.phx2.redhat.com [10.3.113.155]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q8OIZRK7008064; Mon, 24 Sep 2012 14:35:28 -0400 From: Amit Shah To: qemu list Date: Tue, 25 Sep 2012 00:05:14 +0530 Message-Id: <62a944963063329ffcff01df8ac770f5874e0d1f.1348511596.git.amit.shah@redhat.com> In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.68 on 10.5.11.25 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.132.183.28 Cc: Amit Shah , Anthony Liguori , "Michael S. Tsirkin" Subject: [Qemu-devel] [PATCH RESEND 1/3] virtio: use unsigned int for counting bytes in vq X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org The virtqueue_avail_bytes() function counts bytes in an int. Use an unsigned int instead. Signed-off-by: Amit Shah --- hw/virtio.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/hw/virtio.c b/hw/virtio.c index 209c763..4c9e20a3 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;