Re: [PATCH v2 3/4] OF: Simplify of_iommu_configure()

From: Andy Shevchenko
Date: Sat Jun 22 2024 - 18:24:07 EST


On Fri, Jun 21, 2024 at 8:47 PM Robin Murphy <robin.murphy@xxxxxxx> wrote:
>
> We no longer have a notion of partially-initialised fwspecs existing,
> and we also no longer need to use an iommu_ops pointer to return status
> to of_dma_configure(). Clean up the remains of those, which lends itself
> to clarifying the logic around the dma_range_map allocation as well.

...

> + if (!err && dev->bus)
> + err = iommu_probe_device(dev);
>
> + if (err && err != -EPROBE_DEFER)
> + dev_dbg(dev, "Adding to IOMMU failed: %d\n", err);

Hmm... I'm wondering if dev_err_probe() can be used here.

> return err;

...

> + dev_dbg(dev, "device is%sbehind an iommu\n",
> + !ret ? " " : " not ");

Why not a positive test?

--
With Best Regards,
Andy Shevchenko