Skip to content

Commit 10c62c3

Browse files
guoren83joergroedel
authored andcommitted
iommu/riscv: Fixup compile warning
When __BITS_PER_LONG == 32, size_t is defined as unsigned int rather than unsigned long. Therefore, we should use size_t to avoid type-checking errors. Fixes: 488ffbf ("iommu/riscv: Paging domain support") Signed-off-by: Guo Ren <[email protected]> Signed-off-by: Guo Ren <[email protected]> Cc: Tomasz Jeznach <[email protected]> Reviewed-by: Charlie Jenkins <[email protected]> Reviewed-by: Tomasz Jeznach <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Joerg Roedel <[email protected]>
1 parent 77a4419 commit 10c62c3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/iommu/riscv/iommu.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1278,7 +1278,7 @@ static phys_addr_t riscv_iommu_iova_to_phys(struct iommu_domain *iommu_domain,
12781278
dma_addr_t iova)
12791279
{
12801280
struct riscv_iommu_domain *domain = iommu_domain_to_riscv(iommu_domain);
1281-
unsigned long pte_size;
1281+
size_t pte_size;
12821282
unsigned long *ptr;
12831283

12841284
ptr = riscv_iommu_pte_fetch(domain, iova, &pte_size);

0 commit comments

Comments
 (0)