Skip to content

Commit

Permalink
iommu/sun50i: Remove unused variable
Browse files Browse the repository at this point in the history
The pte_dma variable in the unmap callback is set but never used. Remove
it.

Fixes: 4100b8c ("iommu: Add Allwinner H6 IOMMU driver")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Link: https://lore.kernel.org/r/20200628180844.79205-2-maxime@cerno.tech
Signed-off-by: Joerg Roedel <jroedel@suse.de>
  • Loading branch information
Maxime Ripard authored and Joerg Roedel committed Jun 30, 2020
1 parent bc8784f commit ce0fd38
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions drivers/iommu/sun50i-iommu.c
Original file line number Diff line number Diff line change
Expand Up @@ -556,7 +556,6 @@ static size_t sun50i_iommu_unmap(struct iommu_domain *domain, unsigned long iova
{
struct sun50i_iommu_domain *sun50i_domain = to_sun50i_domain(domain);
phys_addr_t pt_phys;
dma_addr_t pte_dma;
u32 *pte_addr;
u32 dte;

Expand All @@ -566,7 +565,6 @@ static size_t sun50i_iommu_unmap(struct iommu_domain *domain, unsigned long iova

pt_phys = sun50i_dte_get_pt_address(dte);
pte_addr = (u32 *)phys_to_virt(pt_phys) + sun50i_iova_get_pte_index(iova);
pte_dma = pt_phys + sun50i_iova_get_pte_index(iova) * PT_ENTRY_SIZE;

if (!sun50i_pte_is_page_valid(*pte_addr))
return 0;
Expand Down

0 comments on commit ce0fd38

Please sign in to comment.