Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp2318954pxb; Mon, 20 Sep 2021 18:41:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwRIINfzsnm9Cg0HZT5WCEYN0NW6QbLHHijum9LNlKTFP5lz1Q0ppqGL5g7PTR+j8XksBff X-Received: by 2002:a05:6e02:1a67:: with SMTP id w7mr18856812ilv.215.1632188495008; Mon, 20 Sep 2021 18:41:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632188494; cv=none; d=google.com; s=arc-20160816; b=ILqROpMC9V+t7j9Jk49uw1mUM4reoevCXzJqDqQXw/Pl84G5uSv/o73ysYXNuJ69oj sQchRvFpAeXOFROUkvD7gJeVwOIRUcXKgc0Bq6eIRJtYinqIIjutAD9Q9WvuBnEGlJC5 HApUzTFzii874toLScfFe3mVxH4zmoSPUZBUxyvyF2KOHYKmrcsCSetFADqbATn1nNu+ AmnJwn45NegU/+OXMPJLVRCA5HXU0/eddZpV6pwvKj28ygqyfTDsJANhrH75G/pYNf3A MUZGCx7zs81BElknWO7QdqsNum3l0hsLq2N8oSxAgkb2GymYL6++zPI6CUrzFwvYqDX0 xZQA== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=dCKyo0A5FUwEDMdA8FIjkDAQrNuV0OWQjI1toySXaxc=; b=lOZoYIkHzI4Imp5XXms48nczY9buQoID+slI9qprNPtQGdeVUI3cK8kjRTNP59A06R T6fyOlfKkLupnFJdcriDFqYLzb6Mlmg4ljaWQt62gH2uipXjm7KB/tMhim5LTA4TL39O 9mb/HMCORsNTVGSzqKCxund6D36K0R1AG3izudizdLOT9xzJpYNkLCchyqwzHl2mdwwX aXOQ5+TX0cGdyspXa4doOEoo2XJCysxDik5ac4o/jDys+2RZWI8tz45ygoCH+ssr4ub/ aOnv8iQ1G6Ta67dknVvAq3XPS5CYnjOewSN8ZfxcHEP6SFozkUhsz5jDkPe6nSJaWqgY 9VKA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=vJwzLSZI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l4si13361303jaf.96.2021.09.20.18.41.24; Mon, 20 Sep 2021 18:41:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=vJwzLSZI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242849AbhITQsP (ORCPT + 99 others); Mon, 20 Sep 2021 12:48:15 -0400 Received: from mail.kernel.org ([198.145.29.99]:36074 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242873AbhITQrn (ORCPT ); Mon, 20 Sep 2021 12:47:43 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 8B07161252; Mon, 20 Sep 2021 16:46:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1632156374; bh=XgvHa65CWjUUgRBizzb40z8/gyBXUse82RGoal8lVsE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=vJwzLSZI1H6FUqkrAew1vPs3J5x2rz00plgVlDOwIn2x+8Hyw1CKrFzHtS7Is7asY vLoWQcsD8e5On1okR8/Et6vkamttwvy+bTbbtj9iRjyZiIFtPDRf6gWK6q6fxJr9Aj ONFbEoT86yhZK2mqK5H2y8XGXObNpAQJifnqfeCI= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Lokesh Vutla , Tero Kristo , Tony Lindgren , Herbert Xu , Sasha Levin Subject: [PATCH 4.4 030/133] crypto: omap-sham - clear dma flags only after omap_sham_update_dma_stop() Date: Mon, 20 Sep 2021 18:41:48 +0200 Message-Id: <20210920163913.608753924@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210920163912.603434365@linuxfoundation.org> References: <20210920163912.603434365@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Tony Lindgren [ Upstream commit fe28140b3393b0ba1eb95cc109f974a7e58b26fd ] 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 Signed-off-by: Herbert Xu Signed-off-by: Sasha Levin --- 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 index 7e9a44cee425..be82186a8afb 100644 --- a/drivers/crypto/omap-sham.c +++ b/drivers/crypto/omap-sham.c @@ -1630,7 +1630,7 @@ static void omap_sham_done_task(unsigned long data) 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.30.2