[U-Boot] [PATCH] usb: do explicit unaligned accesses

Lucas Stach dev at lynxeye.de
Fri Aug 31 11:00:50 CEST 2012


Hi Thomas,

Am Freitag, den 31.08.2012, 08:57 +0000 schrieb Langer Thomas (LQDE RD
ST PON SW):
> Hello Lucas,
> 
> > @@ -304,8 +306,9 @@ static int usb_hub_configure(struct usb_device *dev)
> >  	}
> >  	memcpy((unsigned char *)&hub->desc, buffer, descriptor->bLength);
> >  	/* adjust 16bit values */
> > -	hub->desc.wHubCharacteristics =
> > -				le16_to_cpu(descriptor->wHubCharacteristics);
> > +	put_unaligned(le16_to_cpu(get_unaligned(
> > +			&descriptor->wHubCharacteristics)),
> > +			&descriptor->wHubCharacteristics);
> 
> I think, the second parameter should be &hub->... ?
> 
Argh, stupid copypasta. Thanks for finding this.

> Best Regards,
> Thomas
> 
> 




More information about the U-Boot mailing list