Skip to content

Commit

Permalink
HSI: cmt_speech: Pass a pointer to virt_to_page()
Browse files Browse the repository at this point in the history
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 <[email protected]>
Cc: Aaro Koskinen <[email protected]>
Cc: Pavel Machek <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>
Signed-off-by: Sebastian Reichel <[email protected]>
  • Loading branch information
linusw authored and sre committed Aug 29, 2022
1 parent 9a2ea13 commit 0f1a3e5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/hsi/clients/cmt_speech.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 0f1a3e5

Please sign in to comment.