From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MM6KX-0008IS-I1 for qemu-devel@nongnu.org; Wed, 01 Jul 2009 16:22:57 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MM6KT-0008Du-Tm for qemu-devel@nongnu.org; Wed, 01 Jul 2009 16:22:57 -0400 Received: from [199.232.76.173] (port=49164 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MM6KT-0008DQ-KN for qemu-devel@nongnu.org; Wed, 01 Jul 2009 16:22:53 -0400 Received: from fmmailgate02.web.de ([217.72.192.227]:42271) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MM6KT-0003RV-AY for qemu-devel@nongnu.org; Wed, 01 Jul 2009 16:22:53 -0400 Message-ID: <4A4BC57E.504@web.de> Date: Wed, 01 Jul 2009 22:22:22 +0200 From: Jan Kiszka MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enigFAB10624AD62807D8638FE88" Sender: jan.kiszka@web.de Subject: [Qemu-devel] [PATCH] Use ffs in favor of ffsll List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori , Blue Swirl Cc: qemu-devel This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigFAB10624AD62807D8638FE88 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: quoted-printable Not all host platforms support the ll variant. This is not a critical path, so go the easy way. Signed-off-by: Jan Kiszka --- target-i386/machine.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/target-i386/machine.c b/target-i386/machine.c index 259302c..4ab154c 100644 --- a/target-i386/machine.c +++ b/target-i386/machine.c @@ -147,10 +147,10 @@ void cpu_save(QEMUFile *f, void *opaque) /* There can only be one pending IRQ set in the bitmap at a time, so= try to find it and save its number instead (-1 for none). */ pending_irq =3D -1; - for (i =3D 0; i < ARRAY_SIZE(env->interrupt_bitmap); i++) { - bit =3D ffsll(env->interrupt_bitmap[i]); + for (i =3D 0; i < sizeof(env->interrupt_bitmap) / sizeof(int); i++) = { + bit =3D ffs(((int *)env->interrupt_bitmap)[i]); if (bit) { - pending_irq =3D i * 64 + bit - 1; + pending_irq =3D i * 8 * sizeof(int) + bit - 1; break; } } --------------enigFAB10624AD62807D8638FE88 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (GNU/Linux) Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org iEYEARECAAYFAkpLxYEACgkQniDOoMHTA+lR9ACdG0tFDv+5d9NgwyV7AZdT/VCq 1pUAnjuZ5h5fKJ7gJw3Av3wKeTeUGuwB =N04r -----END PGP SIGNATURE----- --------------enigFAB10624AD62807D8638FE88--