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 <eunb.s...@samsung.com> --- 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떑꿩�r툤y鉉싕b쾊Ф푤v�^�)頻{.n�+돴쪐{콗喩zX㎍썳變}찠꼿쟺�&j:+v돣�쳭喩zZ+�+zf"톒쉱�~넮녬i鎬z�췿ⅱ�?솳鈺�&�)刪f뷌^j푹y쬶끷@A첺뛴 0띠h��뭝