On Mon, 21 Aug 2017 17:30:58 +0200 Halil Pasic <pa...@linux.vnet.ibm.com> wrote:
> On 08/21/2017 05:17 PM, Thomas Huth wrote: > > On 21.08.2017 17:10, Halil Pasic wrote: > > [...] > >> The situation is just complicated by the fact that there is code which > >> relies on assert(true) asserting for correctness (e.g. virtio goes so far > >> to make builds with normal asserts disabled fail). Thus for me it's hard > >> to assume that the assertion is guaranteed to be disabled in production. > > > > FYI: https://lists.gnu.org/archive/html/qemu-devel/2017-08/msg03608.html > > > > Thomas > > > > Thanks, I've missed that. With that assumed it becomes either > assert(false) or return -ENODEV but not both. > > Regards, > Halil > Thinking about this some more, this seems to be completely covered within the next statement: - For builds with pci completely disabled, we'll end up with NULL in both s390_get_phb() and s390_pci_find_dev_by_idx() and return -ENODEV. - If only the zpci facility bit is not set, we'll hit the assert in s390_get_phb(). Without an error message, there does not really seem to be additional value (other than failing explicitly), so I'll drop this patch. (Yeah, deja vu...)