crypto: sun4i-ss - simplify the pad length calculation
authorAntoine Ténart <antoine.tenart@free-electrons.com>
Thu, 1 Jun 2017 19:38:58 +0000 (21:38 +0200)
committerHerbert Xu <herbert@gondor.apana.org.au>
Mon, 19 Jun 2017 06:19:50 +0000 (14:19 +0800)
commit214a9bd0f8dec468de6a32f445c540f786773ee8
tree114ef55f77193742facfbcabc78cea37499fb09e
parent7e6df1f7a3a5f379b04eee177be0571beb32b811
crypto: sun4i-ss - simplify the pad length calculation

When sending the last block of data to the engine, it should be padded
so that the total length of the request can be given to the engine as
the last 2 words of the last 64 bytes block.

Simplify the calculation of this pad offset.

Signed-off-by: Antoine Tenart <antoine.tenart@free-electrons.com>
Tested-by: Corentin Labbe <clabbe.montjoie@gmail.com>
Acked-by: Corentin Labbe <clabbe.montjoie@gmail.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/sunxi-ss/sun4i-ss-hash.c