]> git.baikalelectronics.ru Git - kernel.git/commitdiff
ARM: 9240/1: dma-mapping: Pass (void *) to virt_to_page()
authorLinus Walleij <linus.walleij@linaro.org>
Wed, 31 Aug 2022 12:28:02 +0000 (13:28 +0100)
committerRussell King (Oracle) <rmk+kernel@armlinux.org.uk>
Tue, 4 Oct 2022 10:09:48 +0000 (11:09 +0100)
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@linaro.org>
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
arch/arm/mm/dma-mapping.c

index 089c9c644cce2add8859103eb1e8c8812561daaa..ef691a5720d2139f092397ecd7faef70c4c2cca6 100644 (file)
@@ -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);