HSI: cmt_speech: Pass a pointer to virt_to_page()
authorLinus Walleij <linus.walleij@linaro.org>
Thu, 19 May 2022 21:29:43 +0000 (23:29 +0200)
committerSebastian Reichel <sre@kernel.org>
Mon, 29 Aug 2022 16:08:48 +0000 (18:08 +0200)
A pointer into virtual memory is represented by a (void *)
not an u32, so the compiler warns:

drivers/hsi/clients/cmt_speech.c:1092:35: warning: passing argument
  1 of 'virt_to_pfn' makes pointer from integer without a cast
  [-Wint-conversion]

Fix this with an explicit cast.

Cc: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Cc: Aaro Koskinen <aaro.koskinen@iki.fi>
Cc: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
drivers/hsi/clients/cmt_speech.c

index e014ef3..8069f79 100644 (file)
@@ -1089,7 +1089,7 @@ static vm_fault_t cs_char_vma_fault(struct vm_fault *vmf)
        struct cs_char *csdata = vmf->vma->vm_private_data;
        struct page *page;
 
-       page = virt_to_page(csdata->mmap_base);
+       page = virt_to_page((void *)csdata->mmap_base);
        get_page(page);
        vmf->page = page;