* [Qemu-devel] [PATCH qemu] pci: Initialize pci_dev->name before use
@ 2017-08-25 3:21 Alexey Kardashevskiy
2017-08-25 12:09 ` Philippe Mathieu-Daudé
2017-08-25 15:25 ` Eric Blake
0 siblings, 2 replies; 3+ messages in thread
From: Alexey Kardashevskiy @ 2017-08-25 3:21 UTC (permalink / raw)
To: qemu-devel; +Cc: Alexey Kardashevskiy
This moves pci_dev->name initialization earlier so
pci_dev->bus_master_as could get a name instead of empry string.
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
---
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 258fbe51e2..852babe812 100644
--- a/hw/pci/pci.c
+++ b/hw/pci/pci.c
@@ -1000,6 +1000,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);
@@ -1009,7 +1010,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);
--
2.11.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [PATCH qemu] pci: Initialize pci_dev->name before use
2017-08-25 3:21 [Qemu-devel] [PATCH qemu] pci: Initialize pci_dev->name before use Alexey Kardashevskiy
@ 2017-08-25 12:09 ` Philippe Mathieu-Daudé
2017-08-25 15:25 ` Eric Blake
1 sibling, 0 replies; 3+ messages in thread
From: Philippe Mathieu-Daudé @ 2017-08-25 12:09 UTC (permalink / raw)
To: Alexey Kardashevskiy, qemu-devel
On 08/25/2017 12:21 AM, Alexey Kardashevskiy wrote:
> This moves pci_dev->name initialization earlier so
> pci_dev->bus_master_as could get a name instead of empry string.
>
> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
> 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 258fbe51e2..852babe812 100644
> --- a/hw/pci/pci.c
> +++ b/hw/pci/pci.c
> @@ -1000,6 +1000,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);
> @@ -1009,7 +1010,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);
>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [PATCH qemu] pci: Initialize pci_dev->name before use
2017-08-25 3:21 [Qemu-devel] [PATCH qemu] pci: Initialize pci_dev->name before use Alexey Kardashevskiy
2017-08-25 12:09 ` Philippe Mathieu-Daudé
@ 2017-08-25 15:25 ` Eric Blake
1 sibling, 0 replies; 3+ messages in thread
From: Eric Blake @ 2017-08-25 15:25 UTC (permalink / raw)
To: Alexey Kardashevskiy, qemu-devel
[-- Attachment #1: Type: text/plain, Size: 396 bytes --]
On 08/24/2017 10:21 PM, Alexey Kardashevskiy wrote:
> This moves pci_dev->name initialization earlier so
> pci_dev->bus_master_as could get a name instead of empry string.
s/empry/an empty/
>
> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
> ---
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3266
Virtualization: qemu.org | libvirt.org
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 619 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-08-25 15:25 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-25 3:21 [Qemu-devel] [PATCH qemu] pci: Initialize pci_dev->name before use Alexey Kardashevskiy
2017-08-25 12:09 ` Philippe Mathieu-Daudé
2017-08-25 15:25 ` Eric Blake
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.