On 19/07/2021 10:32, Robin Murphy wrote:
7c1b058c8b5a31 Robin Murphy 2017-03-16 393 if (!dev)
^^^^
Old code has checks for NULL
I doubt that in practice we need this check.
Function iommu_dma_init_domain() is only called by
iommu_setup_dma_ops(). Furthermore, iommu_setup_dma_ops() calls
iommu_get_domain_for_dev(dev), which cannot safely handle dev == NULL
for when we call iommu_dma_init_domain() there. As such, the dev ==
NULL checks in iommu_dma_init_domain() are effectively redundant.
Indeed, I have a patch for that in the stack I'm preparing:
https://gitlab.arm.com/linux-arm/linux-rm/-/commit/9b6cf2a214107c153ee278b1664f688888d7328f
Cool, so how about please checking this series when you get a chance?
You did suggest this approach after all..
Thanks,
John
_______________________________________________
iommu mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/iommu