From patchwork Tue Mar 1 15:57:37 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Galvan X-Patchwork-Id: 8466531 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 787CAC0553 for ; Tue, 1 Mar 2016 16:05:33 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C981320120 for ; Tue, 1 Mar 2016 16:05:31 +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 C37E8200F0 for ; Tue, 1 Mar 2016 16:05:30 +0000 (UTC) Received: from localhost ([::1]:50617 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aamni-0002qo-5T for patchwork-qemu-devel@patchwork.kernel.org; Tue, 01 Mar 2016 11:05:30 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42722) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aamgh-0007Jy-Ad for qemu-devel@nongnu.org; Tue, 01 Mar 2016 10:58:16 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aamgg-0006Q5-D6 for qemu-devel@nongnu.org; Tue, 01 Mar 2016 10:58:15 -0500 Received: from mail-qg0-x22b.google.com ([2607:f8b0:400d:c04::22b]:35973) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aamgg-0006Pr-9y for qemu-devel@nongnu.org; Tue, 01 Mar 2016 10:58:14 -0500 Received: by mail-qg0-x22b.google.com with SMTP id u110so15946615qge.3 for ; Tue, 01 Mar 2016 07:58:14 -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=6TGzMcyJRx09I6u4MtcZdy2CypEO/9qmoESxilhKrwA=; b=MHuyFH2OD10z2+GH+nmwfRT9mnjVlD9S9LupJVM3BMBc3Nnkv7qANVF57bUlVtDkFZ jvFt7doB/Mwjt0XGuPFApJEaUeJHPlVw2UuyNwSEURpyRqKpXippi8ME2Ux32X2SfhB6 4eF2e1w81XU+Y4fhweWltQPHtnr3kHOG6hf58= 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=6TGzMcyJRx09I6u4MtcZdy2CypEO/9qmoESxilhKrwA=; b=PVM3OPDR0oRv3spnHFg1T6CP+QvajKdPbR7SAYzT7ayu3Ye1bcGMClysUa0acHGi8z Pa3PUE3u3Ekn1ZwMaCgncTvvfcqAVrHI2TgCcnJQ/8hGdOhvKVSrUhVydkvenB3np+NT yMxtrtHPIu3hWyQlaRI2ewkqkDi4qka0ZeyZ+tFWEC7zYT7biy9SxtyE9ABsQcRYvpG7 Dm24pCB3GNkqdErQWy3mPiU+mf7d4tj6K/5mBj/+ZBBc9XOOGlDlMN5+2abrWkh0nDis HZuWRbfs8FNOJWht75v+YD4kd53uO7nZnwtkZjnkSuzOuDgyIxaeU/PdTgmeen74/TqL PAnQ== X-Gm-Message-State: AD7BkJJx3nmUr7wX0GX2e92J6ckaxVuAxxp8WgJ7xStAv1LJaUj9Ys2I5dawzN31zMIOP1HP X-Received: by 10.140.226.197 with SMTP id w188mr29290179qhb.4.1456847893934; Tue, 01 Mar 2016 07:58:13 -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.58.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 01 Mar 2016 07:58:13 -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:37 -0300 Message-Id: <1456847859-4771-11-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::22b Subject: [Qemu-devel] [PATCH v2 11/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/net/vmware_utils.h | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) --- 2.7.1 diff --git a/hw/net/vmware_utils.h b/hw/net/vmware_utils.h index c0dbb2f..6887178 100644 --- a/hw/net/vmware_utils.h +++ b/hw/net/vmware_utils.h @@ -26,33 +26,34 @@ * */ static inline void -vmw_shmem_read(hwaddr addr, void *buf, int len) +vmw_shmem_read(hwaddr addr, void *buf, size_t len) { - VMW_SHPRN("SHMEM r: %" PRIx64 ", len: %d to %p", addr, len, buf); + VMW_SHPRN("SHMEM r: %" PRIx64 ", len: %zu to %p", addr, len, buf); cpu_physical_memory_read(addr, buf, len); } static inline void -vmw_shmem_write(hwaddr addr, void *buf, int len) +vmw_shmem_write(hwaddr addr, void *buf, size_t len) { - VMW_SHPRN("SHMEM w: %" PRIx64 ", len: %d to %p", addr, len, buf); + VMW_SHPRN("SHMEM w: %" PRIx64 ", len: %zu to %p", addr, len, buf); cpu_physical_memory_write(addr, buf, len); } static inline void -vmw_shmem_rw(hwaddr addr, void *buf, int len, int is_write) +vmw_shmem_rw(hwaddr addr, void *buf, size_t len, int is_write) { - VMW_SHPRN("SHMEM r/w: %" PRIx64 ", len: %d (to %p), is write: %d", + VMW_SHPRN("SHMEM r/w: %" PRIx64 ", len: %zu (to %p), is write: %d", addr, len, buf, is_write); cpu_physical_memory_rw(addr, buf, len, is_write); } static inline void -vmw_shmem_set(hwaddr addr, uint8_t val, int len) +vmw_shmem_set(hwaddr addr, uint8_t val, size_t len) { int i; - VMW_SHPRN("SHMEM set: %" PRIx64 ", len: %d (value 0x%X)", addr, len, val); + VMW_SHPRN("SHMEM set: %" PRIx64 ", len: %zu (value 0x%X)", addr, + len, val); for (i = 0; i < len; i++) { cpu_physical_memory_write(addr + i, &val, 1);