From: Guo Ren Date: Fri, 3 Jan 2025 02:46:16 +0000 (-0500) Subject: iommu/riscv: Fixup compile warning X-Git-Tag: v6.14-rc1~116^2^6 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=10c62c38b073ecea775b7e23fa7c7a3995a84ff3;p=thirdparty%2Flinux.git 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: 488ffbf18171 ("iommu/riscv: Paging domain support") Signed-off-by: Guo Ren Signed-off-by: Guo Ren Cc: Tomasz Jeznach Reviewed-by: Charlie Jenkins Reviewed-by: Tomasz Jeznach Link: https://lore.kernel.org/r/20250103024616.3359159-1-guoren@kernel.org Signed-off-by: Joerg Roedel --- diff --git a/drivers/iommu/riscv/iommu.c b/drivers/iommu/riscv/iommu.c index 670b4302aca83..8f049d4a0e2cb 100644 --- a/drivers/iommu/riscv/iommu.c +++ b/drivers/iommu/riscv/iommu.c @@ -1278,7 +1278,7 @@ static phys_addr_t riscv_iommu_iova_to_phys(struct iommu_domain *iommu_domain, dma_addr_t iova) { struct riscv_iommu_domain *domain = iommu_domain_to_riscv(iommu_domain); - unsigned long pte_size; + size_t pte_size; unsigned long *ptr; ptr = riscv_iommu_pte_fetch(domain, iova, &pte_size);