qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH qemu v3] pci: Initialize pci_dev->name before use
@ 2017-10-19  2:15 Alexey Kardashevskiy
  2017-10-26  2:21 ` Alexey Kardashevskiy
  0 siblings, 1 reply; 3+ messages in thread
From: Alexey Kardashevskiy @ 2017-10-19  2:15 UTC (permalink / raw)
  To: qemu-devel; +Cc: Alexey Kardashevskiy, Michael S. Tsirkin

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é <f4bug@amsat.org>
Reviewed-by: Peter Xu <peterx@redhat.com>
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
---

Changes:
v3:
* more "reviewed-by"
* fixed spelling in commit log

v2:
* fixed mistype in the commit log
* added "rb"
---
 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 5ed3c8dca4..b2d139bd9a 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);
 
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] [PATCH qemu v3] pci: Initialize pci_dev->name before use
  2017-10-19  2:15 [Qemu-devel] [PATCH qemu v3] pci: Initialize pci_dev->name before use Alexey Kardashevskiy
@ 2017-10-26  2:21 ` Alexey Kardashevskiy
  2017-11-09  4:34   ` Alexey Kardashevskiy
  0 siblings, 1 reply; 3+ messages in thread
From: Alexey Kardashevskiy @ 2017-10-26  2:21 UTC (permalink / raw)
  To: qemu-devel; +Cc: Michael S. Tsirkin

On 19/10/17 13:15, Alexey Kardashevskiy wrote:
> 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é <f4bug@amsat.org>
> Reviewed-by: Peter Xu <peterx@redhat.com>
> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>



Ping?

> ---
> 
> Changes:
> v3:
> * more "reviewed-by"
> * fixed spelling in commit log
> 
> v2:
> * fixed mistype in the commit log
> * added "rb"
> ---
>  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 5ed3c8dca4..b2d139bd9a 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);
>  
> 


-- 
Alexey

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] [PATCH qemu v3] pci: Initialize pci_dev->name before use
  2017-10-26  2:21 ` Alexey Kardashevskiy
@ 2017-11-09  4:34   ` Alexey Kardashevskiy
  0 siblings, 0 replies; 3+ messages in thread
From: Alexey Kardashevskiy @ 2017-11-09  4:34 UTC (permalink / raw)
  To: qemu-devel; +Cc: Michael S. Tsirkin

On 26/10/17 13:21, Alexey Kardashevskiy wrote:
> On 19/10/17 13:15, Alexey Kardashevskiy wrote:
>> 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é <f4bug@amsat.org>
>> Reviewed-by: Peter Xu <peterx@redhat.com>
>> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
> 
> 
> 
> Ping?


Ping?


> 
>> ---
>>
>> Changes:
>> v3:
>> * more "reviewed-by"
>> * fixed spelling in commit log
>>
>> v2:
>> * fixed mistype in the commit log
>> * added "rb"
>> ---
>>  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 5ed3c8dca4..b2d139bd9a 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);
>>  
>>
> 
> 


-- 
Alexey

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-11-09  4:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-19  2:15 [Qemu-devel] [PATCH qemu v3] pci: Initialize pci_dev->name before use Alexey Kardashevskiy
2017-10-26  2:21 ` Alexey Kardashevskiy
2017-11-09  4:34   ` Alexey Kardashevskiy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).