Commit cfb73f89 authored by Antoine Ténart's avatar Antoine Ténart Committed by Herbert Xu

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: default avatarAntoine Tenart <antoine.tenart@free-electrons.com>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent e826934e
...@@ -84,7 +84,7 @@ void safexcel_ring_rollback_wptr(struct safexcel_crypto_priv *priv, ...@@ -84,7 +84,7 @@ void safexcel_ring_rollback_wptr(struct safexcel_crypto_priv *priv,
return; return;
if (ring->write == ring->base) if (ring->write == ring->base)
ring->write += (EIP197_DEFAULT_RING_SIZE - 1) * ring->offset; ring->write = ring->base_end - ring->offset;
else else
ring->write -= ring->offset; ring->write -= ring->offset;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment