Re: [PATCH 1/2] iommu: Statically set module owner

From: Christoph Hellwig
Date: Fri Mar 19 2021 - 09:40:22 EST


On Fri, Mar 19, 2021 at 12:52:01PM +0000, Robin Murphy wrote:
> It happens that the 3 drivers which first supported being modular are
> also ones which play games with their pgsize_bitmap, so have non-const
> iommu_ops where dynamically setting the owner manages to work out OK.
> However, it's less than ideal to force that upon all drivers which want
> to be modular - like the new sprd-iommu driver which now has a potential
> bug in that regard - so let's just statically set the module owner and
> let ops remain const wherever possible.
>
> Signed-off-by: Robin Murphy <robin.murphy@xxxxxxx>
> ---
>
> This is something I hadn't got round to sending earlier, so now rebased
> onto iommu/next to accommodate the new driver :)

Ah, nice. That __iommu_device_set_ops dance always confused me.

Reviewed-by: Christoph Hellwig <hch@xxxxxx>