qemu-ppc
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v4 0/4] hw/audio/pcspk: Inline pcspk_init()


From: Bernhard Beschow
Subject: Re: [PATCH v4 0/4] hw/audio/pcspk: Inline pcspk_init()
Date: Sun, 22 Oct 2023 22:23:14 +0000


Am 20. Oktober 2023 17:15:04 UTC schrieb "Philippe Mathieu-Daudé" 
<philmd@linaro.org>:
>Unfortunately v2 was merged as commit 40f8214fcd,
>so adapt v3 to clean the mess.
>
>Philippe Mathieu-Daudé (4):
>  hw/i386/pc: Pass Error** argument to pc_basic_device_init()
>  hw/i386/pc: Propagate error if HPET device creation failed
>  hw/i386/pc: Propagate error if PC_SPEAKER device creation failed

I'm not sure if I'd do these first three patches. The reason is that machines 
don't inherit from DeviceState and therefore don't have canonical methods such 
as realize() to propagate errors. Propagating the errors in the machine init 
helper methods seem a bit ad-hoc to me.

>  hw/isa/i82378: Propagate error if PC_SPEAKER device creation failed

The reason I suggested use of `errp` here is that it is already a parameter.

Best regards,
Bernhard

>
> include/hw/i386/pc.h |  5 +++--
> hw/i386/pc.c         | 15 +++++++++++----
> hw/i386/pc_piix.c    |  2 +-
> hw/i386/pc_q35.c     |  2 +-
> hw/isa/i82378.c      |  4 +++-
> 5 files changed, 19 insertions(+), 9 deletions(-)
>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]