@@ -252,8 +252,8 @@ static u32 *alloc_l2_pt(struct ipu6_mmu_info *mmu_info)
return pt;
}
-static size_t l2_unmap(struct ipu6_mmu_info *mmu_info, unsigned long iova,
- phys_addr_t dummy, size_t size)
+static void l2_unmap(struct ipu6_mmu_info *mmu_info, unsigned long iova,
+ phys_addr_t dummy, size_t size)
{
unsigned int l2_entries;
unsigned int l2_idx;
@@ -297,7 +297,6 @@ static size_t l2_unmap(struct ipu6_mmu_info *mmu_info, unsigned long iova,
WARN_ON_ONCE(size);
spin_unlock_irqrestore(&mmu_info->lock, flags);
- return l2_entries << ISP_PAGE_SHIFT;
}
static int l2_map(struct ipu6_mmu_info *mmu_info, unsigned long iova,
@@ -402,8 +401,8 @@ static int __ipu6_mmu_map(struct ipu6_mmu_info *mmu_info, unsigned long iova,
return l2_map(mmu_info, iova_start, paddr, size);
}
-static size_t __ipu6_mmu_unmap(struct ipu6_mmu_info *mmu_info,
- unsigned long iova, size_t size)
+static void __ipu6_mmu_unmap(struct ipu6_mmu_info *mmu_info,
+ unsigned long iova, size_t size)
{
return l2_unmap(mmu_info, iova, 0, size);
}
@@ -645,8 +644,8 @@ phys_addr_t ipu6_mmu_iova_to_phys(struct ipu6_mmu_info *mmu_info,
return phy_addr;
}
-size_t ipu6_mmu_unmap(struct ipu6_mmu_info *mmu_info, unsigned long iova,
- size_t size)
+void ipu6_mmu_unmap(struct ipu6_mmu_info *mmu_info, unsigned long iova,
+ size_t size)
{
unsigned int min_pagesz;
@@ -663,7 +662,7 @@ size_t ipu6_mmu_unmap(struct ipu6_mmu_info *mmu_info, unsigned long iova,
if (!IS_ALIGNED(iova | size, min_pagesz)) {
dev_err(NULL, "unaligned: iova 0x%lx size 0x%zx min_pagesz 0x%x\n",
iova, size, min_pagesz);
- return 0;
+ return;
}
return __ipu6_mmu_unmap(mmu_info, iova, size);
@@ -66,8 +66,8 @@ int ipu6_mmu_hw_init(struct ipu6_mmu *mmu);
void ipu6_mmu_hw_cleanup(struct ipu6_mmu *mmu);
int ipu6_mmu_map(struct ipu6_mmu_info *mmu_info, unsigned long iova,
phys_addr_t paddr, size_t size);
-size_t ipu6_mmu_unmap(struct ipu6_mmu_info *mmu_info, unsigned long iova,
- size_t size);
+void ipu6_mmu_unmap(struct ipu6_mmu_info *mmu_info, unsigned long iova,
+ size_t size);
phys_addr_t ipu6_mmu_iova_to_phys(struct ipu6_mmu_info *mmu_info,
dma_addr_t iova);
#endif
The DMA unmap API is not supposed to return value. Thus this patch changes the ipu6_mmu_unmap() as a void function and DMA unmapping didn't check the return value. Signed-off-by: Bingbu Cao <bingbu.cao@intel.com> --- drivers/media/pci/intel/ipu6/ipu6-mmu.c | 15 +++++++-------- drivers/media/pci/intel/ipu6/ipu6-mmu.h | 4 ++-- 2 files changed, 9 insertions(+), 10 deletions(-)