lkml.org 
[lkml]   [2008]   [May]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH 1/1] [usb/host]: use get/put_unaligned_* helpers to fix more potential unaligned issues.
Date
Am Donnerstag 15 Mai 2008 10:03:35 schrieb Jie Zhang:
> Oliver Neukum wrote:
> > Am Donnerstag 15 Mai 2008 08:19:24 schrieb Bryan Wu:
> >> --- a/drivers/usb/host/uhci-hub.c
> >> +++ b/drivers/usb/host/uhci-hub.c
> >> @@ -253,7 +253,7 @@ static int uhci_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue,
> >> switch (typeReq) {
> >>
> >> case GetHubStatus:
> >> - *(__le32 *)buf = cpu_to_le32(0);
> >> + put_unaligned_le32(0, buf);
> >
> > What is supposed to make all these changes a good idea?
> >
> Since buf might not be 4-byte aligned.

It is. Please analyze the code before you use these access methods.

Regards
Oliver


\
 
 \ /
  Last update: 2008-05-15 10:39    [W:0.039 / U:0.240 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site