* [PATCH] lib : lz4 using put_unaligned_le16 instead of put_unaligned
@ 2014-07-22 2:03 Eunbong Song
2014-07-22 2:11 ` Greg KH
0 siblings, 1 reply; 2+ messages in thread
From: Eunbong Song @ 2014-07-22 2:03 UTC (permalink / raw)
To: gregkh; +Cc: chanho.min, linux-kernel
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=euc-kr, Size: 1008 bytes --]
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.song@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Ç+·®+%Ëÿ±éݶ\x17¥wÿº{.nÇ+·¥{±þG«éÿ{ayº\x1dÊÚë,j\a¢f£¢·hïêÿêçz_è®\x03(éÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?¨èÚ&£ø§~á¶iOæ¬z·vØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?I¥
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH] lib : lz4 using put_unaligned_le16 instead of put_unaligned
2014-07-22 2:03 [PATCH] lib : lz4 using put_unaligned_le16 instead of put_unaligned Eunbong Song
@ 2014-07-22 2:11 ` Greg KH
0 siblings, 0 replies; 2+ messages in thread
From: Greg KH @ 2014-07-22 2:11 UTC (permalink / raw)
To: Eunbong Song; +Cc: chanho.min, linux-kernel
On Tue, Jul 22, 2014 at 02:03:22AM +0000, Eunbong Song wrote:
>
> 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.
Odd line wrapping :(
Anyway, is this a new problem? Or something that has always been there
in this compression function?
thanks,
greg k-h
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-07-22 2:11 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-22 2:03 [PATCH] lib : lz4 using put_unaligned_le16 instead of put_unaligned Eunbong Song
2014-07-22 2:11 ` Greg KH
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox