From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: Igor Mammedov <imammedo@redhat.com>, qemu-devel@nongnu.org
Cc: mst@redhat.com, ani@anisinha.ca, pbonzini@redhat.com,
richard.henderson@linaro.org, mark.cave-ayland@ilande.co.uk,
peter.maydell@linaro.org, andrew.smirnov@gmail.com,
paulburton@kernel.org, aleksandar.rikalo@syrmia.com,
danielhb413@gmail.com, clg@kaod.org, david@gibson.dropbear.id.au,
groug@kaod.org, qemu-arm@nongnu.org, qemu-ppc@nongnu.org
Subject: Re: [PATCH 2/2] pci: drop redundant PCIDeviceClass::is_bridge field
Date: Wed, 16 Nov 2022 16:35:10 +0100 [thread overview]
Message-ID: <894b767d-b071-a37a-db61-9538d63e00dc@linaro.org> (raw)
In-Reply-To: <20221116152730.3691347-3-imammedo@redhat.com>
On 16/11/22 16:27, Igor Mammedov wrote:
> and use cast to TYPE_PCI_BRIDGE instead.
>
> Signed-off-by: Igor Mammedov <imammedo@redhat.com>
> ---
> include/hw/pci/pci.h | 11 +----------
> include/hw/pci/pci_bridge.h | 1 +
> hw/acpi/pcihp.c | 3 +--
> hw/i386/acpi-build.c | 5 ++---
> hw/pci-bridge/cxl_downstream.c | 1 -
> hw/pci-bridge/cxl_upstream.c | 1 -
> hw/pci-bridge/i82801b11.c | 1 -
> hw/pci-bridge/pci_bridge_dev.c | 1 -
> hw/pci-bridge/pcie_pci_bridge.c | 1 -
> hw/pci-bridge/pcie_root_port.c | 1 -
> hw/pci-bridge/simba.c | 1 -
> hw/pci-bridge/xio3130_downstream.c | 1 -
> hw/pci-bridge/xio3130_upstream.c | 1 -
> hw/pci-host/designware.c | 1 -
> hw/pci-host/xilinx-pcie.c | 1 -
> hw/pci/pci.c | 20 +++++++++-----------
> hw/ppc/spapr_pci.c | 15 +++++----------
> 17 files changed, 19 insertions(+), 47 deletions(-)
> @@ -1090,9 +1088,10 @@ static PCIDevice *do_pci_register_device(PCIDevice *pci_dev,
> Error *local_err = NULL;
> DeviceState *dev = DEVICE(pci_dev);
> PCIBus *bus = pci_get_bus(pci_dev);
> + bool is_bridge = IS_PCI_BRIDGE(pci_dev);
>
> /* Only pci bridges can be attached to extra PCI root buses */
> - if (pci_bus_is_root(bus) && bus->parent_dev && !pc->is_bridge) {
> + if (pci_bus_is_root(bus) && bus->parent_dev && !IS_PCI_BRIDGE(pci_dev)) {
Can we use the recently assigned 'is_bridge' variable?
Otherwise:
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
next prev parent reply other threads:[~2022-11-16 15:35 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-16 15:27 [PATCH 0/2] remove redundant field PCIDeviceClass::is_bridge Igor Mammedov
2022-11-16 15:27 ` [PATCH 1/2] remove DEC 21154 PCI bridge Igor Mammedov
2022-11-16 19:39 ` BALATON Zoltan
2022-11-18 12:44 ` Igor Mammedov
2022-11-20 22:08 ` Mark Cave-Ayland
2022-11-21 7:43 ` Igor Mammedov
2022-11-23 12:54 ` Mark Cave-Ayland
2022-11-16 15:27 ` [PATCH 2/2] pci: drop redundant PCIDeviceClass::is_bridge field Igor Mammedov
2022-11-16 15:35 ` Philippe Mathieu-Daudé [this message]
2022-11-16 15:48 ` Igor Mammedov
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=894b767d-b071-a37a-db61-9538d63e00dc@linaro.org \
--to=philmd@linaro.org \
--cc=aleksandar.rikalo@syrmia.com \
--cc=andrew.smirnov@gmail.com \
--cc=ani@anisinha.ca \
--cc=clg@kaod.org \
--cc=danielhb413@gmail.com \
--cc=david@gibson.dropbear.id.au \
--cc=groug@kaod.org \
--cc=imammedo@redhat.com \
--cc=mark.cave-ayland@ilande.co.uk \
--cc=mst@redhat.com \
--cc=paulburton@kernel.org \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.org \
--cc=richard.henderson@linaro.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.