Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=b87496aa493a540b9c084b16b73f915705ebdbcc
Commit:     b87496aa493a540b9c084b16b73f915705ebdbcc
Parent:     82c05a13c9e0d782941f975eabf6c5a7928cc4d9
Author:     Al Viro <[EMAIL PROTECTED]>
AuthorDate: Wed Mar 14 09:19:50 2007 +0000
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Wed Mar 14 15:27:50 2007 -0700

    [PATCH] hid-core endianness annotations
    
    Signed-off-by: Al Viro <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 drivers/hid/hid-core.c |    9 ++++-----
 1 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c
index f4ee1af..9c8157f 100644
--- a/drivers/hid/hid-core.c
+++ b/drivers/hid/hid-core.c
@@ -753,8 +753,7 @@ static __inline__ __u32 extract(__u8 *report, unsigned 
offset, unsigned n)
 
        report += offset >> 3;  /* adjust byte index */
        offset &= 7;            /* now only need bit offset into one byte */
-       x = get_unaligned((u64 *) report);
-       x = le64_to_cpu(x);
+       x = le64_to_cpu(get_unaligned((__le64 *) report));
        x = (x >> offset) & ((1ULL << n) - 1);  /* extract bit field */
        return (u32) x;
 }
@@ -769,7 +768,7 @@ static __inline__ __u32 extract(__u8 *report, unsigned 
offset, unsigned n)
  */
 static __inline__ void implement(__u8 *report, unsigned offset, unsigned n, 
__u32 value)
 {
-       u64 x;
+       __le64 x;
        u64 m = (1ULL << n) - 1;
 
        WARN_ON(n > 32);
@@ -780,10 +779,10 @@ static __inline__ void implement(__u8 *report, unsigned 
offset, unsigned n, __u3
        report += offset >> 3;
        offset &= 7;
 
-       x = get_unaligned((u64 *)report);
+       x = get_unaligned((__le64 *)report);
        x &= cpu_to_le64(~(m << offset));
        x |= cpu_to_le64(((u64) value) << offset);
-       put_unaligned(x, (u64 *) report);
+       put_unaligned(x, (__le64 *) report);
 }
 
 /*
-
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

Reply via email to