From patchwork Tue Mar 1 15:57:32 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Galvan X-Patchwork-Id: 8466461 Return-Path: X-Original-To: patchwork-qemu-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 71C2EC0553 for ; Tue, 1 Mar 2016 16:01:56 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D338520120 for ; Tue, 1 Mar 2016 16:01:55 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1B0A12010B for ; Tue, 1 Mar 2016 16:01:55 +0000 (UTC) Received: from localhost ([::1]:50573 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aamkE-0005N0-H9 for patchwork-qemu-devel@patchwork.kernel.org; Tue, 01 Mar 2016 11:01:54 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42561) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aamgT-0006qk-Cy for qemu-devel@nongnu.org; Tue, 01 Mar 2016 10:58:02 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aamgS-0006Lr-2o for qemu-devel@nongnu.org; Tue, 01 Mar 2016 10:58:01 -0500 Received: from mail-qg0-x234.google.com ([2607:f8b0:400d:c04::234]:35881) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aamgR-0006KJ-Vt for qemu-devel@nongnu.org; Tue, 01 Mar 2016 10:58:00 -0500 Received: by mail-qg0-x234.google.com with SMTP id u110so15940466qge.3 for ; Tue, 01 Mar 2016 07:57:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tallertechnologies.com; s=google; h=from:to:subject:date:message-id:in-reply-to:references; bh=dqcQq3KO60PHHV7sUXWyZUovMnUtkHdnnTzFMs1lv6A=; b=5pOwNMFtPGn/tLUuQyzs+2Y8plbZDMki3F5NtfpRE4l0LKQSuw3kM7J3rBCXdIjDFo 8ccIzRc2LOK36tFdoYWCJ/QawFaUUzKBYswyAlrSRBJsRDPNaYBGzaeN8KXUcSKKI16a rRVyHib7OC89ERRqeSKvE/DzXZ3EbDHtPndb8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=dqcQq3KO60PHHV7sUXWyZUovMnUtkHdnnTzFMs1lv6A=; b=YbjaNNqHlovpP8QLSgeUko3NZF2Lp0tBds/+o+ep9yuqW6F4xLkgpVJnLNvDiUASfH qO7W+au77/JYOJi8Q6uD3U/RRvrTO0Sq2XYxlzClBIyEx2qrXbgDp57u+UNCsjKoPzoh xhxNJx/lbRm5+VKLAcphxtzMFvuqofNvdFWEKZ7+kdfUh5X9QSbeLFQH5PY+TFyqc6T4 RRcL8tETDkTYfNPpmVIH3gars0p5nB7HLoiJU79LNrClFs+3m3eRMGk64MVn0s9+j902 3qz+H3jB/jTmCbQL7g72/fClnVY7XIQ22ne+0VZjbfowVjlLgcHtiRgpBmwjIKilZY/b Zqww== X-Gm-Message-State: AD7BkJLwwz77mE54UT3SvHYZmhZArhoHDZKNlkbM07j62fsknqJw4L5/yJeFpKJHd1j8B+iv X-Received: by 10.140.83.212 with SMTP id j78mr27702750qgd.83.1456847879603; Tue, 01 Mar 2016 07:57:59 -0800 (PST) Received: from martin-galvan.dominio.tallertechnologies.com ([200.69.202.173]) by smtp.gmail.com with ESMTPSA id 123sm13109030qhu.22.2016.03.01.07.57.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 01 Mar 2016 07:57:59 -0800 (PST) From: Martin Galvan To: qemu-devel@nongnu.org, peter.maydell@linaro.org, pbonzini@redhat.com, edgar.iglesias@gmail.com, rth@twiddle.net, aurelien@aurel32.net, kraxel@redhat.com, blauwirbel@gmail.com, lcapitulino@redhat.com, armbru@redhat.com, afaerber@suse.de, dmitry@daynix.com Date: Tue, 1 Mar 2016 12:57:32 -0300 Message-Id: <1456847859-4771-6-git-send-email-martin.galvan@tallertechnologies.com> X-Mailer: git-send-email 2.7.1 In-Reply-To: <1456847859-4771-1-git-send-email-martin.galvan@tallertechnologies.com> References: <1456847650-4476-1-git-send-email-martin.galvan@tallertechnologies.com> <1456847859-4771-1-git-send-email-martin.galvan@tallertechnologies.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2607:f8b0:400d:c04::234 Subject: [Qemu-devel] [PATCH v2 06/13] Use unsigned types for the 'len' argument of all memory read/write functions 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+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP --- hw/audio/marvell_88w8618.c | 2 +- hw/audio/milkymist-ac97.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) --- 2.7.1 diff --git a/hw/audio/marvell_88w8618.c b/hw/audio/marvell_88w8618.c index a6ca180..c4edf99 100644 --- a/hw/audio/marvell_88w8618.c +++ b/hw/audio/marvell_88w8618.c @@ -64,7 +64,7 @@ static void mv88w8618_audio_callback(void *opaque, int free_out, int free_in) int16_t *codec_buffer; int8_t buf[4096]; int8_t *mem_buffer; - int pos, block_size; + size_t pos, block_size; if (!(s->playback_mode & MP_AUDIO_PLAYBACK_EN)) { return; diff --git a/hw/audio/milkymist-ac97.c b/hw/audio/milkymist-ac97.c index 6a3b536..67639c6 100644 --- a/hw/audio/milkymist-ac97.c +++ b/hw/audio/milkymist-ac97.c @@ -195,7 +195,7 @@ static void ac97_in_cb(void *opaque, int avail_b) } while (temp) { - int acquired, to_copy; + size_t acquired, to_copy; to_copy = audio_MIN(temp, sizeof(buf)); acquired = AUD_read(s->voice_in, buf, to_copy); @@ -238,7 +238,7 @@ static void ac97_out_cb(void *opaque, int free_b) } while (temp) { - int copied, to_copy; + size_t copied, to_copy; to_copy = audio_MIN(temp, sizeof(buf)); cpu_physical_memory_read(addr, buf, to_copy);