[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [RFC][PATCH 26/45] qemu-kvm: Use g_realloc for irq_routes e
From: |
Jan Kiszka |
Subject: |
[Qemu-devel] [RFC][PATCH 26/45] qemu-kvm: Use g_realloc for irq_routes extension |
Date: |
Mon, 17 Oct 2011 11:28:00 +0200 |
Allows to drop checking for out-of-memory.
Signed-off-by: Jan Kiszka <address@hidden>
---
qemu-kvm.c | 7 +------
1 files changed, 1 insertions(+), 6 deletions(-)
diff --git a/qemu-kvm.c b/qemu-kvm.c
index 6bdd7b5..eb8f176 100644
--- a/qemu-kvm.c
+++ b/qemu-kvm.c
@@ -258,7 +258,6 @@ int kvm_add_routing_entry(struct kvm_irq_routing_entry
*entry,
{
#ifdef KVM_CAP_IRQ_ROUTING
KVMState *s = kvm_state;
- struct kvm_irq_routing *z;
struct kvm_irq_routing_entry *new;
int n, size;
@@ -269,12 +268,8 @@ int kvm_add_routing_entry(struct kvm_irq_routing_entry
*entry,
}
size = sizeof(struct kvm_irq_routing);
size += n * sizeof(*new);
- z = realloc(s->irq_routes, size);
- if (!z) {
- return -ENOMEM;
- }
+ s->irq_routes = g_realloc(s->irq_routes, size);
s->nr_allocated_irq_routes = n;
- s->irq_routes = z;
s->msi_cache = g_realloc(s->msi_cache, sizeof(*s->msi_cache) * n);
}
--
1.7.3.4
- [Qemu-devel] [RFC][PATCH 13/45] hpet: Use msi_deliver, (continued)
- [Qemu-devel] [RFC][PATCH 13/45] hpet: Use msi_deliver, Jan Kiszka, 2011/10/17
- [Qemu-devel] [RFC][PATCH 06/45] msix: Prevent bogus mask updates on MMIO accesses, Jan Kiszka, 2011/10/17
- Re: [Qemu-devel] [RFC][PATCH 06/45] msix: Prevent bogus mask updates on MMIO accesses, Michael S. Tsirkin, 2011/10/17
- Re: [Qemu-devel] [RFC][PATCH 06/45] msix: Prevent bogus mask updates on MMIO accesses, Jan Kiszka, 2011/10/17
- Re: [Qemu-devel] [RFC][PATCH 06/45] msix: Prevent bogus mask updates on MMIO accesses, Michael S. Tsirkin, 2011/10/17
- Re: [Qemu-devel] [RFC][PATCH 06/45] msix: Prevent bogus mask updates on MMIO accesses, Jan Kiszka, 2011/10/17
- Re: [Qemu-devel] [RFC][PATCH 06/45] msix: Prevent bogus mask updates on MMIO accesses, Michael S. Tsirkin, 2011/10/17
- Re: [Qemu-devel] [RFC][PATCH 06/45] msix: Prevent bogus mask updates on MMIO accesses, Jan Kiszka, 2011/10/17
- Re: [Qemu-devel] [RFC][PATCH 06/45] msix: Prevent bogus mask updates on MMIO accesses, Michael S. Tsirkin, 2011/10/17
[Qemu-devel] [RFC][PATCH 09/45] msi: Factor out msi_message_from_vector, Jan Kiszka, 2011/10/17
[Qemu-devel] [RFC][PATCH 26/45] qemu-kvm: Use g_realloc for irq_routes extension,
Jan Kiszka <=
[Qemu-devel] [RFC][PATCH 17/45] qemu-kvm: Track MSIRoutingCache in KVM routing table, Jan Kiszka, 2011/10/17
[Qemu-devel] [RFC][PATCH 04/45] msi: Invoke msi/msix_reset from PCI core, Jan Kiszka, 2011/10/17
[Qemu-devel] [RFC][PATCH 25/45] qemu-kvm: Update MSI cache on kvm_msi_irqfd_set, Jan Kiszka, 2011/10/17
[Qemu-devel] [RFC][PATCH 20/45] qemu-kvm: msix: Only invoke msix_handle_mask_update on changes, Jan Kiszka, 2011/10/17
[Qemu-devel] [RFC][PATCH 14/45] qemu-kvm: Drop useless kvm_clear_gsi_routes, Jan Kiszka, 2011/10/17
[Qemu-devel] [RFC][PATCH 34/45] qemu-kvm: Factor out kvm_device_msi_assign, Jan Kiszka, 2011/10/17
[Qemu-devel] [RFC][PATCH 08/45] Introduce MSIMessage structure, Jan Kiszka, 2011/10/17