A pointer into virtual memory is represented by a (void *) not an u32, so the compiler warns:
drivers/tee/optee/call.c:365:29: warning: passing argument 1 of 'virt_to_pfn' makes pointer from integer without a cast [-Wint-conversion]
Fix this with an explicit cast.
Cc: Sumit Garg sumit.garg@linaro.org Signed-off-by: Linus Walleij linus.walleij@linaro.org --- drivers/tee/optee/call.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/tee/optee/call.c b/drivers/tee/optee/call.c index bd49ec934060..51275d77ec84 100644 --- a/drivers/tee/optee/call.c +++ b/drivers/tee/optee/call.c @@ -362,7 +362,7 @@ int optee_check_mem_type(unsigned long start, size_t num_pages) * Allow kernel address to register with OP-TEE as kernel * pages are configured as normal memory only. */ - if (virt_addr_valid(start)) + if (virt_addr_valid((void *)start)) return 0;
mmap_read_lock(mm);