iommu/amd: remove redundant assignment to variable npages
Subsystems (2)
PATCH 1/1 iommu/amd: remove redundant assignment to variable npages
From: Colin Ian King <[email protected]>
The variable npages is being initialized however this is never read and later it is being reassigned to a new value. The initialization is redundant and hence can be removed.
Addresses-Coverity: ("Unused Value")
Signed-off-by Colin Ian King <[email protected]>
--- drivers/iommu/amd_iommu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iommu/amd_iommu.c +1 -1
@@ -2609,7 +2609,7 @@ static void unmap_sg(struct device *dev, struct scatterlist *sglist,struct protection_domain *domain;struct dma_ops_domain *dma_dom;unsigned long startaddr; -int npages =2 ; +int npages; domain =get_domain (dev);if (IS_ERR (domain))
Signature · 1 line
2.20.1
Quoted 11 lines · Colin King
From: Colin Ian King <[email protected]>
The variable npages is being initialized however this is never read and later it is being reassigned to a new value. The initialization is redundant and hence can be removed.
Addresses-Coverity: ("Unused Value")
Signed-off-by Colin Ian King <[email protected]>--- drivers/iommu/amd_iommu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Applied, thanks.