crypto: talitos - Endianess in current_desc_hdr()
authorChristophe Leroy <christophe.leroy@csgroup.eu>
Thu, 8 Oct 2020 09:34:55 +0000 (09:34 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 30 Dec 2020 10:53:00 +0000 (11:53 +0100)
commit7023c8164125eb5a5c603b1ef900b08d9d9ed70c
tree49ee5ff640079671f66d8acabccaa7e7c28048ce
parent3267132353937c0d45abbf5acc97430b8c5d5f03
crypto: talitos - Endianess in current_desc_hdr()

[ Upstream commit 195404db27f9533c71fdcb78d32a77075c2cb4a2 ]

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: 37b5e8897eb5 ("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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/crypto/talitos.c