]> git.baikalelectronics.ru Git - kernel.git/commit
[LIB] crc32c: Keep intermediate crc state in cpu order
authorBenny Halevy <bhalevy@fs1.bhalevy.com>
Thu, 8 Nov 2007 13:34:09 +0000 (21:34 +0800)
committerHerbert Xu <herbert@gondor.apana.org.au>
Thu, 8 Nov 2007 13:34:09 +0000 (21:34 +0800)
commitb118ae82e8de194dfca20a6274e1c4fb9f8a3097
tree842280a85e54d735bf31e1bba17e6fc88c990df0
parent8bb901a4e7b5aea2c4b19b9476bf2ec825d5770e
[LIB] crc32c: Keep intermediate crc state in cpu order

crypto/crc32.c:chksum_final() is computing the digest as
*(__le32 *)out = ~cpu_to_le32(mctx->crc);
so the low-level crc32c_le routines should just keep
the crc in cpu order, otherwise it is getting swabbed
one too many times on big-endian machines.

Signed-off-by: Benny Halevy <bhalevy@fs1.bhalevy.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
lib/libcrc32c.c