From: Nitin Gupta Date: Mon, 16 Jul 2007 06:37:21 +0000 (-0700) Subject: LZO1X: fix lzo1x_worst_compress X-Git-Tag: v2.6.23-rc1~1047 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=f2a11b158a24301e9158e9c873fa88e5eb775486;p=linux-2.6-omap-h63xx.git LZO1X: fix lzo1x_worst_compress This is a correction for a macro which gives worst case compressed data size by LZO1X. This patch was provided by the LZO author (Markus Oberhumer). Signed-off-by: Nitin Gupta Cc: "Markus F.X.J. Oberhumer" Cc: "Richard Purdie" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/include/linux/lzo.h b/include/linux/lzo.h index 582d8b711a1..d793497ec1c 100644 --- a/include/linux/lzo.h +++ b/include/linux/lzo.h @@ -17,7 +17,7 @@ #define LZO1X_MEM_COMPRESS (16384 * sizeof(unsigned char *)) #define LZO1X_1_MEM_COMPRESS LZO1X_MEM_COMPRESS -#define lzo1x_worst_compress(x) (x + (x / 64) + 16 + 3) +#define lzo1x_worst_compress(x) ((x) + ((x) / 16) + 64 + 3) /* This requires 'workmem' of size LZO1X_1_MEM_COMPRESS */ int lzo1x_1_compress(const unsigned char *src, size_t src_len,