public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] usb: udc: Fix warnings on 64-bit builds
@ 2015-10-30 15:21 Michal Simek
  2015-11-03 10:14 ` Lukasz Majewski
  0 siblings, 1 reply; 7+ messages in thread
From: Michal Simek @ 2015-10-30 15:21 UTC (permalink / raw)
  To: u-boot

Cast u32 bit value to 64bit before recasting to 64bit pointer to avoid
pointer from integer cast size mismatch warnings.

Warning log:
+../drivers/usb/gadget/udc/udc-core.c: In function
?usb_gadget_unmap_request?:
+../drivers/usb/gadget/udc/udc-core.c:68:19: warning: cast to pointer
from integer of different size [-Wint-to-pointer-cast]

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
---

 drivers/usb/gadget/udc/udc-core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/gadget/udc/udc-core.c b/drivers/usb/gadget/udc/udc-core.c
index 875e998a82e3..326757b547fa 100644
--- a/drivers/usb/gadget/udc/udc-core.c
+++ b/drivers/usb/gadget/udc/udc-core.c
@@ -65,7 +65,7 @@ void usb_gadget_unmap_request(struct usb_gadget *gadget,
 	if (req->length == 0)
 		return;
 
-	dma_unmap_single((void *)req->dma, req->length,
+	dma_unmap_single((void *)(uintptr_t)req->dma, req->length,
 			 is_in ? DMA_TO_DEVICE : DMA_FROM_DEVICE);
 }
 EXPORT_SYMBOL_GPL(usb_gadget_unmap_request);
-- 
2.5.0

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2015-12-09  9:40 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-30 15:21 [U-Boot] [PATCH] usb: udc: Fix warnings on 64-bit builds Michal Simek
2015-11-03 10:14 ` Lukasz Majewski
2015-12-07 12:01   ` Michal Simek
2015-12-08  6:59     ` Lukasz Majewski
2015-12-08  7:18       ` Michal Simek
2015-12-09  9:33     ` Lukasz Majewski
2015-12-09  9:40       ` Michal Simek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox