Re: [PATCH] pci: Abort if pci_add_capability fails

2022-08-31 Thread Akihiko Odaki
On Wed, Aug 31, 2022 at 5:18 PM Markus Armbruster wrote: > > Alex Williamson writes: > > > On Tue, 30 Aug 2022 13:37:35 +0200 > > Markus Armbruster wrote: > >>if (!offset) { > >>offset = pci_find_space(pdev, size); > >>/* out of PCI config space is programming

Re: [PATCH] pci: Abort if pci_add_capability fails

2022-08-31 Thread Markus Armbruster
Alex Williamson writes: > On Tue, 30 Aug 2022 13:37:35 +0200 > Markus Armbruster wrote: >>if (!offset) { >>offset = pci_find_space(pdev, size); >>/* out of PCI config space is programming error */ >>assert(offset); >>} else { >>/*

Re: [PATCH] pci: Abort if pci_add_capability fails

2022-08-30 Thread Alex Williamson
On Tue, 30 Aug 2022 13:37:35 +0200 Markus Armbruster wrote: >if (!offset) { >offset = pci_find_space(pdev, size); >/* out of PCI config space is programming error */ >assert(offset); >} else { >/* Verify that capabilities don't

Re: [PATCH] pci: Abort if pci_add_capability fails

2022-08-30 Thread Markus Armbruster
Alex, got a question for you below. 小田喜陽彦 writes: > From: Akihiko Odaki > > pci_add_capability appears most PCI devices. The error handling required > lots of code, and led to inconsistent behaviors such as: > - passing error_abort > - passing error_fatal > - asserting the returned value > -

[PATCH] pci: Abort if pci_add_capability fails

2022-08-29 Thread 小田喜陽彦
From: Akihiko Odaki pci_add_capability appears most PCI devices. The error handling required lots of code, and led to inconsistent behaviors such as: - passing error_abort - passing error_fatal - asserting the returned value - propagating the error to the caller - skipping the rest of the