qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>, qemu-devel@nongnu.org
Cc: "Marcel Apfelbaum" <marcel.apfelbaum@gmail.com>,
	"Hervé Poussineau" <hpoussin@reactos.org>,
	"Gerd Hoffmann" <kraxel@redhat.com>,
	"Michael S. Tsirkin" <mst@redhat.com>,
	"Eduardo Habkost" <eduardo@habkost.net>,
	"Bernhard Beschow" <shentey@gmail.com>,
	qemu-ppc@nongnu.org,
	"Aleksandar Rikalo" <aleksandar.rikalo@syrmia.com>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	"Richard Henderson" <richard.henderson@linaro.org>
Subject: Re: [PATCH] hw/audio/pcspk: Inline pcspk_init()
Date: Wed, 18 Oct 2023 07:02:00 +0200	[thread overview]
Message-ID: <86b583f9-f03c-ca5c-95cd-65b5b679a56e@linaro.org> (raw)
In-Reply-To: <72ab4b46-2152-4de3-b971-b31ea9d89bf1@ilande.co.uk>

On 17/10/23 22:08, Mark Cave-Ayland wrote:
> On 17/10/2023 14:50, Philippe Mathieu-Daudé wrote:
> 
>> pcspk_init() is a legacy init function, inline and remove it.
>>
>> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
>> ---
>>   include/hw/audio/pcspk.h | 10 ----------
>>   hw/i386/pc.c             |  3 ++-
>>   hw/isa/i82378.c          |  5 ++++-
>>   hw/mips/jazz.c           |  5 ++++-
>>   4 files changed, 10 insertions(+), 13 deletions(-)


>> diff --git a/hw/mips/jazz.c b/hw/mips/jazz.c
>> index c32d2b0b0a..aac851747c 100644
>> --- a/hw/mips/jazz.c
>> +++ b/hw/mips/jazz.c
>> @@ -177,6 +177,7 @@ static void mips_jazz_init(MachineState *machine,
>>       SysBusDevice *sysbus;
>>       ISABus *isa_bus;
>>       ISADevice *pit;
>> +    ISADevice *pcspk;
>>       DriveInfo *fds[MAX_FD];
>>       MemoryRegion *bios = g_new(MemoryRegion, 1);
>>       MemoryRegion *bios2 = g_new(MemoryRegion, 1);
>> @@ -279,7 +280,9 @@ static void mips_jazz_init(MachineState *machine,
>>       isa_bus_register_input_irqs(isa_bus, i8259);
>>       i8257_dma_init(isa_bus, 0);
>>       pit = i8254_pit_init(isa_bus, 0x40, 0, NULL);
>> -    pcspk_init(isa_new(TYPE_PC_SPEAKER), isa_bus, pit);
>> +    pcspk = isa_new(TYPE_PC_SPEAKER);
>> +    object_property_set_link(OBJECT(pcspk), "pit", OBJECT(pit), NULL);
>> +    isa_realize_and_unref(pcspk, isa_bus, &error_fatal);
>>       /* Video card */
>>       switch (jazz_model) {
> 
> Possibly you might want to pass errp instead of NULL for the last 
> parameter of object_property_set_link() in i82378_realize()?

Oops you are right. I'll use &error_fatal.

> But 
> regardless:
> 
> Reviewed-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>

Thanks!



      reply	other threads:[~2023-10-18  5:02 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-17 13:50 [PATCH] hw/audio/pcspk: Inline pcspk_init() Philippe Mathieu-Daudé
2023-10-17 20:08 ` Mark Cave-Ayland
2023-10-18  5:02   ` Philippe Mathieu-Daudé [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=86b583f9-f03c-ca5c-95cd-65b5b679a56e@linaro.org \
    --to=philmd@linaro.org \
    --cc=aleksandar.rikalo@syrmia.com \
    --cc=eduardo@habkost.net \
    --cc=hpoussin@reactos.org \
    --cc=kraxel@redhat.com \
    --cc=marcel.apfelbaum@gmail.com \
    --cc=mark.cave-ayland@ilande.co.uk \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@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).