]> git.baikalelectronics.ru Git - kernel.git/commit
crypto: testmgr - handle endianness correctly in alg_test_crc32c()
authorEric Biggers <ebiggers@google.com>
Thu, 10 Jan 2019 20:17:55 +0000 (12:17 -0800)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 18 Jan 2019 10:43:43 +0000 (18:43 +0800)
commit0c3cbd5c67e357a583c54411b9ddc9ee88bc15bf
tree89fb81c6f85ad61d82f72fed0c33439ace6c394e
parent3afc382aee82671a2708da94eefcb7b53e3c9781
crypto: testmgr - handle endianness correctly in alg_test_crc32c()

The crc32c context is in CPU endianness, whereas the final digest is
little endian.  alg_test_crc32c() got this mixed up.  Fix it.

The test passes both before and after, but this patch fixes the
following sparse warning:

    crypto/testmgr.c:1912:24: warning: cast to restricted __le32

Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
crypto/testmgr.c