iommu/fsl-pamu: Fix uninitialized variable warning
Joerg Roedel
maintainerPATCH 1/1 iommu/fsl-pamu: Fix uninitialized variable warning
From: Joerg Roedel <[email protected]>
The variable 'i' in the function update_liodn_stash() is not initialized and only used in a debug printk(). So it has no meaning at all, remove it.
Reported-by kernel test robot <[email protected]>
Signed-off-by Joerg Roedel <[email protected]>
--- drivers/iommu/fsl_pamu_domain.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/iommu/fsl_pamu_domain.c +2 -3
@@ -57,14 +57,13 @@ static int __init iommu_init_mempool(void)static int update_liodn_stash (int liodn,struct fsl_dma_domain *dma_domain,u32 val) { -int ret =0 , i; +int ret =0 ;unsigned long flags;spin_lock_irqsave (&iommu_lock, flags); ret =pamu_update_paace_stash (liodn, val);if (ret) { -pr_debug ("Failed to update SPAACE %d field for liodn %d\n " , - i, liodn); +pr_debug ("Failed to update SPAACE for liodn %d\n " , liodn);spin_unlock_irqrestore (&iommu_lock, flags);return ret; }
Signature · 1 line
2.30.2
Quoted 8 lines · Joerg Roedel
From: Joerg Roedel <[email protected]>
The variable 'i' in the function
update_liodn_stash()is not initialized and only used in a debugprintk(). So it has no meaning at all, remove it.Reported-by kernel test robot <[email protected]>Signed-off-by Joerg Roedel <[email protected]>
Sorry for introducing this. The fix looks good:
Reviewed-by Christoph Hellwig <[email protected]>
_______________________________________________
iommu mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/iommu