Explorar el Código

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>
Antoine Ténart hace 8 años
padre
commit
cfb73f8953
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      drivers/crypto/inside-secure/safexcel_ring.c

+ 1 - 1
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;