In case of mips bigendian machine, put_unaligned writes bigendian bytes order. This is defined in arch/mips/include/asm/unaligned.h. So it's right use put_unaligned_le16 function instead of put_unaligned. This patch also fixes problem fail to mount zram ext4 partition with "zram: Decompression failed! err=-1, page=0" in mips bigendian machine. Signed-off-by: Eunbong Song --- lib/lz4/lz4defs.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/lib/lz4/lz4defs.h b/lib/lz4/lz4defs.h index abcecdc..dc7ef14 100644 --- a/lib/lz4/lz4defs.h +++ b/lib/lz4/lz4defs.h @@ -53,7 +53,7 @@ typedef struct _U64_S { u64 v; } U64_S; #define LZ4_WRITE_LITTLEENDIAN_16(p, v) \ do { \ - put_unaligned(v, (u16 *)(p)); \ + put_unaligned_le16(v, (u16 *)(p)); \ p += 2; \ } while (0) #endif -- 1.7.0.1 {.n++%ݶw{.n+{G{ayʇڙ,jfhz_(階ݢj"mG?&~iOzv^m ?I