linux-riscv.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] iommu/riscv: Fixup compile warning
@ 2025-01-03  2:46 guoren
  2025-01-06 10:31 ` Alexandre Ghiti
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: guoren @ 2025-01-03  2:46 UTC (permalink / raw)
  To: tjeznach
  Cc: joro, will, robin.murphy, paul.walmsley, palmer, baolu.lu,
	zong.li, iommu, linux-riscv, linux-kernel, Guo Ren, Guo Ren

From: Guo Ren <guoren@linux.alibaba.com>

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 <guoren@linux.alibaba.com>
Signed-off-by: Guo Ren <guoren@kernel.org>
Cc: Tomasz Jeznach <tjeznach@rivosinc.com>
---
 drivers/iommu/riscv/iommu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/iommu/riscv/iommu.c b/drivers/iommu/riscv/iommu.c
index 8a05def774bd..38d381164385 100644
--- a/drivers/iommu/riscv/iommu.c
+++ b/drivers/iommu/riscv/iommu.c
@@ -1270,7 +1270,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);
-- 
2.40.1


_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2025-02-03 21:45 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-03  2:46 [PATCH] iommu/riscv: Fixup compile warning guoren
2025-01-06 10:31 ` Alexandre Ghiti
2025-01-06 17:47   ` Samuel Holland
2025-01-08  6:47     ` Guo Ren
2025-01-10 20:48       ` Tomasz Jeznach
2025-01-10  2:44 ` Charlie Jenkins
2025-01-17  7:58 ` Joerg Roedel
2025-02-03 19:16 ` patchwork-bot+linux-riscv

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).