Skip to content

Commit 8671133

Browse files
linuswjenswi-linaro
authored andcommitted
tee: Pass a pointer to virt_to_page()
Like the other calls in this function virt_to_page() expects a pointer, not an integer. However since many architectures implement virt_to_pfn() as a macro, this function becomes polymorphic and accepts both a (unsigned long) and a (void *). Fix this up with an explicit cast. Signed-off-by: Linus Walleij <[email protected]> Signed-off-by: Jens Wiklander <[email protected]>
1 parent eeac8ed commit 8671133

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/tee/tee_shm.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ static int shm_get_kernel_pages(unsigned long start, size_t page_count,
3232
is_kmap_addr((void *)start)))
3333
return -EINVAL;
3434

35-
page = virt_to_page(start);
35+
page = virt_to_page((void *)start);
3636
for (n = 0; n < page_count; n++) {
3737
pages[n] = page + n;
3838
get_page(pages[n]);

0 commit comments

Comments
 (0)