Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp4276893pxv; Tue, 27 Jul 2021 03:25:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyNosoDLVxKqaheVXZwu9cXyRxf4UUSxDS3SIsw7AVmAxwGtWcvL6Gw3fJ9cdKSMYkefwqd X-Received: by 2002:a02:8241:: with SMTP id q1mr20782183jag.134.1627381507815; Tue, 27 Jul 2021 03:25:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627381507; cv=none; d=google.com; s=arc-20160816; b=vpdkLuT03UBMToszixRW46k22H01Wo9GwCOUhsczJ1B1/uUhaHceRoMvgnPrnka6YH Z1LftVdLNmvAI6cr3dGY/ZBMdj2mgkHDQ6bD5ufKw/l1vjkoSJizbTnQAlEUGHOBCyic 9WDxMx9xzmBSWIk8bBLKsTtq1igMLSENTwGtHaDDJPGbSSBnlWRhiQPCf8ipuP2hBlv/ +wm42xHlGO4hKBIPK4u6FAj2zI6EJ9vW8mSdkRGYExYD/QGYiKahScds/bEml8uiLRrk QuDAxJWVvWRKsopKwzNAWwKqaCXf80W0LQ0cXFE5Fa4x1qIEsWp4yUbgKFyd/sn9oI/y otRQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=JKXwbgELjxRot6TxSE7TNvAvfjvZ+IGrtFrEWm7mdr4=; b=ql1XlKbi0AR5xHCeLo8/VJlwagycBog7f2V9uYbbkk9RwNLijaSLWVyZWFAVBxr+F5 ljzd2iK992tZ8eIBD8VPQuVuTeEbAz6p9YxWwgcY0/lh5zO5iZpDKq+Q0FWQn125jF9V 5g4WpUtwmOrm4pYRgppjUx1p8vRI794BWNWsy68NA7xUDELEjQcL1TQY0EnIrnyO1Ivi FtZzwKGi3H1qWTn/7JGBgBdh3/CWCQMIkfgxbcs2nSFr24RnNsSKwdVA8ToKnWI30d/E Sx9JZ/aoJ6FyQLCn36a6PXjDtTYmyuVVny6ZwO094thcE/BcwhyJmteWjBJCOnog6nyb EUag== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h12si2709906ild.123.2021.07.27.03.24.47; Tue, 27 Jul 2021 03:25:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236209AbhG0KXt (ORCPT + 99 others); Tue, 27 Jul 2021 06:23:49 -0400 Received: from muru.com ([72.249.23.125]:55798 "EHLO muru.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236110AbhG0KXq (ORCPT ); Tue, 27 Jul 2021 06:23:46 -0400 Received: from hillo.muru.com (localhost [127.0.0.1]) by muru.com (Postfix) with ESMTP id 13D8180F0; Tue, 27 Jul 2021 10:24:02 +0000 (UTC) From: Tony Lindgren To: "David S . Miller" , Herbert Xu , linux-kernel@vger.kernel.org, linux-omap@vger.kernel.org Cc: linux-crypto@vger.kernel.org, Lokesh Vutla , Tero Kristo Subject: [PATCH 1/6] crypto: omap-sham - clear dma flags only after omap_sham_update_dma_stop() Date: Tue, 27 Jul 2021 13:23:34 +0300 Message-Id: <20210727102339.49141-1-tony@atomide.com> X-Mailer: git-send-email 2.32.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org 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 Cc: Tero Kristo Signed-off-by: Tony Lindgren --- drivers/crypto/omap-sham.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- 2.32.0