[PATCH] hid-core endianness annotations

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by Al Viro and committed by Linus Torvalds b87496aa 82c05a13

+4 -5
+4 -5
drivers/hid/hid-core.c
··· 753 754 report += offset >> 3; /* adjust byte index */ 755 offset &= 7; /* now only need bit offset into one byte */ 756 - x = get_unaligned((u64 *) report); 757 - x = le64_to_cpu(x); 758 x = (x >> offset) & ((1ULL << n) - 1); /* extract bit field */ 759 return (u32) x; 760 } ··· 768 */ 769 static __inline__ void implement(__u8 *report, unsigned offset, unsigned n, __u32 value) 770 { 771 - u64 x; 772 u64 m = (1ULL << n) - 1; 773 774 WARN_ON(n > 32); ··· 779 report += offset >> 3; 780 offset &= 7; 781 782 - x = get_unaligned((u64 *)report); 783 x &= cpu_to_le64(~(m << offset)); 784 x |= cpu_to_le64(((u64) value) << offset); 785 - put_unaligned(x, (u64 *) report); 786 } 787 788 /*
··· 753 754 report += offset >> 3; /* adjust byte index */ 755 offset &= 7; /* now only need bit offset into one byte */ 756 + x = le64_to_cpu(get_unaligned((__le64 *) report)); 757 x = (x >> offset) & ((1ULL << n) - 1); /* extract bit field */ 758 return (u32) x; 759 } ··· 769 */ 770 static __inline__ void implement(__u8 *report, unsigned offset, unsigned n, __u32 value) 771 { 772 + __le64 x; 773 u64 m = (1ULL << n) - 1; 774 775 WARN_ON(n > 32); ··· 780 report += offset >> 3; 781 offset &= 7; 782 783 + x = get_unaligned((__le64 *)report); 784 x &= cpu_to_le64(~(m << offset)); 785 x |= cpu_to_le64(((u64) value) << offset); 786 + put_unaligned(x, (__le64 *) report); 787 } 788 789 /*