From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=55464 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PTzwI-0006PC-Cg for qemu-devel@nongnu.org; Sat, 18 Dec 2010 11:47:25 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PTzw6-000095-Fq for qemu-devel@nongnu.org; Sat, 18 Dec 2010 11:47:11 -0500 Received: from mx1.redhat.com ([209.132.183.28]:40107) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PTzw6-00008V-78 for qemu-devel@nongnu.org; Sat, 18 Dec 2010 11:47:10 -0500 Date: Sat, 18 Dec 2010 16:47:06 +0000 From: "Richard W.M. Jones" Message-ID: <20101218164706.GN2601@amd.home.annexia.org> References: <1292625556-24825-1-git-send-email-andreas.faerber@web.de> <1292689531-18763-1-git-send-email-andreas.faerber@web.de> <1292689531-18763-2-git-send-email-andreas.faerber@web.de> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: <1292689531-18763-2-git-send-email-andreas.faerber@web.de> Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] Re: [PATCH v3 2/7] wdt_ib700: Don't use SoftFloat int64 type List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Andreas =?iso-8859-1?Q?F=E4rber?= Cc: qemu-devel@nongnu.org On Sat, Dec 18, 2010 at 05:25:26PM +0100, Andreas F=E4rber wrote: > softfloat.h's int64 type has least-width semantics, > but this doesn't seem intended here, so use plain int64_t. >=20 > v3: > * Split off. >=20 > Cc: Richard W.M. Jones > Signed-off-by: Andreas F=E4rber > --- > hw/wdt_ib700.c | 2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) >=20 > 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; > =20 > ib700_debug("addr =3D %x, data =3D %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 =3D (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. --=20 Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rj= ones 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