Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <fengguang.wu@intel.com>
Signed-off-by: Dan Streetman <ddstreet@ieee.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

authored by

Dan Streetman and committed by
Herbert Xu
ca7fc7e9 42e8b0d7

+1 -1
+1 -1
lib/842/842_decompress.c
··· 185 185 /* this is where the current fifo is */ 186 186 u64 section = round_down(total, fsize); 187 187 /* the current pos in the fifo */ 188 - u64 pos = total % fsize; 188 + u64 pos = total - section; 189 189 190 190 /* if the offset is past/at the pos, we need to 191 191 * go back to the last fifo section