[U-Boot] [PATCH] usb: dwc3: Fix warnings on 64-bit builds

Marek Vasut marex at denx.de
Mon Nov 2 19:20:50 CET 2015


On Monday, November 02, 2015 at 08:13:55 AM, Michal Simek wrote:
> On 10/30/2015 05:27 PM, Marek Vasut wrote:
> > On Friday, October 30, 2015 at 04:24:06 PM, Michal Simek wrote:
> >> Change aritmentics to use 64bit types to be compatible with 64bit
> >> builds.
> >> 
> >> Signed-off-by: Michal Simek <michal.simek at xilinx.com>
> >> ---
> >> 
> >>  drivers/usb/dwc3/core.c   |  7 ++++---
> >>  drivers/usb/dwc3/ep0.c    | 10 +++++-----
> >>  drivers/usb/dwc3/gadget.c | 10 +++++-----
> >>  drivers/usb/dwc3/io.h     |  4 ++--
> >>  4 files changed, 16 insertions(+), 15 deletions(-)
> >> 
> >> diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c
> >> index ab3c94e51275..0ae3de5c27b9 100644
> >> --- a/drivers/usb/dwc3/core.c
> >> +++ b/drivers/usb/dwc3/core.c
> >> @@ -281,7 +281,7 @@ static int dwc3_setup_scratch_buffers(struct dwc3
> >> *dwc)
> >> 
> >>  	return 0;
> >>  
> >>  err1:
> >> -	dma_unmap_single((void *)dwc->scratch_addr, dwc->nr_scratch *
> >> +	dma_unmap_single((void *)(uintptr_t)dwc->scratch_addr, dwc->nr_scratch
> >> *
> > 
> > Is this double type-cast necessary ?
> 
> Do you know better way how to do it?

I guess I don't, sorry.

Best regards,
Marek Vasut


More information about the U-Boot mailing list