From mboxrd@z Thu Jan 1 00:00:00 1970 From: Lucas Stach Date: Fri, 31 Aug 2012 11:00:50 +0200 Subject: [U-Boot] [PATCH] usb: do explicit unaligned accesses In-Reply-To: <593AEF6C47F46446852B067021A273D660BA94A5@MUCSE039.lantiq.com> References: <1346368414-993-1-git-send-email-dev@lynxeye.de> <593AEF6C47F46446852B067021A273D660BA94A5@MUCSE039.lantiq.com> Message-ID: <1346403650.2252.14.camel@tellur> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 > >