Re: [PATCH] iommu: Remove redundant null check in iommu_iotlb_gather_queued

From: Robin Murphy
Date: Mon Nov 24 2025 - 12:16:44 EST


On 2025-11-24 5:03 pm, Will Deacon wrote:
On Mon, Nov 10, 2025 at 09:19:52PM -0800, Aashish Sharma wrote:
The callers of 'iommu_iotlb_gather_queued' always have a non-null
'gather', so we don't need to check for the same in the function.

That's not obviously true to me, how did you check it?

For example, msm_iommu_pagetable_unmap() appears to call into
io_pgtable_ops::unmap_pages() with a NULL gather pointer.

Indeed I think the only redundant check is the one which seems to have snuck into __arm_lpae_unmap() not so long ago (which the other callers never had and still don't.)

Thanks,
Robin.