[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v3 18/40] ivshmem: Clean up register callbacks
From: |
Markus Armbruster |
Subject: |
[Qemu-devel] [PATCH v3 18/40] ivshmem: Clean up register callbacks |
Date: |
Tue, 15 Mar 2016 19:34:33 +0100 |
Signed-off-by: Markus Armbruster <address@hidden>
Reviewed-by: Marc-André Lureau <address@hidden>
---
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 51ad255..1debce3 100644
--- a/hw/misc/ivshmem.c
+++ b/hw/misc/ivshmem.c
@@ -121,12 +121,10 @@ static inline uint32_t ivshmem_has_feature(IVShmemState
*ivs,
return (ivs->features & (1 << feature));
}
-/* accessing registers - based on rtl8139 */
static void ivshmem_update_irq(IVShmemState *s)
{
PCIDevice *d = PCI_DEVICE(s);
- int isr;
- isr = (s->intrstatus & s->intrmask) & 0xffffffff;
+ uint32_t isr = s->intrstatus & s->intrmask;
/* 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);
}
- pci_set_irq(d, (isr != 0));
+ pci_set_irq(d, isr != 0);
}
static void ivshmem_IntrMask_write(IVShmemState *s, uint32_t val)
@@ -142,7 +140,6 @@ static void ivshmem_IntrMask_write(IVShmemState *s,
uint32_t val)
IVSHMEM_DPRINTF("IntrMask write(w) val = 0x%04x\n", val);
s->intrmask = val;
-
ivshmem_update_irq(s);
}
@@ -151,7 +148,6 @@ static uint32_t ivshmem_IntrMask_read(IVShmemState *s)
uint32_t ret = s->intrmask;
IVSHMEM_DPRINTF("intrmask read(w) val = 0x%04x\n", ret);
-
return ret;
}
@@ -160,7 +156,6 @@ static void ivshmem_IntrStatus_write(IVShmemState *s,
uint32_t val)
IVSHMEM_DPRINTF("IntrStatus write(w) val = 0x%04x\n", val);
s->intrstatus = val;
-
ivshmem_update_irq(s);
}
@@ -170,9 +165,7 @@ static uint32_t ivshmem_IntrStatus_read(IVShmemState *s)
/* reading ISR clears all interrupts */
s->intrstatus = 0;
-
ivshmem_update_irq(s);
-
return ret;
}
--
2.4.3
- Re: [Qemu-devel] [PATCH v3 19/40] ivshmem: Clean up MSI-X conditions, (continued)
- [Qemu-devel] [PATCH v3 06/40] tests/libqos/pci-pc: Fix qpci_pc_iomap() to map BARs aligned, Markus Armbruster, 2016/03/15
- [Qemu-devel] [PATCH v3 12/40] ivshmem: Compile debug prints unconditionally to prevent bit-rot, Markus Armbruster, 2016/03/15
- [Qemu-devel] [PATCH v3 09/40] ivshmem-test: Improve test cases /ivshmem/server-*, Markus Armbruster, 2016/03/15
- [Qemu-devel] [PATCH v3 03/40] ivshmem-server: Don't overload POSIX shmem and file name, Markus Armbruster, 2016/03/15
- [Qemu-devel] [PATCH v3 13/40] ivshmem: Clean up after commit 9940c32, Markus Armbruster, 2016/03/15
- [Qemu-devel] [PATCH v3 17/40] ivshmem: Failed realize() can leave migration blocker behind, Markus Armbruster, 2016/03/15
- [Qemu-devel] [PATCH v3 20/40] ivshmem: Leave INTx alone when using MSI-X, Markus Armbruster, 2016/03/15
- [Qemu-devel] [PATCH v3 25/40] ivshmem: Receive shared memory synchronously in realize(), Markus Armbruster, 2016/03/15
- [Qemu-devel] [PATCH v3 18/40] ivshmem: Clean up register callbacks,
Markus Armbruster <=
- [Qemu-devel] [PATCH v3 11/40] ivshmem: Add missing newlines to debug printfs, Markus Armbruster, 2016/03/15
- [Qemu-devel] [PATCH v3 23/40] ivshmem: Disentangle ivshmem_read(), Markus Armbruster, 2016/03/15
- [Qemu-devel] [PATCH v3 22/40] ivshmem: Simplify rejection of invalid peer ID from server, Markus Armbruster, 2016/03/15
- [Qemu-devel] [PATCH v3 35/40] ivshmem: Replace int role_val by OnOffAuto master, Markus Armbruster, 2016/03/15
- [Qemu-devel] [PATCH v3 15/40] ivshmem: Don't destroy the chardev on version mismatch, Markus Armbruster, 2016/03/15
- [Qemu-devel] [PATCH v3 21/40] ivshmem: Assert interrupts are set up once, Markus Armbruster, 2016/03/15
- [Qemu-devel] [PATCH v3 33/40] ivshmem: Inline check_shm_size() into its only caller, Markus Armbruster, 2016/03/15
- [Qemu-devel] [PATCH v3 40/40] contrib/ivshmem-server: Print "not for production" warning, Markus Armbruster, 2016/03/15