diff options
author | Andre Heider <a.heider@gmail.com> | 2018-02-15 10:17:29 +0100 |
---|---|---|
committer | Marek Vasut <marex@denx.de> | 2018-02-21 20:28:15 +0100 |
commit | a64a614db70f1c758aea0a1620c4fcd49e037d47 (patch) | |
tree | 32822dac227b7dd37df75a27ead5420e665d8124 /Documentation | |
parent | 24ccd0c8fd6285636edb94d0ece2cbcf062d64eb (diff) |
usb: gadget: sdp: fix pointer cast warnings for 64bit archs
The SDP protocol contains multiple 32bit pointers. Add a helper function
to get a valid pointer from these values and use it.
This fixes the following warnings:
drivers/usb/gadget/f_sdp.c: In function ‘sdp_rx_data_complete’:
drivers/usb/gadget/f_sdp.c:347:10: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
memcpy((void *)sdp->dnl_address, req->buf + 1, datalen);
^
drivers/usb/gadget/f_sdp.c: In function ‘sdp_jump_imxheader’:
drivers/usb/gadget/f_sdp.c:625:10: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
entry = (void *)headerv2->entry;
^
drivers/usb/gadget/f_sdp.c: In function ‘sdp_handle_in_ep’:
drivers/usb/gadget/f_sdp.c:668:20: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
memcpy(&data[1], (void *)sdp_func->dnl_address, datalen);
^
drivers/usb/gadget/f_sdp.c:679:31: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
status = sdp_jump_imxheader((void *)sdp_func->jmp_address);
^
Signed-off-by: Andre Heider <a.heider@gmail.com>
Diffstat (limited to 'Documentation')
0 files changed, 0 insertions, 0 deletions