[U-Boot] [PATCH 02/19] usbdev.c: Fix GCC 4.6 build warnings

Marek Vasut marek.vasut at gmail.com
Wed Nov 16 03:26:46 CET 2011


> On Tuesday 15 November 2011 13:01:52 Stefan Roese wrote:
> > --- a/arch/powerpc/cpu/ppc4xx/usbdev.c
> > +++ b/arch/powerpc/cpu/ppc4xx/usbdev.c
> > 
> > -	int temp, temp1;
> > ...
> > 
> >  		/*copy packet */
> >  		setup_packet_pt[0] = *(unsigned int *)USB2D0_FIFO_0;
> >  		setup_packet_pt[1] = *(unsigned int *)USB2D0_FIFO_0;
> > 
> > -		temp = *(unsigned int *)USB2D0_FIFO_0;
> > -		temp1 = *(unsigned int *)USB2D0_FIFO_0;
> 
> this seems to be treading into possible ugly volatile area ... perhaps best
> if this was acked/tested by someone with actual hardware first ...
> -mike

My words definitelly ... maybe replace with in_be32() ? It seems very 
suspicious, as if there was a reason for this access. Like you need to do more 
accesses to the fifo to clean up some trailing crud.

M


More information about the U-Boot mailing list