Re: [PATCH RFC 03/17] of: Use -ENODEV consistently in of_iommu_configure()

2023-11-08 Thread Rob Herring
On Fri, Nov 03, 2023 at 01:44:48PM -0300, Jason Gunthorpe wrote: > Instead of returning 1 and trying to handle positive error codes just > stick to the convention of returning -ENODEV. Remove references to ops > from of_iommu_configure(), a NULL ops will already generate an error code. nit:

Re: [PATCH RFC 03/17] of: Use -ENODEV consistently in of_iommu_configure()

2023-11-05 Thread Jason Gunthorpe
On Fri, Nov 03, 2023 at 03:03:53PM -0700, Jerry Snitselaar wrote: > With this the following can be simplified in of_iommu_configure_dev_id: > > diff --git a/drivers/iommu/of_iommu.c b/drivers/iommu/of_iommu.c > index 4f77495a2543..b9b995712029 100644 > --- a/drivers/iommu/of_iommu.c > +++

Re: [PATCH RFC 03/17] of: Use -ENODEV consistently in of_iommu_configure()

2023-11-03 Thread Jerry Snitselaar
On Fri, Nov 03, 2023 at 01:44:48PM -0300, Jason Gunthorpe wrote: > Instead of returning 1 and trying to handle positive error codes just > stick to the convention of returning -ENODEV. Remove references to ops > from of_iommu_configure(), a NULL ops will already generate an error code. > > There

[PATCH RFC 03/17] of: Use -ENODEV consistently in of_iommu_configure()

2023-11-03 Thread Jason Gunthorpe
Instead of returning 1 and trying to handle positive error codes just stick to the convention of returning -ENODEV. Remove references to ops from of_iommu_configure(), a NULL ops will already generate an error code. There is no reason to check dev->bus, if err=0 at this point then the called