[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 02/10] pci: Initialize pci_dev->name before use
From: |
Michael S. Tsirkin |
Subject: |
[Qemu-devel] [PULL 02/10] pci: Initialize pci_dev->name before use |
Date: |
Wed, 15 Nov 2017 20:17:51 +0200 |
From: Alexey Kardashevskiy <address@hidden>
This moves pci_dev->name initialization earlier so
pci_dev->bus_master_as could get a name instead of an empty string.
Reviewed-by: Philippe Mathieu-Daudé <address@hidden>
Reviewed-by: Peter Xu <address@hidden>
Signed-off-by: Alexey Kardashevskiy <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>
---
hw/pci/pci.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/pci/pci.c b/hw/pci/pci.c
index 5ed3c8d..b2d139b 100644
--- a/hw/pci/pci.c
+++ b/hw/pci/pci.c
@@ -1030,6 +1030,7 @@ static PCIDevice *do_pci_register_device(PCIDevice
*pci_dev, PCIBus *bus,
pci_dev->devfn = devfn;
pci_dev->requester_id_cache = pci_req_id_cache_get(pci_dev);
+ pstrcpy(pci_dev->name, sizeof(pci_dev->name), name);
memory_region_init(&pci_dev->bus_master_container_region, OBJECT(pci_dev),
"bus master container", UINT64_MAX);
@@ -1039,7 +1040,6 @@ static PCIDevice *do_pci_register_device(PCIDevice
*pci_dev, PCIBus *bus,
if (qdev_hotplug) {
pci_init_bus_master(pci_dev);
}
- pstrcpy(pci_dev->name, sizeof(pci_dev->name), name);
pci_dev->irq_state = 0;
pci_config_alloc(pci_dev);
--
MST
- [Qemu-devel] [PULL 00/10] pc, pci, virtio: fixes for rc1, Michael S. Tsirkin, 2017/11/15
- [Qemu-devel] [PULL 01/10] fix: unrealize virtio device if we fail to hotplug it, Michael S. Tsirkin, 2017/11/15
- [Qemu-devel] [PULL 02/10] pci: Initialize pci_dev->name before use,
Michael S. Tsirkin <=
- [Qemu-devel] [PULL 03/10] tests: report errors when iasl exits with non-zero status, Michael S. Tsirkin, 2017/11/15
- [Qemu-devel] [PULL 04/10] test: fix detection of errors from iasl, Michael S. Tsirkin, 2017/11/15
- [Qemu-devel] [PULL 05/10] hw/pci-host: Fix x86 Host Bridges 64bit PCI hole, Michael S. Tsirkin, 2017/11/15
- [Qemu-devel] [PULL 06/10] hw/pcie-pci-bridge: restrict to X86 and ARM, Michael S. Tsirkin, 2017/11/15
- [Qemu-devel] [PULL 07/10] tests/acpi-test-data: update _CRS in DSDT, Michael S. Tsirkin, 2017/11/15
- [Qemu-devel] [PULL 08/10] NUMA: Enable adding NUMA node implicitly, Michael S. Tsirkin, 2017/11/15
- [Qemu-devel] [PULL 09/10] vmcoreinfo: put it in the 'misc' device category, Michael S. Tsirkin, 2017/11/15
- [Qemu-devel] [PULL 10/10] build-sys: restrict vmcoreinfo to fw_cfg+dma capable targets, Michael S. Tsirkin, 2017/11/15
- Re: [Qemu-devel] [PULL 00/10] pc, pci, virtio: fixes for rc1, Peter Maydell, 2017/11/16