Re: [PATCH v1] iommu/vt-d: Remove dead code in intel_iommu_domain_alloc_paging_flags()
From: Jason Gunthorpe
Date: Tue Jun 03 2025 - 11:07:57 EST
On Fri, May 30, 2025 at 05:13:25PM +0800, Wei Wang wrote:
> When dirty_tracking is enabled, first_stage is set to false to use the
> second stage translation table. dmar_domain->use_first_level, which is
> assigned from first_page, is guaranteed to be false when the execution
> reaches the location of the code to be removed by this patch. So the
> handling for dmar_domain->use_first_level being true there will never
> be executed.
>
> Signed-off-by: Wei Wang <wei.w.wang@xxxxxxxxx>
> ---
> drivers/iommu/intel/iommu.c | 7 +------
> 1 file changed, 1 insertion(+), 6 deletions(-)
Reviewed-by: Jason Gunthorpe <jgg@xxxxxxxxxx>
I noticed this too
Jason