Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Unverified Commit 8bdf188c authored by lucaswei's avatar lucaswei Committed by Michael Bestas
Browse files

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: default avatarlucaswei <lucaswei@google.com>
Change-Id: I0643c4a556d933293715c7ef7727148d0fb59c25
parent ee307799
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment