From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44657) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ad0n7-00043z-7N for qemu-devel@nongnu.org; Mon, 07 Mar 2016 14:26:07 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ad0n5-0003wo-9z for qemu-devel@nongnu.org; Mon, 07 Mar 2016 14:26:05 -0500 Received: from mx1.redhat.com ([209.132.183.28]:39250) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ad0n5-0003vy-5f for qemu-devel@nongnu.org; Mon, 07 Mar 2016 14:26:03 -0500 From: Markus Armbruster Date: Mon, 7 Mar 2016 20:25:32 +0100 Message-Id: <1457378754-21649-21-git-send-email-armbru@redhat.com> In-Reply-To: <1457378754-21649-1-git-send-email-armbru@redhat.com> References: <1457378754-21649-1-git-send-email-armbru@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [PATCH v2 20/42] ivshmem: Clean up register callbacks List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: claudio.fontana@huawei.com, cam@cs.ualberta.ca, mlureau@redhat.com, david.marchand@6wind.com, pbonzini@redhat.com Signed-off-by: Markus Armbruster Reviewed-by: Marc-Andr=C3=A9 Lureau --- hw/misc/ivshmem.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/hw/misc/ivshmem.c b/hw/misc/ivshmem.c index 1392426..7191914 100644 --- a/hw/misc/ivshmem.c +++ b/hw/misc/ivshmem.c @@ -121,12 +121,10 @@ static inline uint32_t ivshmem_has_feature(IVShmemS= tate *ivs, return (ivs->features & (1 << feature)); } =20 -/* accessing registers - based on rtl8139 */ static void ivshmem_update_irq(IVShmemState *s) { PCIDevice *d =3D PCI_DEVICE(s); - int isr; - isr =3D (s->intrstatus & s->intrmask) & 0xffffffff; + uint32_t isr =3D s->intrstatus & s->intrmask; =20 /* don't print ISR resets */ if (isr) { @@ -134,7 +132,7 @@ static void ivshmem_update_irq(IVShmemState *s) isr ? 1 : 0, s->intrstatus, s->intrmask); } =20 - pci_set_irq(d, (isr !=3D 0)); + pci_set_irq(d, isr !=3D 0); } =20 static void ivshmem_IntrMask_write(IVShmemState *s, uint32_t val) @@ -142,7 +140,6 @@ static void ivshmem_IntrMask_write(IVShmemState *s, u= int32_t val) IVSHMEM_DPRINTF("IntrMask write(w) val =3D 0x%04x\n", val); =20 s->intrmask =3D val; - ivshmem_update_irq(s); } =20 @@ -151,7 +148,6 @@ static uint32_t ivshmem_IntrMask_read(IVShmemState *s= ) uint32_t ret =3D s->intrmask; =20 IVSHMEM_DPRINTF("intrmask read(w) val =3D 0x%04x\n", ret); - return ret; } =20 @@ -160,7 +156,6 @@ static void ivshmem_IntrStatus_write(IVShmemState *s,= uint32_t val) IVSHMEM_DPRINTF("IntrStatus write(w) val =3D 0x%04x\n", val); =20 s->intrstatus =3D val; - ivshmem_update_irq(s); } =20 @@ -170,9 +165,7 @@ static uint32_t ivshmem_IntrStatus_read(IVShmemState = *s) =20 /* reading ISR clears all interrupts */ s->intrstatus =3D 0; - ivshmem_update_irq(s); - return ret; } =20 --=20 2.4.3