[PATCH] ARM/dma-mapping: Pass (void *) to virt_to_page()
Linus Walleij
linus.walleij at linaro.org
Tue May 17 00:15:30 PDT 2022
Pointers to virtual memory functions are (void *) but the
__dma_update_pte() function is passing an unsigned long.
Fix this up by explicit cast.
Signed-off-by: Linus Walleij <linus.walleij at linaro.org>
---
arch/arm/mm/dma-mapping.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/mm/dma-mapping.c b/arch/arm/mm/dma-mapping.c
index 82ffac621854..4ca3f717b067 100644
--- a/arch/arm/mm/dma-mapping.c
+++ b/arch/arm/mm/dma-mapping.c
@@ -440,7 +440,7 @@ void __init dma_contiguous_remap(void)
static int __dma_update_pte(pte_t *pte, unsigned long addr, void *data)
{
- struct page *page = virt_to_page(addr);
+ struct page *page = virt_to_page((void *)addr);
pgprot_t prot = *(pgprot_t *)data;
set_pte_ext(pte, mk_pte(page, prot), 0);
--
2.35.1
More information about the linux-arm-kernel
mailing list