From 1eb159a295261c56d14b962eb3d4763f8ce38807 Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Wed, 14 Aug 2013 16:16:42 -0700 Subject: btrfs-progs: fix unaligned compat endian warnings The _una_ struct's entire job is to pass an argument to le*_to_cpu. So it's a little embarassing that it uses a native cpu types and generates endian warnings. ctree.h:1616:1: warning: incorrect type in assignment (different base types) ctree.h:1616:1: expected unsigned long long [unsigned] [usertype] x ctree.h:1616:1: got restricted __le64 [usertype] Signed-off-by: Zach Brown Signed-off-by: David Sterba Signed-off-by: Chris Mason --- kerncompat.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/kerncompat.h b/kerncompat.h index ebb54b13..7d57b1b0 100644 --- a/kerncompat.h +++ b/kerncompat.h @@ -278,9 +278,9 @@ typedef u64 __bitwise __be64; #define le16_to_cpu(x) ((__force u16)(__le16)(x)) #endif -struct __una_u16 { u16 x; } __attribute__((__packed__)); -struct __una_u32 { u32 x; } __attribute__((__packed__)); -struct __una_u64 { u64 x; } __attribute__((__packed__)); +struct __una_u16 { __le16 x; } __attribute__((__packed__)); +struct __una_u32 { __le32 x; } __attribute__((__packed__)); +struct __una_u64 { __le64 x; } __attribute__((__packed__)); #define get_unaligned_le8(p) (*((u8 *)(p))) #define put_unaligned_le8(val,p) ((*((u8 *)(p))) = (val)) -- cgit v1.2.3