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

Andy Shevchenko andy.shevchenko at gmail.com
Sat Jun 22 15:23:18 PDT 2024


On Fri, Jun 21, 2024 at 8:47 PM Robin Murphy <robin.murphy at arm.com> 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



More information about the linux-arm-kernel mailing list