From: Linus Walleij Date: Wed, 31 Aug 2022 12:28:02 +0000 (+0100) Subject: ARM: 9240/1: dma-mapping: Pass (void *) to virt_to_page() X-Git-Tag: v6.6.17~5934^2~34 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8770b9e575ce5727b4f95b6bcb086247dcce4eb3;p=platform%2Fkernel%2Flinux-rpi.git ARM: 9240/1: dma-mapping: Pass (void *) to virt_to_page() 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 Signed-off-by: Russell King (Oracle) --- diff --git a/arch/arm/mm/dma-mapping.c b/arch/arm/mm/dma-mapping.c index 089c9c6..ef691a57 100644 --- a/arch/arm/mm/dma-mapping.c +++ b/arch/arm/mm/dma-mapping.c @@ -307,7 +307,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);