qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Marcel Apfelbaum <marcel@redhat.com>
To: Eduardo Habkost <ehabkost@redhat.com>, qemu-devel@nongnu.org
Cc: aik@ozlabs.ru, David Gibson <dgibson@redhat.com>,
	"Michael S. Tsirkin" <mst@redhat.com>,
	Laszlo Ersek <lersek@redhat.com>
Subject: Re: [Qemu-devel] [RFC 1/7] pci: Change pci_host_bus_register() parameter to PCIHostState
Date: Tue, 18 Apr 2017 16:01:27 +0300	[thread overview]
Message-ID: <9733cb3b-18b5-a9fb-3a63-622b4bdcc62b@redhat.com> (raw)
In-Reply-To: <20170417215916.12431-2-ehabkost@redhat.com>

On 04/18/2017 12:59 AM, Eduardo Habkost wrote:
> The function requires a PCI_HOST_BRIDGE object, so change the parameter
> type to reflect that.
>
> Cc: "Michael S. Tsirkin" <mst@redhat.com>
> Cc: Marcel Apfelbaum <marcel@redhat.com>
> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
> ---
>  hw/pci/pci.c | 8 +++-----
>  1 file changed, 3 insertions(+), 5 deletions(-)
>
> diff --git a/hw/pci/pci.c b/hw/pci/pci.c
> index 259483b1c0..25118fb91d 100644
> --- a/hw/pci/pci.c
> +++ b/hw/pci/pci.c
> @@ -312,11 +312,9 @@ static void pcibus_reset(BusState *qbus)
>      }
>  }
>
> -static void pci_host_bus_register(DeviceState *host)
> +static void pci_host_bus_register(PCIHostState *phb)
>  {
> -    PCIHostState *host_bridge = PCI_HOST_BRIDGE(host);
> -
> -    QLIST_INSERT_HEAD(&pci_host_bridges, host_bridge, next);
> +    QLIST_INSERT_HEAD(&pci_host_bridges, phb, next);
>  }
>
>  PCIBus *pci_find_primary_bus(void)
> @@ -377,7 +375,7 @@ static void pci_bus_init(PCIBus *bus, DeviceState *parent,
>      /* host bridge */
>      QLIST_INIT(&bus->child);
>
> -    pci_host_bus_register(parent);
> +    pci_host_bus_register(PCI_HOST_BRIDGE(host));
>  }
>
>  bool pci_bus_is_express(PCIBus *bus)
>


Reviewed-by: Marcel Apfelbaum <marcel@redhat.com>

Thanks,
Marcel

  parent reply	other threads:[~2017-04-18 13:01 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-17 21:59 [Qemu-devel] [RFC 0/7] pci: Type-safety and phb->bus initialization cleanup Eduardo Habkost
2017-04-17 21:59 ` [Qemu-devel] [RFC 1/7] pci: Change pci_host_bus_register() parameter to PCIHostState Eduardo Habkost
2017-04-18  3:46   ` David Gibson
2017-04-18 13:01   ` Marcel Apfelbaum [this message]
2017-04-17 21:59 ` [Qemu-devel] [RFC 2/7] pci: Change pci_bus_init() 'parent' " Eduardo Habkost
2017-04-18  3:51   ` David Gibson
2017-04-18 11:48     ` Eduardo Habkost
2017-04-18 13:22       ` Marcel Apfelbaum
2017-04-17 21:59 ` [Qemu-devel] [RFC 3/7] pci: Change pci_bus_new*() " Eduardo Habkost
2017-04-18  3:52   ` David Gibson
2017-04-18 13:27   ` Marcel Apfelbaum
2017-04-18 13:30     ` Eduardo Habkost
2017-04-18 13:36       ` Marcel Apfelbaum
2017-04-26 16:16   ` Michael S. Tsirkin
2017-04-26 17:49     ` Eduardo Habkost
2017-04-17 21:59 ` [Qemu-devel] [RFC 4/7] pci: Change pci_register_bus() 'parent' " Eduardo Habkost
2017-04-18  3:53   ` David Gibson
2017-04-18 10:41   ` Cornelia Huck
2017-04-18 13:37   ` Marcel Apfelbaum
2017-04-26 16:17   ` Michael S. Tsirkin
2017-04-17 21:59 ` [Qemu-devel] [RFC 5/7] pci: Set phb->bus inside pci_register_bus() Eduardo Habkost
2017-04-18  3:55   ` David Gibson
2017-04-18 10:42   ` Cornelia Huck
2017-04-18 13:43   ` Marcel Apfelbaum
2017-04-18 13:53     ` Eduardo Habkost
2017-04-17 21:59 ` [Qemu-devel] [RFC 6/7] pci: Set phb->bus inside pci_bus_new() Eduardo Habkost
2017-04-18  3:56   ` David Gibson
2017-04-17 21:59 ` [Qemu-devel] [RFC 7/7] pci: Set phb->bus inside pci_bus_new_inplace() Eduardo Habkost
2017-04-18  3:56   ` David Gibson

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=9733cb3b-18b5-a9fb-3a63-622b4bdcc62b@redhat.com \
    --to=marcel@redhat.com \
    --cc=aik@ozlabs.ru \
    --cc=dgibson@redhat.com \
    --cc=ehabkost@redhat.com \
    --cc=lersek@redhat.com \
    --cc=mst@redhat.com \
    --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 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).