]> git.baikalelectronics.ru Git - kernel.git/commit
crypto: talitos - Endianess in current_desc_hdr()
authorChristophe Leroy <christophe.leroy@csgroup.eu>
Thu, 8 Oct 2020 09:34:55 +0000 (09:34 +0000)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 30 Oct 2020 06:34:45 +0000 (17:34 +1100)
commit6dc81ffd1c04dfbecace6870a112c501688ebfcc
tree0ae60c1cf42a937b1b8ae60ae230356e9147fb3a
parent046122a3a453ba8675a2ba0b95e3a32d0c7862e2
crypto: talitos - Endianess in current_desc_hdr()

current_desc_hdr() compares the value of the current descriptor
with the next_desc member of the talitos_desc struct.

While the current descriptor is obtained from in_be32() which
return CPU ordered bytes, next_desc member is in big endian order.

Convert the current descriptor into big endian before comparing it
with next_desc.

This fixes a sparse warning.

Fixes: 81405416ce88 ("crypto: talitos - chain in buffered data for ahash on SEC1")
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/talitos.c