Re: [PATCH v5 2/2] s390/pci: Migrate s390 IRQ logic to IRQ domain API

Heiko Carstens
2025-11-21T14:03:22Z

On Fri, Nov 21, 2025 at 02:27:38PM +0100, Gerd Bayer wrote:
> > bus = pci_create_root_bus(NULL, ZPCI_BUS_NR, ops, zbus, &zbus->resources);
> > - if (!bus) {
> > - zpci_free_domain(zbus->domain_nr);
> > - return -EFAULT;
> > - }
> > + if (!bus)
> > + goto out_remove_msi_domain;
>
> Or do you want to set rc to -EFAULT here, and return the "original" rc
> in the error exits?
>
> >
> > zbus->bus = bus;
> > + dev_set_msi_domain(&zbus->bus->dev, zbus->msi_parent_domain);
> >
> > return 0;
> > +
> > +out_remove_msi_domain:
> > + zpci_remove_parent_msi_domain(zbus);
> > +out_free_domain:
> > + zpci_free_domain(zbus->domain_nr);
> > + return -EFAULT;
> > }

Oh, just realized this oddity with Gerd's reply: -EFAULT should _only_ be used
for page faults. Looks like this return code is not passed to user space, but
please change this to something more appropriate. E.g. -ENOMEM, or whatever
fits here.

Given that Gerd had quite a few more comments, please send a new version with
my comments also addressed :)