All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <f4bug@amsat.org>
To: Alexey Kardashevskiy <aik@ozlabs.ru>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH qemu] pci: Initialize pci_dev->name before use
Date: Fri, 25 Aug 2017 09:09:24 -0300	[thread overview]
Message-ID: <8d8da4bf-feb8-5da1-cd7a-195e80d59d8a@amsat.org> (raw)
In-Reply-To: <20170825032101.42538-1-aik@ozlabs.ru>

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);
>   
> 

  reply	other threads:[~2017-08-25 12:09 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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é [this message]
2017-08-25 15:25 ` Eric Blake

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8d8da4bf-feb8-5da1-cd7a-195e80d59d8a@amsat.org \
    --to=f4bug@amsat.org \
    --cc=aik@ozlabs.ru \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.