* [PATCH 2/2] fix lzo usage on 64bit systems
@ 2009-02-23 21:38 Sebastian Andrzej Siewior
2009-02-24 7:38 ` Artem Bityutskiy
0 siblings, 1 reply; 2+ messages in thread
From: Sebastian Andrzej Siewior @ 2009-02-23 21:38 UTC (permalink / raw)
To: linux-mtd
the compress size parameter in lzo is defined in the header file as lzo_uint.
This looks very much like uint32_t, I know, but is defined as unsigned long.
So on 64bit LE systems we zero some bytes near by and on BE systems we
get a size of zero.
Signed-off-by: Sebastian Andrzej Siewior <sebastian@breakpoint.cc>
---
compr_lzo.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/compr_lzo.c b/compr_lzo.c
index a0bb362..3d7dad7 100644
--- a/compr_lzo.c
+++ b/compr_lzo.c
@@ -48,7 +48,7 @@ static void *lzo_compress_buf;
static int jffs2_lzo_cmpr(unsigned char *data_in, unsigned char *cpage_out,
uint32_t *sourcelen, uint32_t *dstlen, void *model)
{
- uint32_t compress_size;
+ lzo_uint compress_size;
int ret;
ret = lzo1x_999_compress(data_in, *sourcelen, lzo_compress_buf, &compress_size, lzo_mem);
@@ -69,7 +69,7 @@ static int jffs2_lzo_decompress(unsigned char *data_in, unsigned char *cpage_out
uint32_t srclen, uint32_t destlen, void *model)
{
int ret;
- uint32_t dl;
+ lzo_uint dl;
ret = lzo1x_decompress_safe(data_in,srclen,cpage_out,&dl,NULL);
--
1.6.1.3
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH 2/2] fix lzo usage on 64bit systems
2009-02-23 21:38 [PATCH 2/2] fix lzo usage on 64bit systems Sebastian Andrzej Siewior
@ 2009-02-24 7:38 ` Artem Bityutskiy
0 siblings, 0 replies; 2+ messages in thread
From: Artem Bityutskiy @ 2009-02-24 7:38 UTC (permalink / raw)
To: Sebastian Andrzej Siewior; +Cc: linux-mtd
On Mon, 2009-02-23 at 22:38 +0100, Sebastian Andrzej Siewior wrote:
> the compress size parameter in lzo is defined in the header file as lzo_uint.
> This looks very much like uint32_t, I know, but is defined as unsigned long.
> So on 64bit LE systems we zero some bytes near by and on BE systems we
> get a size of zero.
>
> Signed-off-by: Sebastian Andrzej Siewior <sebastian@breakpoint.cc>
Pushed, thank you!
--
Best regards,
Artem Bityutskiy (Битюцкий Артём)
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-02-24 7:40 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-23 21:38 [PATCH 2/2] fix lzo usage on 64bit systems Sebastian Andrzej Siewior
2009-02-24 7:38 ` Artem Bityutskiy
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox