[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] Re: [PATCH v3 2/7] wdt_ib700: Don't use SoftFloat int64 typ
From: |
Richard W.M. Jones |
Subject: |
[Qemu-devel] Re: [PATCH v3 2/7] wdt_ib700: Don't use SoftFloat int64 type |
Date: |
Sat, 18 Dec 2010 16:47:06 +0000 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Sat, Dec 18, 2010 at 05:25:26PM +0100, Andreas Färber wrote:
> softfloat.h's int64 type has least-width semantics,
> but this doesn't seem intended here, so use plain int64_t.
>
> v3:
> * Split off.
>
> Cc: Richard W.M. Jones <address@hidden>
> Signed-off-by: Andreas Färber <address@hidden>
> ---
> hw/wdt_ib700.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/hw/wdt_ib700.c b/hw/wdt_ib700.c
> index b6235eb..1248464 100644
> --- a/hw/wdt_ib700.c
> +++ b/hw/wdt_ib700.c
> @@ -53,7 +53,7 @@ static void ib700_write_enable_reg(void *vp, uint32_t addr,
> uint32_t data)
> 30, 28, 26, 24, 22, 20, 18, 16,
> 14, 12, 10, 8, 6, 4, 2, 0
> };
> - int64 timeout;
> + int64_t timeout;
>
> ib700_debug("addr = %x, data = %x\n", addr, data);
The use of int64(_t) was just so that the timeout calculation in the
next two lines would not overflow:
timeout = (int64_t) time_map[data & 0xF] * get_ticks_per_sec();
qemu_mod_timer(s->timer, qemu_get_clock (vm_clock) + timeout);
and from you say it does seem like it was a mistake to use int64
instead of int64_t.
ACK.
In more general terms, am I doing the timeout correctly in this code?
Rich.
--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
virt-top is 'top' for virtual machines. Tiny program with many
powerful monitoring features, net stats, disk stats, logging, etc.
http://et.redhat.com/~rjones/virt-top
- [Qemu-devel] [PATCH v3 2/7] wdt_ib700: Don't use SoftFloat int64 type, (continued)
- [Qemu-devel] [PATCH v3 2/7] wdt_ib700: Don't use SoftFloat int64 type, Andreas Färber, 2010/12/18
- [Qemu-devel] [PATCH v3 3/7] target-i386: Don't use SoftFloat uint64 type, Andreas Färber, 2010/12/18
- [Qemu-devel] [PATCH v3 4/7] softfloat: Resolve type mismatches between declaration and implementation, Andreas Färber, 2010/12/18
- [Qemu-devel] [PATCH v3 5/7] softfloat: Drop [s]bits{8, 16, 32, 64} types in favor of [u]int{8, 16, 32, 64}_t, Andreas Färber, 2010/12/18
- [Qemu-devel] [PATCH v3 6/7] softfloat: Drop [u]int16 types in favor of [u]int_fast16_t, Andreas Färber, 2010/12/18
- [Qemu-devel] [PATCH v3 7/7] softfloat: Make float{32, 64}_to_uint16_round_to_zero() use uint_fast16_t, Andreas Färber, 2010/12/18
- Re: [Qemu-devel] [PATCH v3 4/7] softfloat: Resolve type mismatches between declaration and implementation, Blue Swirl, 2010/12/19
- Re: [Qemu-devel] [PATCH v3 4/7] softfloat: Resolve type mismatches between declaration and implementation, Andreas Färber, 2010/12/19
- [Qemu-devel] Re: [PATCH v3 3/7] target-i386: Don't use SoftFloat uint64 type, Juan Quintela, 2010/12/18
- [Qemu-devel] Re: [PATCH v3 3/7] target-i386: Don't use SoftFloat uint64 type, Huang Ying, 2010/12/19
- [Qemu-devel] Re: [PATCH v3 2/7] wdt_ib700: Don't use SoftFloat int64 type,
Richard W.M. Jones <=
- Re: [Qemu-devel] Re: [PATCH v3 2/7] wdt_ib700: Don't use SoftFloat int64 type, Andreas Färber, 2010/12/19
- Re: [Qemu-devel] Re: [PATCH v3 2/7] wdt_ib700: Don't use SoftFloat int64 type, Richard W.M. Jones, 2010/12/19
- Re: [Qemu-devel] Re: [PATCH v3 2/7] wdt_ib700: Don't use SoftFloat int64 type, Andreas Färber, 2010/12/19
- Re: [Qemu-devel] Re: [PATCH v3 2/7] wdt_ib700: Don't use SoftFloat int64 type, Blue Swirl, 2010/12/19
- Re: [Qemu-devel] Re: [PATCH v3 2/7] wdt_ib700: Don't use SoftFloat int64 type, Andreas Färber, 2010/12/19
- Re: [Qemu-devel] Re: [PATCH v3 2/7] wdt_ib700: Don't use SoftFloat int64 type, Blue Swirl, 2010/12/19
- Re: [Qemu-devel] [PATCH v3 1/7] apic: Don't use SoftFloat uint32 type, Blue Swirl, 2010/12/19