From: Igor Mammedov <imammedo@redhat.com>
To: Bernhard Beschow <shentey@gmail.com>
Cc: qemu-devel@nongnu.org, qemu-trivial@nongnu.org,
"Richard Henderson" <richard.henderson@linaro.org>,
"Paolo Bonzini" <pbonzini@redhat.com>,
"Philippe Mathieu-Daudé" <philmd@linaro.org>,
"Markus Armbruster" <armbru@redhat.com>,
"Eduardo Habkost" <eduardo@habkost.net>,
"Michael S. Tsirkin" <mst@redhat.com>,
"Ani Sinha" <ani@anisinha.ca>,
"Marcel Apfelbaum" <marcel.apfelbaum@gmail.com>,
"Aurelien Jarno" <aurelien@aurel32.net>
Subject: Re: [PATCH v3 7/7] piix3, ich9: Reuse qbus_build_aml()
Date: Wed, 18 Jan 2023 12:39:46 +0100 [thread overview]
Message-ID: <20230118123946.0b282e2c@imammedo.users.ipa.redhat.com> (raw)
In-Reply-To: <20230116152908.147275-8-shentey@gmail.com>
On Mon, 16 Jan 2023 16:29:08 +0100
Bernhard Beschow <shentey@gmail.com> wrote:
> Signed-off-by: Bernhard Beschow <shentey@gmail.com>
> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
I'd squash it in previous patch, and rename that to something
'remove no longer needed isa_build_aml()
isa_build_aml() doesn't do anything except
calling call_dev_aml_func() on bus children
along with other places that do the same.
Move that into ... and cleanup those places
as well.
'
> ---
> hw/i2c/smbus_ich9.c | 5 +----
> hw/isa/lpc_ich9.c | 5 +----
> hw/isa/piix3.c | 5 +----
> 3 files changed, 3 insertions(+), 12 deletions(-)
>
> diff --git a/hw/i2c/smbus_ich9.c b/hw/i2c/smbus_ich9.c
> index ee50ba1f2c..52ba77f3fc 100644
> --- a/hw/i2c/smbus_ich9.c
> +++ b/hw/i2c/smbus_ich9.c
> @@ -97,13 +97,10 @@ static void ich9_smbus_realize(PCIDevice *d, Error **errp)
>
> static void build_ich9_smb_aml(AcpiDevAmlIf *adev, Aml *scope)
> {
> - BusChild *kid;
> ICH9SMBState *s = ICH9_SMB_DEVICE(adev);
> BusState *bus = BUS(s->smb.smbus);
>
> - QTAILQ_FOREACH(kid, &bus->children, sibling) {
> - call_dev_aml_func(DEVICE(kid->child), scope);
> - }
> + qbus_build_aml(bus, scope);
> }
>
> static void ich9_smb_class_init(ObjectClass *klass, void *data)
> diff --git a/hw/isa/lpc_ich9.c b/hw/isa/lpc_ich9.c
> index 0ab0a341be..d5d4b0f177 100644
> --- a/hw/isa/lpc_ich9.c
> +++ b/hw/isa/lpc_ich9.c
> @@ -813,7 +813,6 @@ static void ich9_send_gpe(AcpiDeviceIf *adev, AcpiEventStatusBits ev)
> static void build_ich9_isa_aml(AcpiDevAmlIf *adev, Aml *scope)
> {
> Aml *field;
> - BusChild *kid;
> ICH9LPCState *s = ICH9_LPC_DEVICE(adev);
> BusState *bus = BUS(s->isa_bus);
> Aml *sb_scope = aml_scope("\\_SB");
> @@ -835,9 +834,7 @@ static void build_ich9_isa_aml(AcpiDevAmlIf *adev, Aml *scope)
> aml_append(sb_scope, field);
> aml_append(scope, sb_scope);
>
> - QTAILQ_FOREACH(kid, &bus->children, sibling) {
> - call_dev_aml_func(DEVICE(kid->child), scope);
> - }
> + qbus_build_aml(bus, scope);
> }
>
> static void ich9_lpc_class_init(ObjectClass *klass, void *data)
> diff --git a/hw/isa/piix3.c b/hw/isa/piix3.c
> index 283b971ec4..a9cb39bf21 100644
> --- a/hw/isa/piix3.c
> +++ b/hw/isa/piix3.c
> @@ -306,7 +306,6 @@ static void pci_piix3_realize(PCIDevice *dev, Error **errp)
> static void build_pci_isa_aml(AcpiDevAmlIf *adev, Aml *scope)
> {
> Aml *field;
> - BusChild *kid;
> Aml *sb_scope = aml_scope("\\_SB");
> BusState *bus = qdev_get_child_bus(DEVICE(adev), "isa.0");
>
> @@ -322,9 +321,7 @@ static void build_pci_isa_aml(AcpiDevAmlIf *adev, Aml *scope)
> aml_append(sb_scope, field);
> aml_append(scope, sb_scope);
>
> - QTAILQ_FOREACH(kid, &bus->children, sibling) {
> - call_dev_aml_func(DEVICE(kid->child), scope);
> - }
> + qbus_build_aml(bus, scope);
> }
>
> static void pci_piix3_class_init(ObjectClass *klass, void *data)
prev parent reply other threads:[~2023-01-18 11:40 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-16 15:29 [PATCH v3 0/7] AML Housekeeping Bernhard Beschow
2023-01-16 15:29 ` [PATCH v3 1/7] hw/acpi/acpi_dev_interface: Remove unused parameter from AcpiDeviceIfClass::madt_cpu Bernhard Beschow
2023-01-16 16:37 ` Igor Mammedov
2023-01-16 15:29 ` [PATCH v3 2/7] hw/acpi/acpi_dev_interface: Resolve AcpiDeviceIfClass::madt_cpu Bernhard Beschow
2023-01-16 16:29 ` Igor Mammedov
2023-01-17 0:30 ` Bernhard Beschow
2023-01-17 14:49 ` Bernhard Beschow
2023-01-18 14:59 ` Igor Mammedov
2023-01-19 14:47 ` Bernhard Beschow
2023-01-20 16:34 ` Igor Mammedov
2023-01-21 15:37 ` Bernhard Beschow
2023-01-24 12:13 ` Igor Mammedov
2023-01-16 15:29 ` [PATCH v3 3/7] hw/acpi/acpi_dev_interface: Remove now unused #include "hw/boards.h" Bernhard Beschow
2023-01-16 15:29 ` [PATCH v3 4/7] hw/acpi/piix4: No need to #include "hw/southbridge/piix.h" Bernhard Beschow
2023-01-16 15:29 ` [PATCH v3 5/7] hw/i386/acpi-build: Remove unused attributes Bernhard Beschow
2023-01-16 16:45 ` Igor Mammedov
2023-01-16 15:29 ` [PATCH v3 6/7] hw/isa/isa-bus: Turn isa_build_aml() into qbus_build_aml() Bernhard Beschow
2023-01-18 11:34 ` Igor Mammedov
2023-01-16 15:29 ` [PATCH v3 7/7] piix3, ich9: Reuse qbus_build_aml() Bernhard Beschow
2023-01-18 11:39 ` Igor Mammedov [this message]
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=20230118123946.0b282e2c@imammedo.users.ipa.redhat.com \
--to=imammedo@redhat.com \
--cc=ani@anisinha.ca \
--cc=armbru@redhat.com \
--cc=aurelien@aurel32.net \
--cc=eduardo@habkost.net \
--cc=marcel.apfelbaum@gmail.com \
--cc=mst@redhat.com \
--cc=pbonzini@redhat.com \
--cc=philmd@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-trivial@nongnu.org \
--cc=richard.henderson@linaro.org \
--cc=shentey@gmail.com \
/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).