summaryrefslogtreecommitdiff
path: root/drivers/crypto
diff options
context:
space:
mode:
authorAntoine Ténart <antoine.tenart@free-electrons.com>2017-06-15 10:56:29 +0300
committerHerbert Xu <herbert@gondor.apana.org.au>2017-06-20 06:21:48 +0300
commitcfb73f89534fb246155a05a52d63559cb5d58749 (patch)
tree16828f923196db411f0f697c69dfe09bc0cac5cd /drivers/crypto
parente826934e359efa75bade6e3603432e31d5794281 (diff)
downloadlinux-cfb73f89534fb246155a05a52d63559cb5d58749.tar.xz
crypto: inside-secure - use the base_end pointer in ring rollback
A base_end pointer is set and provided. Use it in the ring rollback function to avoid using build-in defines. Signed-off-by: Antoine Tenart <antoine.tenart@free-electrons.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto')
-rw-r--r--drivers/crypto/inside-secure/safexcel_ring.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/crypto/inside-secure/safexcel_ring.c b/drivers/crypto/inside-secure/safexcel_ring.c
index fdbf05ae55fc..c9d2a8716b5b 100644
--- a/drivers/crypto/inside-secure/safexcel_ring.c
+++ b/drivers/crypto/inside-secure/safexcel_ring.c
@@ -84,7 +84,7 @@ void safexcel_ring_rollback_wptr(struct safexcel_crypto_priv *priv,
return;
if (ring->write == ring->base)
- ring->write += (EIP197_DEFAULT_RING_SIZE - 1) * ring->offset;
+ ring->write = ring->base_end - ring->offset;
else
ring->write -= ring->offset;