From patchwork Fri Jan 22 15:17:33 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 8091011 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 55492BEEE5 for ; Fri, 22 Jan 2016 15:18:14 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 361CC203AA for ; Fri, 22 Jan 2016 15:18:13 +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 1438920384 for ; Fri, 22 Jan 2016 15:18:12 +0000 (UTC) Received: from localhost ([::1]:54316 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aMdTX-0002aJ-AX for patchwork-qemu-devel@patchwork.kernel.org; Fri, 22 Jan 2016 10:18:11 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43696) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aMdT8-0002Ud-Uu for qemu-devel@nongnu.org; Fri, 22 Jan 2016 10:17:48 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aMdT7-0008Mu-Fy for qemu-devel@nongnu.org; Fri, 22 Jan 2016 10:17:46 -0500 Received: from mnementh.archaic.org.uk ([2001:8b0:1d0::1]:59498) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aMdT7-0008Kk-7w for qemu-devel@nongnu.org; Fri, 22 Jan 2016 10:17:45 -0500 Received: from pm215 by mnementh.archaic.org.uk with local (Exim 4.80) (envelope-from ) id 1aMdSy-0003pa-RG 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:33 +0000 Message-Id: <1453475856-14682-5-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 4/7] fpu: Replace uint32 typedef with uint32_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 uint32 softfloat-specific typedef with uint32_t. This change was made with find include hw fpu target-* -name '*.[ch]' | xargs sed -i -e 's/\buint32\b/uint32_t/g' together with manual removal of the typedef definition, manual undoing of various mis-hits, and another couple of fixes found via test compilation. All the uses in hw/ were using the wrong type by mistake. 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-5-git-send-email-peter.maydell@linaro.org --- fpu/softfloat.c | 22 +++++++++++----------- hw/i386/pc.c | 2 +- hw/misc/imx25_ccm.c | 2 +- hw/misc/imx31_ccm.c | 2 +- hw/net/vmxnet3.c | 2 +- hw/ppc/spapr_events.c | 4 ++-- include/fpu/softfloat.h | 10 ++++------ include/hw/i386/pc.h | 2 +- tests/vhost-user-test.c | 2 +- 9 files changed, 23 insertions(+), 25 deletions(-) diff --git a/fpu/softfloat.c b/fpu/softfloat.c index af3f82e..4ee98c4 100644 --- a/fpu/softfloat.c +++ b/fpu/softfloat.c @@ -1296,7 +1296,7 @@ float32 int32_to_float32(int32_t a, float_status *status) float64 int32_to_float64(int32_t a, float_status *status) { flag zSign; - uint32 absA; + uint32_t absA; int8 shiftCount; uint64_t zSig; @@ -1319,7 +1319,7 @@ float64 int32_to_float64(int32_t a, float_status *status) floatx80 int32_to_floatx80(int32_t a, float_status *status) { flag zSign; - uint32 absA; + uint32_t absA; int8 shiftCount; uint64_t zSig; @@ -1341,7 +1341,7 @@ floatx80 int32_to_floatx80(int32_t a, float_status *status) float128 int32_to_float128(int32_t a, float_status *status) { flag zSign; - uint32 absA; + uint32_t absA; int8 shiftCount; uint64_t zSig0; @@ -7080,10 +7080,10 @@ float64 uint32_to_float64(uint32_t a, float_status *status) return int64_to_float64(a, status); } -uint32 float32_to_uint32(float32 a, float_status *status) +uint32_t float32_to_uint32(float32 a, float_status *status) { int64_t v; - uint32 res; + uint32_t res; int old_exc_flags = get_float_exception_flags(status); v = float32_to_int64(a, status); @@ -7099,10 +7099,10 @@ uint32 float32_to_uint32(float32 a, float_status *status) return res; } -uint32 float32_to_uint32_round_to_zero(float32 a, float_status *status) +uint32_t float32_to_uint32_round_to_zero(float32 a, float_status *status) { int64_t v; - uint32 res; + uint32_t res; int old_exc_flags = get_float_exception_flags(status); v = float32_to_int64_round_to_zero(a, status); @@ -7177,10 +7177,10 @@ uint_fast16_t float32_to_uint16_round_to_zero(float32 a, float_status *status) return res; } -uint32 float64_to_uint32(float64 a, float_status *status) +uint32_t float64_to_uint32(float64 a, float_status *status) { uint64_t v; - uint32 res; + uint32_t res; int old_exc_flags = get_float_exception_flags(status); v = float64_to_uint64(a, status); @@ -7194,10 +7194,10 @@ uint32 float64_to_uint32(float64 a, float_status *status) return res; } -uint32 float64_to_uint32_round_to_zero(float64 a, float_status *status) +uint32_t float64_to_uint32_round_to_zero(float64 a, float_status *status) { uint64_t v; - uint32 res; + uint32_t res; int old_exc_flags = get_float_exception_flags(status); v = float64_to_uint64_round_to_zero(a, status); diff --git a/hw/i386/pc.c b/hw/i386/pc.c index 293e22a..838636c 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -1454,7 +1454,7 @@ void pc_basic_device_init(ISABus *isa_bus, qemu_irq *gsi, ISADevice **rtc_state, bool create_fdctrl, bool no_vmport, - uint32 hpet_irqs) + uint32_t hpet_irqs) { int i; DriveInfo *fd[MAX_FD]; diff --git a/hw/misc/imx25_ccm.c b/hw/misc/imx25_ccm.c index 23759ca..90752fd 100644 --- a/hw/misc/imx25_ccm.c +++ b/hw/misc/imx25_ccm.c @@ -249,7 +249,7 @@ static void imx25_ccm_reset(DeviceState *dev) static uint64_t imx25_ccm_read(void *opaque, hwaddr offset, unsigned size) { - uint32 value = 0; + uint32_t value = 0; IMX25CCMState *s = (IMX25CCMState *)opaque; if (offset < 0x70) { diff --git a/hw/misc/imx31_ccm.c b/hw/misc/imx31_ccm.c index 47d6ead..c47b96f 100644 --- a/hw/misc/imx31_ccm.c +++ b/hw/misc/imx31_ccm.c @@ -261,7 +261,7 @@ static void imx31_ccm_reset(DeviceState *dev) static uint64_t imx31_ccm_read(void *opaque, hwaddr offset, unsigned size) { - uint32 value = 0; + uint32_t value = 0; IMX31CCMState *s = (IMX31CCMState *)opaque; if ((offset >> 2) < IMX31_CCM_MAX_REG) { diff --git a/hw/net/vmxnet3.c b/hw/net/vmxnet3.c index 67abad3..5147f05 100644 --- a/hw/net/vmxnet3.c +++ b/hw/net/vmxnet3.c @@ -522,7 +522,7 @@ vmxnet3_dec_rx_completion_counter(VMXNET3State *s, int qidx) vmxnet3_ring_dec(&s->rxq_descr[qidx].comp_ring); } -static void vmxnet3_complete_packet(VMXNET3State *s, int qidx, uint32 tx_ridx) +static void vmxnet3_complete_packet(VMXNET3State *s, int qidx, uint32_t tx_ridx) { struct Vmxnet3_TxCompDesc txcq_descr; diff --git a/hw/ppc/spapr_events.c b/hw/ppc/spapr_events.c index 744ea62..333e6ff 100644 --- a/hw/ppc/spapr_events.c +++ b/hw/ppc/spapr_events.c @@ -459,7 +459,7 @@ void spapr_hotplug_req_add_by_index(sPAPRDRConnector *drc) { sPAPRDRConnectorClass *drck = SPAPR_DR_CONNECTOR_GET_CLASS(drc); sPAPRDRConnectorType drc_type = drck->get_type(drc); - uint32 index = drck->get_index(drc); + uint32_t index = drck->get_index(drc); spapr_hotplug_req_event(RTAS_LOG_V6_HP_ID_DRC_INDEX, RTAS_LOG_V6_HP_ACTION_ADD, drc_type, index); @@ -469,7 +469,7 @@ void spapr_hotplug_req_remove_by_index(sPAPRDRConnector *drc) { sPAPRDRConnectorClass *drck = SPAPR_DR_CONNECTOR_GET_CLASS(drc); sPAPRDRConnectorType drc_type = drck->get_type(drc); - uint32 index = drck->get_index(drc); + uint32_t index = drck->get_index(drc); spapr_hotplug_req_event(RTAS_LOG_V6_HP_ID_DRC_INDEX, RTAS_LOG_V6_HP_ACTION_REMOVE, drc_type, index); diff --git a/include/fpu/softfloat.h b/include/fpu/softfloat.h index c61f836..bee849e 100644 --- a/include/fpu/softfloat.h +++ b/include/fpu/softfloat.h @@ -101,8 +101,6 @@ this code that are retained. typedef uint8_t flag; typedef uint8_t uint8; typedef int8_t int8; -typedef unsigned int uint32; -typedef signed int int32_t; #define LIT64( a ) a##LL @@ -376,8 +374,8 @@ int_fast16_t float32_to_int16_round_to_zero(float32, float_status *status); uint_fast16_t float32_to_uint16_round_to_zero(float32, float_status *status); int32_t float32_to_int32(float32, float_status *status); int32_t float32_to_int32_round_to_zero(float32, float_status *status); -uint32 float32_to_uint32(float32, float_status *status); -uint32 float32_to_uint32_round_to_zero(float32, float_status *status); +uint32_t float32_to_uint32(float32, float_status *status); +uint32_t float32_to_uint32_round_to_zero(float32, float_status *status); int64_t float32_to_int64(float32, float_status *status); uint64_t float32_to_uint64(float32, float_status *status); uint64_t float32_to_uint64_round_to_zero(float32, float_status *status); @@ -488,8 +486,8 @@ int_fast16_t float64_to_int16_round_to_zero(float64, float_status *status); uint_fast16_t float64_to_uint16_round_to_zero(float64, float_status *status); int32_t float64_to_int32(float64, float_status *status); int32_t float64_to_int32_round_to_zero(float64, float_status *status); -uint32 float64_to_uint32(float64, float_status *status); -uint32 float64_to_uint32_round_to_zero(float64, float_status *status); +uint32_t float64_to_uint32(float64, float_status *status); +uint32_t float64_to_uint32_round_to_zero(float64, float_status *status); int64_t float64_to_int64(float64, float_status *status); int64_t float64_to_int64_round_to_zero(float64, float_status *status); uint64_t float64_to_uint64(float64 a, float_status *status); diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h index 5bac03d..65e8f24 100644 --- a/include/hw/i386/pc.h +++ b/include/hw/i386/pc.h @@ -258,7 +258,7 @@ void pc_basic_device_init(ISABus *isa_bus, qemu_irq *gsi, ISADevice **rtc_state, bool create_fdctrl, bool no_vmport, - uint32 hpet_irqs); + uint32_t hpet_irqs); void pc_init_ne2k_isa(ISABus *bus, NICInfo *nd); void pc_cmos_init(PCMachineState *pcms, BusState *ide0, BusState *ide1, diff --git a/tests/vhost-user-test.c b/tests/vhost-user-test.c index 991fd85..95f35af 100644 --- a/tests/vhost-user-test.c +++ b/tests/vhost-user-test.c @@ -439,7 +439,7 @@ static void wait_for_log_fd(TestServer *s) g_mutex_unlock(&s->data_mutex); } -static void write_guest_mem(TestServer *s, uint32 seed) +static void write_guest_mem(TestServer *s, uint32_t seed) { uint32_t *guest_mem; int i, j;