[PATCH] powerpc/usb: use unsigned long to type cast an address of ioremap

David Laight David.Laight at ACULAB.COM
Thu Nov 3 22:38:48 EST 2011


 
> On Thu, Nov 3, 2011 at 4:58 AM, Shaohui Xie <Shaohui.Xie at freescale.com> wrote:
> >
> >                usb_sys_regs = (struct usb_sys_interface *)
> > -                               ((u32)dr_regs + USB_DR_SYS_OFFSET);
> > +                               ((unsigned long)dr_regs + USB_DR_SYS_OFFSET);
> 
> This makes more sense:
> 
> usb_sys_regs = (void *)dr_regs + USB_DR_SYS_OFFSET;

But that is invalid C.

	David




More information about the Linuxppc-dev mailing list