提交 a3b9ecc8 编写于 作者: L Linus Walleij 提交者: Jens Wiklander

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: NLinus Walleij <linus.walleij@linaro.org>
Reviewed-by: NSumit Garg <sumit.garg@linaro.org>
[jw: fixed merge conflict]
Signed-off-by: NJens Wiklander <jens.wiklander@linaro.org>
上级 3e47235e
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册