Re: [PATCH v2 2/3] hw/usb/hcd-xhci-pci: Abort if setting link property failed

2021-08-25 Thread Markus Armbruster
Peter Maydell writes: > On Tue, 24 Aug 2021 at 16:15, Markus Armbruster wrote: >> True, except when I called it "kind of wrong", I was still talking about >> functions with an Error **errp parameter. > > Oh yes, so you were. I even quoted your sentence starting > "In functions with an Error

Re: [PATCH v2 2/3] hw/usb/hcd-xhci-pci: Abort if setting link property failed

2021-08-24 Thread Peter Maydell
On Tue, 24 Aug 2021 at 16:15, Markus Armbruster wrote: > True, except when I called it "kind of wrong", I was still talking about > functions with an Error **errp parameter. Oh yes, so you were. I even quoted your sentence starting "In functions with an Error **errp parameter ...". I must have

Re: [PATCH v2 2/3] hw/usb/hcd-xhci-pci: Abort if setting link property failed

2021-08-24 Thread Markus Armbruster
Peter Maydell writes: > On Tue, 24 Aug 2021 at 15:27, Markus Armbruster wrote: >> >> Peter Maydell writes: >> >> > On Tue, 24 Aug 2021 at 13:05, Markus Armbruster wrote: >> >> When you know that all callers handle errors like _fatal does, use >> >> of _fatal doesn't produce wrong behavior.

Re: [PATCH v2 2/3] hw/usb/hcd-xhci-pci: Abort if setting link property failed

2021-08-24 Thread Peter Maydell
On Tue, 24 Aug 2021 at 15:27, Markus Armbruster wrote: > > Peter Maydell writes: > > > On Tue, 24 Aug 2021 at 13:05, Markus Armbruster wrote: > >> When you know that all callers handle errors like _fatal does, use > >> of _fatal doesn't produce wrong behavior. It's still kind of > >> wrong,

Re: [PATCH v2 2/3] hw/usb/hcd-xhci-pci: Abort if setting link property failed

2021-08-24 Thread Markus Armbruster
Eduardo Habkost writes: > On Tue, Aug 24, 2021 at 01:16:40PM +0100, Peter Maydell wrote: >> On Tue, 24 Aug 2021 at 13:05, Markus Armbruster wrote: >> > When you know that all callers handle errors like _fatal does, use >> > of _fatal doesn't produce wrong behavior. It's still kind of >> >

Re: [PATCH v2 2/3] hw/usb/hcd-xhci-pci: Abort if setting link property failed

2021-08-24 Thread Markus Armbruster
Peter Maydell writes: > On Tue, 24 Aug 2021 at 13:05, Markus Armbruster wrote: >> When you know that all callers handle errors like _fatal does, use >> of _fatal doesn't produce wrong behavior. It's still kind of >> wrong, because relying on such a non-local argument without a genuine >> need

Re: [PATCH v2 2/3] hw/usb/hcd-xhci-pci: Abort if setting link property failed

2021-08-24 Thread Peter Maydell
On Tue, 24 Aug 2021 at 14:58, Eduardo Habkost wrote: > > On Tue, Aug 24, 2021 at 01:16:40PM +0100, Peter Maydell wrote: > > On Tue, 24 Aug 2021 at 13:05, Markus Armbruster wrote: > > > When you know that all callers handle errors like _fatal does, use > > > of _fatal doesn't produce wrong

Re: [PATCH v2 2/3] hw/usb/hcd-xhci-pci: Abort if setting link property failed

2021-08-24 Thread Eduardo Habkost
On Tue, Aug 24, 2021 at 01:16:40PM +0100, Peter Maydell wrote: > On Tue, 24 Aug 2021 at 13:05, Markus Armbruster wrote: > > When you know that all callers handle errors like _fatal does, use > > of _fatal doesn't produce wrong behavior. It's still kind of > > wrong, because relying on such a

Re: [PATCH v2 2/3] hw/usb/hcd-xhci-pci: Abort if setting link property failed

2021-08-24 Thread Peter Maydell
On Tue, 24 Aug 2021 at 13:05, Markus Armbruster wrote: > When you know that all callers handle errors like _fatal does, use > of _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. Not using error_fatal

Re: [PATCH v2 2/3] hw/usb/hcd-xhci-pci: Abort if setting link property failed

2021-08-24 Thread Markus Armbruster
Peter Maydell writes: > On Tue, 24 Aug 2021 at 09:14, Markus Armbruster wrote: >> In functions with an Error **errp parameter, use of _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.

Re: [PATCH v2 2/3] hw/usb/hcd-xhci-pci: Abort if setting link property failed

2021-08-24 Thread Peter Maydell
On Tue, 24 Aug 2021 at 09:14, Markus Armbruster wrote: > In functions with an Error **errp parameter, use of _fatal is > almost always wrong. What are the cases where it is not wrong? My guess is "in board code and other places where the error handling would have been 'print a message and call

Re: [PATCH v2 2/3] hw/usb/hcd-xhci-pci: Abort if setting link property failed

2021-08-24 Thread Philippe Mathieu-Daudé
On 8/24/21 10:35 AM, Philippe Mathieu-Daudé wrote: > On 8/24/21 10:13 AM, Markus Armbruster wrote: >> Eduardo Habkost 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'

Re: [PATCH v2 2/3] hw/usb/hcd-xhci-pci: Abort if setting link property failed

2021-08-24 Thread Philippe Mathieu-Daudé
On 8/24/21 10:13 AM, Markus Armbruster wrote: > Eduardo Habkost 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:

Re: [PATCH v2 2/3] hw/usb/hcd-xhci-pci: Abort if setting link property failed

2021-08-24 Thread Markus Armbruster
Eduardo Habkost 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é >> --- >> hw/usb/hcd-xhci-pci.c | 2

Re: [PATCH v2 2/3] hw/usb/hcd-xhci-pci: Abort if setting link property failed

2021-08-23 Thread Eduardo Habkost
+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é > --- > hw/usb/hcd-xhci-pci.c | 2 +- > 1 file changed, 1 insertion(+),

[PATCH v2 2/3] hw/usb/hcd-xhci-pci: Abort if setting link property failed

2021-08-19 Thread Philippe Mathieu-Daudé
Do not ignore eventual error if we failed at setting the 'host' property of the TYPE_XHCI model. Signed-off-by: Philippe Mathieu-Daudé --- 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