usb: udc: Fix warnings on 64-bit builds
authorMichal Simek <michal.simek@xilinx.com>
Fri, 30 Oct 2015 15:21:30 +0000 (16:21 +0100)
committerMarek Vasut <marex@denx.de>
Tue, 3 Nov 2015 16:29:54 +0000 (17:29 +0100)
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

index 875e998a82e395a8a89151bb4d3f54b8cfa0132b..326757b547fa85a0dcbc6d003cf253a2a48e223b 100644 (file)
@@ -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);