aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/tee
diff options
context:
space:
mode:
authorLinus Walleij <linus.walleij@linaro.org>2022-05-19 23:46:35 +0200
committerJens Wiklander <jens.wiklander@linaro.org>2022-05-30 08:06:45 +0200
commita3b9ecc805e9131476c719111fe347c7dbc0d1d1 (patch)
tree4aeef70cdb798d2d45e6e51b5a98eb0ce96c96f3 /drivers/tee
parenttee: make tee_shm_register_kernel_buf vmalloc supported (diff)
downloadlinux-dev-a3b9ecc805e9131476c719111fe347c7dbc0d1d1.tar.xz
linux-dev-a3b9ecc805e9131476c719111fe347c7dbc0d1d1.zip
tee: optee: Pass a pointer to virt_addr_valid()
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> Reviewed-by: Sumit Garg <sumit.garg@linaro.org> [jw: fixed merge conflict] Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
Diffstat (limited to 'drivers/tee')
-rw-r--r--drivers/tee/optee/call.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/tee/optee/call.c b/drivers/tee/optee/call.c
index 2082e632adff..78ac6fcef8a4 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) || is_vmalloc_addr((void *)start))
+ if (virt_addr_valid((void *)start) || is_vmalloc_addr((void *)start))
return 0;
mmap_read_lock(mm);