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 <guoren@linux.alibaba.com> Signed-off-by: Guo Ren <guoren@kernel.org> Cc: Tomasz Jeznach <tjeznach@rivosinc.com> Reviewed-by: Charlie Jenkins <charlie@rivosinc.com> Reviewed-by: Tomasz Jeznach <tjeznach@rivosinc.com> Link: https://lore.kernel.org/r/20250103024616.3359159-1-guoren@kernel.org Signed-off-by: Joerg Roedel <jroedel@suse.de>
1 parent 77a4419 commit 10c62c3

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

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)