[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 29/33] virtio-pci: drop identical virtio_pci_cap
From: |
Gerd Hoffmann |
Subject: |
[Qemu-devel] [PATCH 29/33] virtio-pci: drop identical virtio_pci_cap |
Date: |
Thu, 4 Jun 2015 12:34:38 +0200 |
Now the three struct virtio_pci_caps are identical,
lets drop two of them ;)
Signed-off-by: Gerd Hoffmann <address@hidden>
---
hw/virtio/virtio-pci.c | 18 +++++-------------
1 file changed, 5 insertions(+), 13 deletions(-)
diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c
index 7cffe8a..7baeb7e 100644
--- a/hw/virtio/virtio-pci.c
+++ b/hw/virtio/virtio-pci.c
@@ -1334,16 +1334,8 @@ static void virtio_pci_device_plugged(DeviceState *d,
Error **errp)
if (modern) {
- struct virtio_pci_cap common = {
- .cap_len = sizeof common,
- .bar = modern_mem_bar,
- };
- struct virtio_pci_cap isr = {
- .cap_len = sizeof isr,
- .bar = modern_mem_bar,
- };
- struct virtio_pci_cap device = {
- .cap_len = sizeof device,
+ struct virtio_pci_cap cap = {
+ .cap_len = sizeof cap,
.bar = modern_mem_bar,
};
struct virtio_pci_notify_cap notify = {
@@ -1360,9 +1352,9 @@ static void virtio_pci_device_plugged(DeviceState *d,
Error **errp)
2 * QEMU_VIRTIO_PCI_QUEUE_MEM_MULT *
VIRTIO_QUEUE_MAX);
virtio_pci_modern_regions_init(proxy);
- virtio_pci_modern_region_map(proxy, &proxy->common, &common);
- virtio_pci_modern_region_map(proxy, &proxy->isr, &isr);
- virtio_pci_modern_region_map(proxy, &proxy->device, &device);
+ virtio_pci_modern_region_map(proxy, &proxy->common, &cap);
+ virtio_pci_modern_region_map(proxy, &proxy->isr, &cap);
+ virtio_pci_modern_region_map(proxy, &proxy->device, &cap);
virtio_pci_modern_region_map(proxy, &proxy->notify, ¬ify.cap);
pci_register_bar(&proxy->pci_dev, modern_mem_bar,
PCI_BASE_ADDRESS_SPACE_MEMORY |
--
1.8.3.1
- [Qemu-devel] [PATCH 17/33] virtio-pci: add flags to enable/disable legacy/modern, (continued)
- [Qemu-devel] [PATCH 17/33] virtio-pci: add flags to enable/disable legacy/modern, Gerd Hoffmann, 2015/06/04
- [Qemu-devel] [PATCH 08/33] virtio-net: support longer header, Gerd Hoffmann, 2015/06/04
- [Qemu-devel] [PATCH 15/33] virtio: add modern config accessors, Gerd Hoffmann, 2015/06/04
- [Qemu-devel] [PATCH 14/33] virtio: generation counter support, Gerd Hoffmann, 2015/06/04
- [Qemu-devel] [PATCH 21/33] virtio-pci: correctly set host notifiers for modern bar, Gerd Hoffmann, 2015/06/04
- [Qemu-devel] [PATCH 16/33] virtio-pci: switch to modern accessors for 1.0, Gerd Hoffmann, 2015/06/04
- [Qemu-devel] [PATCH 11/33] vhost: 64 bit features, Gerd Hoffmann, 2015/06/04
- [Qemu-devel] [PATCH 22/33] virtio_balloon: header update, Gerd Hoffmann, 2015/06/04
- [Qemu-devel] [PATCH 19/33] virtio-pci: change & document virtio pci bar layout., Gerd Hoffmann, 2015/06/04
- [Qemu-devel] [PATCH 29/33] virtio-pci: drop identical virtio_pci_cap,
Gerd Hoffmann <=
- [Qemu-devel] [PATCH 26/33] virtio-pci: add virtio_pci_modern_region_map(), Gerd Hoffmann, 2015/06/04
- [Qemu-devel] [PATCH 06/33] virtio: allow to fail setting status, Gerd Hoffmann, 2015/06/04
- [Qemu-devel] [PATCH 23/33] virtio-balloon: switch to virtio_add_feature, Gerd Hoffmann, 2015/06/04
- [Qemu-devel] [PATCH 20/33] virtio-pci: make modern bar 64bit + prefetchable, Gerd Hoffmann, 2015/06/04
- [Qemu-devel] [PATCH 27/33] virtio-pci: move virtio_pci_add_mem_cap call to virtio_pci_modern_region_map, Gerd Hoffmann, 2015/06/04
- [Qemu-devel] [PATCH 12/33] linux-headers: add virtio_pci, Gerd Hoffmann, 2015/06/04
- [Qemu-devel] [PATCH 13/33] virtio-pci: initial virtio 1.0 support, Gerd Hoffmann, 2015/06/04
- [Qemu-devel] [PATCH 18/33] virtio-pci: make QEMU_VIRTIO_PCI_QUEUE_MEM_MULT smaller, Gerd Hoffmann, 2015/06/04
- [Qemu-devel] [PATCH 28/33] virtio-pci: move cap type to VirtIOPCIRegion, Gerd Hoffmann, 2015/06/04
- [Qemu-devel] [PATCH 33/33] virtio-input: emulated devices [pci], Gerd Hoffmann, 2015/06/04