mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-05 19:31:57 -04:00
qseecom: Fix -Wpointer-to-int-cast
drivers/misc/qseecom.c:3723:28: error: cast to smaller integer type 'uint32_t' (aka 'unsigned int') from 'void *' [-Werror,-Wvoid-pointer-to-int-cast]
send_data_req.req_ptr = (uint32_t)req->cmd_req_buf;
^~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/misc/qseecom.c:3724:28: error: cast to smaller integer type 'uint32_t' (aka 'unsigned int') from 'void *' [-Werror,-Wvoid-pointer-to-int-cast]
send_data_req.rsp_ptr = (uint32_t)req->resp_buf;
^~~~~~~~~~~~~~~~~~~~~~~
Fix `send_data_req.rsp_ptr = (uint32_t)req->resp_buf;` by casting
pointer value into uintptr_t, then compiler assignment will truncate to 32bit
to fit `uint32_t send_data_req.rsp_ptr` later.
Bug: 171827315
Signed-off-by: lucaswei <lucaswei@google.com>
Change-Id: I0643c4a556d933293715c7ef7727148d0fb59c25
This commit is contained in:
parent
ee307799f3
commit
8bdf188cf5
1 changed files with 2 additions and 2 deletions
|
|
@ -3743,8 +3743,8 @@ static int __qseecom_send_cmd(struct qseecom_dev_handle *data,
|
|||
(uint32_t)(__qseecom_uvirt_to_kphys(
|
||||
data, (uintptr_t)req->resp_buf));
|
||||
} else {
|
||||
send_data_req.req_ptr = (uint32_t)req->cmd_req_buf;
|
||||
send_data_req.rsp_ptr = (uint32_t)req->resp_buf;
|
||||
send_data_req.req_ptr = (uintptr_t)req->cmd_req_buf;
|
||||
send_data_req.rsp_ptr = (uintptr_t)req->resp_buf;
|
||||
}
|
||||
|
||||
send_data_req.req_len = req->cmd_req_len;
|
||||
|
|
|
|||
Loading…
Reference in a new issue