[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 2/3] hw/usb/hcd-xhci-pci: Abort if setting link property f
From: |
Markus Armbruster |
Subject: |
Re: [PATCH v2 2/3] hw/usb/hcd-xhci-pci: Abort if setting link property failed |
Date: |
Tue, 24 Aug 2021 14:05:39 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) |
Peter Maydell <peter.maydell@linaro.org> writes:
> On Tue, 24 Aug 2021 at 09:14, Markus Armbruster <armbru@redhat.com> wrote:
>> In functions with an Error **errp parameter, use of &error_fatal is
>> almost always wrong.
>
> What are the cases where it is not wrong?
I can't think of a use that isn't wrong. Doesn't mean no such use could
exist. Most rules have exceptions...
> My guess is "in board
> code and other places where the error handling would have been
> 'print a message and call exit()' anyway".
When you know that all callers handle errors like &error_fatal does, use
of &error_fatal doesn't produce wrong behavior. It's still kind of
wrong, because relying on such a non-local argument without a genuine
need is.
- [PATCH v2 0/3] hw/usb: Always expect 'dma' link property to be set to simplify, Philippe Mathieu-Daudé, 2021/08/19
- [PATCH v2 1/3] hw/pci: Introduce pci_dma_memory_region() helper, Philippe Mathieu-Daudé, 2021/08/19
- [PATCH v2 2/3] hw/usb/hcd-xhci-pci: Abort if setting link property failed, Philippe Mathieu-Daudé, 2021/08/19
- Re: [PATCH v2 2/3] hw/usb/hcd-xhci-pci: Abort if setting link property failed, Eduardo Habkost, 2021/08/23
- Re: [PATCH v2 2/3] hw/usb/hcd-xhci-pci: Abort if setting link property failed, Peter Maydell, 2021/08/24
- Re: [PATCH v2 2/3] hw/usb/hcd-xhci-pci: Abort if setting link property failed,
Markus Armbruster <=
- Re: [PATCH v2 2/3] hw/usb/hcd-xhci-pci: Abort if setting link property failed, Peter Maydell, 2021/08/24
- Re: [PATCH v2 2/3] hw/usb/hcd-xhci-pci: Abort if setting link property failed, Eduardo Habkost, 2021/08/24
- Re: [PATCH v2 2/3] hw/usb/hcd-xhci-pci: Abort if setting link property failed, Peter Maydell, 2021/08/24
- Re: [PATCH v2 2/3] hw/usb/hcd-xhci-pci: Abort if setting link property failed, Markus Armbruster, 2021/08/24
- Re: [PATCH v2 2/3] hw/usb/hcd-xhci-pci: Abort if setting link property failed, Markus Armbruster, 2021/08/24
- Re: [PATCH v2 2/3] hw/usb/hcd-xhci-pci: Abort if setting link property failed, Peter Maydell, 2021/08/24
- Re: [PATCH v2 2/3] hw/usb/hcd-xhci-pci: Abort if setting link property failed, Markus Armbruster, 2021/08/24
- Re: [PATCH v2 2/3] hw/usb/hcd-xhci-pci: Abort if setting link property failed, Peter Maydell, 2021/08/24
- Re: [PATCH v2 2/3] hw/usb/hcd-xhci-pci: Abort if setting link property failed, Markus Armbruster, 2021/08/25
[PATCH v2 3/3] hw/usb/xhci: Always expect 'dma' link property to be set, Philippe Mathieu-Daudé, 2021/08/19