crypto: stm32 - Simplify finup
authorHerbert Xu <herbert@gondor.apana.org.au>
Sat, 11 Mar 2023 09:09:15 +0000 (17:09 +0800)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 17 Mar 2023 03:16:44 +0000 (11:16 +0800)
commit32e55d0333daf4d2bfee8e4df75134312d6d3845
tree5f8c3802f78e9ec19a0394b14f7320310982ef17
parent34f39da79b49fd52f615e92751a6a64e67ef934a
crypto: stm32 - Simplify finup

The current finup code is unnecessarily convoluted.  There is no
need to call update and final separately as update already does
all the necessary work on its own.

Simplify this by utilising the HASH_FLAGS_FINUP bit in rctx to
indicate only finup and use the HASH_FLAGS_FINAL bit instead to
signify processing common to both final and finup.

Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Tested-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/stm32/stm32-hash.c