Skip to content

Commit

Permalink
iommu/fsl-pamu: Fix uninitialized variable warning
Browse files Browse the repository at this point in the history
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]>
Reviewed-by: Christoph Hellwig <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
  • Loading branch information
joergroedel committed Apr 15, 2021
1 parent 7876a83 commit 84b6269
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions drivers/iommu/fsl_pamu_domain.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 84b6269

Please sign in to comment.