From patchwork Fri Jul 6 10:37:07 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Shah X-Patchwork-Id: 169409 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 493B52C0084 for ; Fri, 6 Jul 2012 20:38:01 +1000 (EST) Received: from localhost ([::1]:42710 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sn5vD-0004Rk-3p for incoming@patchwork.ozlabs.org; Fri, 06 Jul 2012 06:37:59 -0400 Received: from eggs.gnu.org ([208.118.235.92]:51020) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sn5uf-0003Hf-ED for qemu-devel@nongnu.org; Fri, 06 Jul 2012 06:37:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Sn5uZ-00084u-4e for qemu-devel@nongnu.org; Fri, 06 Jul 2012 06:37:25 -0400 Received: from mx1.redhat.com ([209.132.183.28]:24831) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sn5uY-00084i-TG for qemu-devel@nongnu.org; Fri, 06 Jul 2012 06:37:19 -0400 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q66AbGRe006114 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 6 Jul 2012 06:37:17 -0400 Received: from localhost (dhcp193-15.pnq.redhat.com [10.65.193.15]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id q66AbFPE001393; Fri, 6 Jul 2012 06:37:16 -0400 From: Amit Shah To: qemu list Date: Fri, 6 Jul 2012 16:07:07 +0530 Message-Id: In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.67 on 10.5.11.11 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 Subject: [Qemu-devel] [PATCH 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 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;