[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 18/40] ivshmem: Clean up register callbacks
From: |
Markus Armbruster |
Subject: |
[Qemu-devel] [PULL 18/40] ivshmem: Clean up register callbacks |
Date: |
Fri, 18 Mar 2016 18:01:05 +0100 |
Signed-off-by: Markus Armbruster <address@hidden>
Reviewed-by: Marc-André Lureau <address@hidden>
Message-Id: <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
- [Qemu-devel] [PULL 07/40] ivshmem-test: Improve test case /ivshmem/single, (continued)
- [Qemu-devel] [PULL 07/40] ivshmem-test: Improve test case /ivshmem/single, Markus Armbruster, 2016/03/18
- [Qemu-devel] [PULL 09/40] ivshmem-test: Improve test cases /ivshmem/server-*, Markus Armbruster, 2016/03/18
- [Qemu-devel] [PULL 06/40] tests/libqos/pci-pc: Fix qpci_pc_iomap() to map BARs aligned, Markus Armbruster, 2016/03/18
- [Qemu-devel] [PULL 03/40] ivshmem-server: Don't overload POSIX shmem and file name, Markus Armbruster, 2016/03/18
- [Qemu-devel] [PULL 08/40] ivshmem-test: Clean up wait for devices to become operational, Markus Armbruster, 2016/03/18
- [Qemu-devel] [PULL 01/40] target-ppc: Document TOCTTOU in hugepage support, Markus Armbruster, 2016/03/18
- [Qemu-devel] [PULL 05/40] event_notifier: Make event_notifier_init_fd() #ifdef CONFIG_EVENTFD, Markus Armbruster, 2016/03/18
- [Qemu-devel] [PULL 15/40] ivshmem: Don't destroy the chardev on version mismatch, Markus Armbruster, 2016/03/18
- [Qemu-devel] [PULL 11/40] ivshmem: Add missing newlines to debug printfs, Markus Armbruster, 2016/03/18
- [Qemu-devel] [PULL 22/40] ivshmem: Simplify rejection of invalid peer ID from server, Markus Armbruster, 2016/03/18
- [Qemu-devel] [PULL 18/40] ivshmem: Clean up register callbacks,
Markus Armbruster <=
- [Qemu-devel] [PULL 14/40] ivshmem: Drop ivshmem_event() stub, Markus Armbruster, 2016/03/18
- [Qemu-devel] [PULL 24/40] ivshmem: Plug leaks on unplug, fix peer disconnect, Markus Armbruster, 2016/03/18
- [Qemu-devel] [PULL 38/40] ivshmem: Drop ivshmem property x-memdev, Markus Armbruster, 2016/03/18
- [Qemu-devel] [PULL 20/40] ivshmem: Leave INTx alone when using MSI-X, Markus Armbruster, 2016/03/18
- [Qemu-devel] [PULL 39/40] ivshmem: Require master to have ID zero, Markus Armbruster, 2016/03/18
- [Qemu-devel] [PULL 33/40] ivshmem: Inline check_shm_size() into its only caller, Markus Armbruster, 2016/03/18
- [Qemu-devel] [PULL 26/40] ivshmem: Propagate errors through ivshmem_recv_setup(), Markus Armbruster, 2016/03/18
- [Qemu-devel] [PULL 10/40] ivshmem: Rewrite specification document, Markus Armbruster, 2016/03/18
- [Qemu-devel] [PULL 32/40] ivshmem: Simplify memory regions for BAR 2 (shared memory), Markus Armbruster, 2016/03/18
- [Qemu-devel] [PULL 04/40] qemu-doc: Fix ivshmem huge page example, Markus Armbruster, 2016/03/18