iommu: remove redundant assignment to variable agaw
Subsystems (3)
PATCH 1/1 iommu: remove redundant assignment to variable agaw
From: Colin Ian King <[email protected]>
The variable agaw is initialized with a value that is never read and it is being updated later with a new value as a counter in a for-loop. The initialization is redundant and can be removed.
Addresses-Coverity: ("Unused value")
Signed-off-by Colin Ian King <[email protected]>
--- drivers/iommu/intel/iommu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iommu/intel/iommu.c +1 -1
@@ -564,7 +564,7 @@ static inline int domain_pfn_supported(struct dmar_domain *domain,static int __iommu_calculate_agaw (struct intel_iommu *iommu,int max_gaw) {unsigned long sagaw; -int agaw =-1 ; +int agaw; sagaw =cap_sagaw (iommu->cap); for (agaw = width_to_agaw(max_gaw);
Signature · 6 lines
2.30.2 _______________________________________________ iommu mailing list [email protected] https://lists.linuxfoundation.org/mailman/listinfo/iommu
Quoted 9 lines · Colin King
From: Colin Ian King<[email protected]>
The variable agaw is initialized with a value that is never read and it is being updated later with a new value as a counter in a for-loop. The initialization is redundant and can be removed.
Addresses-Coverity: ("Unused value")
Signed-off-by Colin Ian King<[email protected]>
Queued for v5.14. Thanks!
Best regards,
baolu