From: Dan Streetman Date: Mon, 11 May 2015 22:53:36 +0000 (-0400) Subject: lib: correct 842 decompress for 32 bit X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=ca7fc7e962fa067ba31f76a6e5828537394f6481;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git lib: correct 842 decompress for 32 bit Avoid 64 bit mod operation, which won't work on 32 bit systems. Simple subtraction can be used instead in this case. Reported-By: Fengguang Wu Signed-off-by: Dan Streetman Signed-off-by: Herbert Xu --- diff --git a/lib/842/842_decompress.c b/lib/842/842_decompress.c index dbeb0581b879..5446ff0c9ba0 100644 --- a/lib/842/842_decompress.c +++ b/lib/842/842_decompress.c @@ -185,7 +185,7 @@ static int __do_index(struct sw842_param *p, u8 size, u8 bits, u64 fsize) /* this is where the current fifo is */ u64 section = round_down(total, fsize); /* the current pos in the fifo */ - u64 pos = total % fsize; + u64 pos = total - section; /* if the offset is past/at the pos, we need to * go back to the last fifo section