[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH-for-5.2 v4] hw/core/qdev: Increase qdev_realize() kindness
From: |
Paolo Bonzini |
Subject: |
Re: [PATCH-for-5.2 v4] hw/core/qdev: Increase qdev_realize() kindness |
Date: |
Thu, 30 Jul 2020 00:25:10 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.9.0 |
On 29/07/20 09:39, Markus Armbruster wrote:
> Taking a step back, I disagree with the notion that assertions should be
> avoided just because we have an Error **. A programming error doesn't
> become less wrong, and continuing when the program is in disorder
> doesn't become any safer when you add an Error ** parameter to a
> function.
I don't think it is actually unsafe to continue after passing a bus-less
device with a bus_type to qdev_realize. It will fail, but orderly.
So even though it's a programming error, it should not be a big deal to
avoid the assertion here: either the caller will pass &error_abort, or
it will print a nice error message and let the user go on with their
business.
I'm not particularly attached to the change, but it seemed inconsistent
to use error_setg(&error_abort).
Paolo
- [PATCH-for-5.2 v4] hw/core/qdev: Increase qdev_realize() kindness, Philippe Mathieu-Daudé, 2020/07/27
- Re: [PATCH-for-5.2 v4] hw/core/qdev: Increase qdev_realize() kindness, Markus Armbruster, 2020/07/28
- Re: [PATCH-for-5.2 v4] hw/core/qdev: Increase qdev_realize() kindness, Paolo Bonzini, 2020/07/28
- Re: [PATCH-for-5.2 v4] hw/core/qdev: Increase qdev_realize() kindness, Markus Armbruster, 2020/07/29
- Re: [PATCH-for-5.2 v4] hw/core/qdev: Increase qdev_realize() kindness, Philippe Mathieu-Daudé, 2020/07/29
- Re: [PATCH-for-5.2 v4] hw/core/qdev: Increase qdev_realize() kindness, Markus Armbruster, 2020/07/29
- Re: [PATCH-for-5.2 v4] hw/core/qdev: Increase qdev_realize() kindness, Philippe Mathieu-Daudé, 2020/07/29
- Re: [PATCH-for-5.2 v4] hw/core/qdev: Increase qdev_realize() kindness, Markus Armbruster, 2020/07/29
- Re: [PATCH-for-5.2 v4] hw/core/qdev: Increase qdev_realize() kindness,
Paolo Bonzini <=
- Re: [PATCH-for-5.2 v4] hw/core/qdev: Increase qdev_realize() kindness, Markus Armbruster, 2020/07/30