[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <386072610805150109t112115abq9a288b64288b1b1c@mail.gmail.com>
Date: Thu, 15 May 2008 16:09:47 +0800
From: "Bryan Wu" <cooloney@...nel.org>
To: "Jie Zhang" <jie.zhang@...log.com>
Cc: "Oliver Neukum" <oliver@...kum.org>, harvey.harrison@...il.com,
david-b@...bell.net, greg@...ah.com, linux-usb@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/1] [usb/host]: use get/put_unaligned_* helpers to fix more potential unaligned issues.
On Thu, May 15, 2008 at 4:03 PM, Jie Zhang <jie.zhang@...log.com> wrote:
> 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.
>
And this change follows Harvey Harrison's patch's style:
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=a5abdeafedf722b0f3f357f4a23089a686b1b80d
-Bryan
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists