From patchwork Fri Jan 22 15:17:35 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 8091031 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 4F787BEEE5 for ; Fri, 22 Jan 2016 15:20:00 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9ACC720384 for ; Fri, 22 Jan 2016 15:19:59 +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 3DE25203AA for ; Fri, 22 Jan 2016 15:19:57 +0000 (UTC) Received: from localhost ([::1]:54331 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aMdVE-00069P-Gv for patchwork-qemu-devel@patchwork.kernel.org; Fri, 22 Jan 2016 10:19:56 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43663) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aMdT7-0002SI-IM for qemu-devel@nongnu.org; Fri, 22 Jan 2016 10:17:46 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aMdT6-0008MV-HH for qemu-devel@nongnu.org; Fri, 22 Jan 2016 10:17:45 -0500 Received: from mnementh.archaic.org.uk ([2001:8b0:1d0::1]:59498) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aMdT6-0008Kk-Ae for qemu-devel@nongnu.org; Fri, 22 Jan 2016 10:17:44 -0500 Received: from pm215 by mnementh.archaic.org.uk with local (Exim 4.80) (envelope-from ) id 1aMdSy-0003pk-Un for qemu-devel@nongnu.org; Fri, 22 Jan 2016 15:17:36 +0000 From: Peter Maydell To: qemu-devel@nongnu.org Date: Fri, 22 Jan 2016 15:17:35 +0000 Message-Id: <1453475856-14682-7-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1453475856-14682-1-git-send-email-peter.maydell@linaro.org> References: <1453475856-14682-1-git-send-email-peter.maydell@linaro.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 2001:8b0:1d0::1 Subject: [Qemu-devel] [PULL 6/7] fpu: Replace uint8 typedef with uint8_t 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.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, UNPARSEABLE_RELAY autolearn=unavailable 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 Replace the uint8 softfloat-specific typedef with uint8_t. This change was made with find include hw fpu target-* -name '*.[ch]' | xargs sed -i -e 's/\buint8\b/uint8_t/g' together with manual removal of the typedef definition and manual fixing of more erroneous uses found via test compilation. It turns out that the only code using this type is an accidental use where uint8_t was intended anyway... Signed-off-by: Peter Maydell Reviewed-by: Richard Henderson Reviewed-by: Aurelien Jarno Acked-by: Leon Alrae Acked-by: James Hogan Message-id: 1452603315-27030-7-git-send-email-peter.maydell@linaro.org --- crypto/secret.c | 2 +- hw/net/vmware_utils.h | 2 +- include/fpu/softfloat.h | 13 ++++--------- migration/ram.c | 2 +- 4 files changed, 7 insertions(+), 12 deletions(-) diff --git a/crypto/secret.c b/crypto/secret.c index 9a9257a..a799da1 100644 --- a/crypto/secret.c +++ b/crypto/secret.c @@ -434,7 +434,7 @@ int qcrypto_secret_lookup(const char *secretid, return -1; } - *data = g_new0(uint8, secret->rawlen + 1); + *data = g_new0(uint8_t, secret->rawlen + 1); memcpy(*data, secret->rawdata, secret->rawlen); (*data)[secret->rawlen] = '\0'; *datalen = secret->rawlen; diff --git a/hw/net/vmware_utils.h b/hw/net/vmware_utils.h index c2c2f90..c0dbb2f 100644 --- a/hw/net/vmware_utils.h +++ b/hw/net/vmware_utils.h @@ -49,7 +49,7 @@ vmw_shmem_rw(hwaddr addr, void *buf, int len, int is_write) } static inline void -vmw_shmem_set(hwaddr addr, uint8 val, int len) +vmw_shmem_set(hwaddr addr, uint8_t val, int len) { int i; VMW_SHPRN("SHMEM set: %" PRIx64 ", len: %d (value 0x%X)", addr, len, val); diff --git a/include/fpu/softfloat.h b/include/fpu/softfloat.h index a6842ad..575a739 100644 --- a/include/fpu/softfloat.h +++ b/include/fpu/softfloat.h @@ -90,16 +90,11 @@ this code that are retained. #include "config-host.h" #include "qemu/osdep.h" -/*---------------------------------------------------------------------------- -| Each of the following `typedef's defines the most convenient type that holds -| integers of at least as many bits as specified. For example, `uint8' should -| be the most convenient type that can hold unsigned integers of as many as -| 8 bits. The `flag' type must be able to hold either a 0 or 1. For most -| implementations of C, `flag', `uint8', and `int8' should all be `typedef'ed -| to the same as `int'. -*----------------------------------------------------------------------------*/ +/* This 'flag' type must be able to hold at least 0 and 1. It should + * probably be replaced with 'bool' but the uses would need to be audited + * to check that they weren't accidentally relying on it being a larger type. + */ typedef uint8_t flag; -typedef uint8_t uint8; #define LIT64( a ) a##LL diff --git a/migration/ram.c b/migration/ram.c index 4e606ab..e49749d 100644 --- a/migration/ram.c +++ b/migration/ram.c @@ -265,7 +265,7 @@ struct DecompressParam { QemuMutex mutex; QemuCond cond; void *des; - uint8 *compbuf; + uint8_t *compbuf; int len; }; typedef struct DecompressParam DecompressParam;