From: "Philippe Mathieu-Daudé" <philmd@redhat.com>
To: Markus Armbruster <armbru@redhat.com>,
Eduardo Habkost <ehabkost@redhat.com>
Cc: Peter Maydell <peter.maydell@linaro.org>,
Sergio Lopez <slp@redhat.com>,
"Michael S. Tsirkin" <mst@redhat.com>,
Richard Henderson <richard.henderson@linaro.org>,
qemu-devel@nongnu.org, Gerd Hoffmann <kraxel@redhat.com>,
Paolo Bonzini <pbonzini@redhat.com>
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 [thread overview]
Message-ID: <04d64e04-b1cc-0035-c9f4-13b843826c93@redhat.com> (raw)
In-Reply-To: <eb59236e-bd14-5916-0ffc-ea0fce0db00b@redhat.com>
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...
next prev parent reply other threads:[~2021-08-24 9:01 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-19 17:15 [PATCH v2 0/3] hw/usb: Always expect 'dma' link property to be set to simplify Philippe Mathieu-Daudé
2021-08-19 17:15 ` [PATCH v2 1/3] hw/pci: Introduce pci_dma_memory_region() helper Philippe Mathieu-Daudé
2021-08-19 17:15 ` [PATCH v2 2/3] hw/usb/hcd-xhci-pci: Abort if setting link property failed Philippe Mathieu-Daudé
2021-08-23 18:34 ` Eduardo Habkost
2021-08-24 8:13 ` Markus Armbruster
2021-08-24 8:35 ` Philippe Mathieu-Daudé
2021-08-24 8:46 ` Philippe Mathieu-Daudé [this message]
2021-08-24 9:19 ` Peter Maydell
2021-08-24 12:05 ` Markus Armbruster
2021-08-24 12:16 ` Peter Maydell
2021-08-24 13:57 ` Eduardo Habkost
2021-08-24 14:24 ` Peter Maydell
2021-08-24 14:29 ` Markus Armbruster
2021-08-24 14:27 ` Markus Armbruster
2021-08-24 14:30 ` Peter Maydell
2021-08-24 15:15 ` Markus Armbruster
2021-08-24 15:19 ` Peter Maydell
2021-08-25 7:48 ` Markus Armbruster
2021-08-19 17:15 ` [PATCH v2 3/3] hw/usb/xhci: Always expect 'dma' link property to be set Philippe Mathieu-Daudé
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=04d64e04-b1cc-0035-c9f4-13b843826c93@redhat.com \
--to=philmd@redhat.com \
--cc=armbru@redhat.com \
--cc=ehabkost@redhat.com \
--cc=kraxel@redhat.com \
--cc=mst@redhat.com \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=richard.henderson@linaro.org \
--cc=slp@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).