[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: |
Philippe Mathieu-Daudé |
Subject: |
Re: [PATCH v2 2/3] hw/usb/hcd-xhci-pci: Abort if setting link property failed |
Date: |
Tue, 24 Aug 2021 10:46:21 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 |
On 8/24/21 10:35 AM, Philippe Mathieu-Daudé wrote:
> On 8/24/21 10:13 AM, Markus Armbruster wrote:
>> Eduardo Habkost <ehabkost@redhat.com> writes:
>>
>>> +Markus
>>>
>>> On Thu, Aug 19, 2021 at 07:15:46PM +0200, Philippe Mathieu-Daudé wrote:
>>>> Do not ignore eventual error if we failed at setting the 'host'
>>>> property of the TYPE_XHCI model.
>>>>
>>>> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
>>>> ---
>>>> hw/usb/hcd-xhci-pci.c | 2 +-
>>>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>>>
>>>> diff --git a/hw/usb/hcd-xhci-pci.c b/hw/usb/hcd-xhci-pci.c
>>>> index e934b1a5b1f..71f6629ccde 100644
>>>> --- a/hw/usb/hcd-xhci-pci.c
>>>> +++ b/hw/usb/hcd-xhci-pci.c
>>>> @@ -115,7 +115,7 @@ static void usb_xhci_pci_realize(struct PCIDevice
>>>> *dev, Error **errp)
>>>> dev->config[PCI_CACHE_LINE_SIZE] = 0x10;
>>>> dev->config[0x60] = 0x30; /* release number */
>>>>
>>>> - object_property_set_link(OBJECT(&s->xhci), "host", OBJECT(s), NULL);
>>>> + object_property_set_link(OBJECT(&s->xhci), "host", OBJECT(s),
>>>> &error_fatal);
>>>
>>> If this fails, it's due to programmer error, isn't? Shouldn't we
>>> use &error_abort on that case?
>>
>> I think so.
>>
>> In functions with an Error **errp parameter, use of &error_fatal is
>> almost always wrong.
Having used 'abort' in the subject, no clue why I used &error_fatal
then...
- [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, 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, 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