Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=64543652609fc1a2a816dc38ce4f56eddda9f9a5 Commit: 64543652609fc1a2a816dc38ce4f56eddda9f9a5 Parent: d8b2160683bd1cee759e72a53193484c25a006bd Author: Max Dmitrichenko <[EMAIL PROTECTED]> AuthorDate: Tue Mar 6 02:45:01 2007 +0300 Committer: Greg Kroah-Hartman <[EMAIL PROTECTED]> CommitDate: Fri Mar 9 19:52:25 2007 -0800
USB: fix Unaligned access in EHCI driver I get following warnings on spar64: Kernel unaligned access at TPC[1000c9e4] ehci_hub_control+0x54c/0x68c [ehci_hcd] Despite of the comment in the patched code, the type cast used there does make unaligned access. The fix was made as it's done in ohci-hub.c. Signed-off-by: Max Dmitrichenko <[EMAIL PROTECTED]> Signed-off-by: Greg Kroah-Hartman <[EMAIL PROTECTED]> --- drivers/usb/host/ehci-hub.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/drivers/usb/host/ehci-hub.c b/drivers/usb/host/ehci-hub.c index 9af529d..1813b7c 100644 --- a/drivers/usb/host/ehci-hub.c +++ b/drivers/usb/host/ehci-hub.c @@ -653,8 +653,7 @@ static int ehci_hub_control ( if (status & ~0xffff) /* only if wPortChange is interesting */ #endif dbg_port (ehci, "GetStatus", wIndex + 1, temp); - // we "know" this alignment is good, caller used kmalloc()... - *((__le32 *) buf) = cpu_to_le32 (status); + put_unaligned(cpu_to_le32 (status), (__le32 *) buf); break; case SetHubFeature: switch (wValue) { - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html