]> Git Repo - linux.git/commitdiff
iommu/sun50i: Fix set-but-not-used variable warning
authorJoerg Roedel <[email protected]>
Fri, 4 Sep 2020 11:39:06 +0000 (13:39 +0200)
committerJoerg Roedel <[email protected]>
Fri, 4 Sep 2020 11:39:45 +0000 (13:39 +0200)
Fix the following warning the the SUN50I driver:

   drivers/iommu/sun50i-iommu.c: In function 'sun50i_iommu_irq':
   drivers/iommu/sun50i-iommu.c:890:14: warning: variable 'iova' set but not used [-Wunused-but-set-variable]
     890 |  phys_addr_t iova;
         |              ^~~~

Reported-by: kernel test robot <[email protected]>
Signed-off-by: Joerg Roedel <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Joerg Roedel <[email protected]>
drivers/iommu/sun50i-iommu.c

index 3b1bf2fb94f59524ed55053aa915c8985b98a111..ea6db134191652472d58fcfab92b3e40c1c7c717 100644 (file)
@@ -881,7 +881,6 @@ static phys_addr_t sun50i_iommu_handle_perm_irq(struct sun50i_iommu *iommu)
 static irqreturn_t sun50i_iommu_irq(int irq, void *dev_id)
 {
        struct sun50i_iommu *iommu = dev_id;
-       phys_addr_t iova;
        u32 status;
 
        spin_lock(&iommu->iommu_lock);
@@ -893,15 +892,15 @@ static irqreturn_t sun50i_iommu_irq(int irq, void *dev_id)
        }
 
        if (status & IOMMU_INT_INVALID_L2PG)
-               iova = sun50i_iommu_handle_pt_irq(iommu,
-                                                 IOMMU_INT_ERR_ADDR_L2_REG,
-                                                 IOMMU_L2PG_INT_REG);
+               sun50i_iommu_handle_pt_irq(iommu,
+                                           IOMMU_INT_ERR_ADDR_L2_REG,
+                                           IOMMU_L2PG_INT_REG);
        else if (status & IOMMU_INT_INVALID_L1PG)
-               iova = sun50i_iommu_handle_pt_irq(iommu,
-                                                 IOMMU_INT_ERR_ADDR_L1_REG,
-                                                 IOMMU_L1PG_INT_REG);
+               sun50i_iommu_handle_pt_irq(iommu,
+                                          IOMMU_INT_ERR_ADDR_L1_REG,
+                                          IOMMU_L1PG_INT_REG);
        else
-               iova = sun50i_iommu_handle_perm_irq(iommu);
+               sun50i_iommu_handle_perm_irq(iommu);
 
        iommu_write(iommu, IOMMU_INT_CLR_REG, status);
 
This page took 0.059253 seconds and 4 git commands to generate.