[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 02/12] omap: Don't use hw_error() in device init
From: |
Markus Armbruster |
Subject: |
Re: [Qemu-devel] [PATCH 02/12] omap: Don't use hw_error() in device init() methods |
Date: |
Thu, 10 Dec 2015 13:44:53 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) |
Peter Maydell <address@hidden> writes:
> On 10 December 2015 at 10:29, Markus Armbruster <address@hidden> wrote:
>> Device init() methods aren't supposed to call hw_error(), they should
>> report the error and fail cleanly. Do that.
>>
>> Cc: Peter Maydell <address@hidden>
>> Signed-off-by: Markus Armbruster <address@hidden>
>
> These are all really "QEMU bug" error paths -- the only place
> that uses omap_i2c is the omap SoC init, you can't create the
> device on the command line, and so we'll only get these errors
> if there's a bug in a function like omap2420_mpu_init. But
> I don't object to the patch in principle.
All callers use qdev_init_nofail(), so this patch merely converts the
hw_error() crash into an &error_abort crash. Improvement, because now
it crashes closer to where the bug is. I can spell that out in the
commit message if you like.
> Reviewed-by: Peter Maydell <address@hidden>
Thanks!
- Re: [Qemu-devel] [PATCH 08/12] isa: Trivially convert remaining PCI-ISA bridges to realize(), (continued)
- [Qemu-devel] [PATCH 05/12] raven: Mark use of hw_error() in realize() FIXME, Markus Armbruster, 2015/12/10
- [Qemu-devel] [PATCH 10/12] isa: Clean up inappropriate hw_error(), Markus Armbruster, 2015/12/10
- [Qemu-devel] [PATCH 02/12] omap: Don't use hw_error() in device init() methods, Markus Armbruster, 2015/12/10
- [Qemu-devel] [PATCH 04/12] etraxfs_eth: Don't use hw_error() in init() method, Markus Armbruster, 2015/12/10
- [Qemu-devel] [PATCH 01/12] hw: Don't use hw_error() for machine initialization errors, Markus Armbruster, 2015/12/10
- [Qemu-devel] [PATCH 03/12] arm_mptimer: Don't use hw_error() in realize() method, Markus Armbruster, 2015/12/10
- [Qemu-devel] [PATCH 06/12] hw/arm/virt: Fix property "gic-version" error handling, Markus Armbruster, 2015/12/10