diff mbox series

[1/6] crypto: omap-sham - clear dma flags only after omap_sham_update_dma_stop()

Message ID 20210727102339.49141-1-tony@atomide.com
State New
Headers show
Series [1/6] crypto: omap-sham - clear dma flags only after omap_sham_update_dma_stop() | expand

Commit Message

Tony Lindgren July 27, 2021, 10:23 a.m. UTC
We should not clear FLAGS_DMA_ACTIVE before omap_sham_update_dma_stop() is
done calling dma_unmap_sg(). We already clear FLAGS_DMA_ACTIVE at the
end of omap_sham_update_dma_stop().

The early clearing of FLAGS_DMA_ACTIVE is not causing issues as we do not
need to defer anything based on FLAGS_DMA_ACTIVE currently. So this can be
applied as clean-up.

Cc: Lokesh Vutla <lokeshvutla@ti.com>
Cc: Tero Kristo <kristo@kernel.org>
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
 drivers/crypto/omap-sham.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Herbert Xu Aug. 6, 2021, 12:14 p.m. UTC | #1
On Tue, Jul 27, 2021 at 01:23:34PM +0300, Tony Lindgren wrote:
> We should not clear FLAGS_DMA_ACTIVE before omap_sham_update_dma_stop() is

> done calling dma_unmap_sg(). We already clear FLAGS_DMA_ACTIVE at the

> end of omap_sham_update_dma_stop().

> 

> The early clearing of FLAGS_DMA_ACTIVE is not causing issues as we do not

> need to defer anything based on FLAGS_DMA_ACTIVE currently. So this can be

> applied as clean-up.

> 

> Cc: Lokesh Vutla <lokeshvutla@ti.com>

> Cc: Tero Kristo <kristo@kernel.org>

> Signed-off-by: Tony Lindgren <tony@atomide.com>

> ---

>  drivers/crypto/omap-sham.c | 2 +-

>  1 file changed, 1 insertion(+), 1 deletion(-)


All applied.  Thanks.
-- 
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
diff mbox series

Patch

diff --git a/drivers/crypto/omap-sham.c b/drivers/crypto/omap-sham.c
--- a/drivers/crypto/omap-sham.c
+++ b/drivers/crypto/omap-sham.c
@@ -1736,7 +1736,7 @@  static void omap_sham_done_task(unsigned long data)
 		if (test_and_clear_bit(FLAGS_OUTPUT_READY, &dd->flags))
 			goto finish;
 	} else if (test_bit(FLAGS_DMA_READY, &dd->flags)) {
-		if (test_and_clear_bit(FLAGS_DMA_ACTIVE, &dd->flags)) {
+		if (test_bit(FLAGS_DMA_ACTIVE, &dd->flags)) {
 			omap_sham_update_dma_stop(dd);
 			if (dd->err) {
 				err = dd->err;