Received: by 10.223.164.202 with SMTP id h10csp742586wrb; Mon, 6 Nov 2017 14:50:10 -0800 (PST) X-Google-Smtp-Source: ABhQp+STBvoJhIwntNuRnQT60J/p0muM0zT8cLJxunc9xauasOLvrn+z+3RC+CiooSWuz/0gbCUh X-Received: by 10.84.174.197 with SMTP id r63mr16188212plb.44.1510008610740; Mon, 06 Nov 2017 14:50:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510008610; cv=none; d=google.com; s=arc-20160816; b=yUIZBEc3geYhjon6agoG60fjQsw/EESOo86ZBQ+0EfYSQJfyBZKX+lDvr3rFJRoezM tWScsoUMaBbrRaktCoNj0c7GP2HuZqq96lh1JWHuqiERPQJrEIgJo5zkHm3Cn93qeGqL GHlmDcfVd27VI7+jvSNhR2QbOJTYT1vNOqCu5r3XYfoHbjZm4rfuUx7J55axRfJ4E9K0 WsMIziyobHCsgLre3GIzYGrsyDF197acbSeBNotLB6pUwwdOqxvM5CzCQUGqzr4/KnPY kBo5HMk9f2sRKmew7Qis4DehQC1Y/OMzN4FhB714D8gBDIW61nI3edsyd+LTdkvns1hY GEgg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from:arc-authentication-results; bh=YIkvQNtco85axNqkB57uZdZdNfzi5q5HibpBbdcqgEQ=; b=JwxIQ50bwYkXkQrBFBlO85VbKeNd2nSMEvj3JYjyD9lk287eD5KH8OC48tLtoYzy5f H+n9gQVfB89FpndIVfcYGiW4FQzLAz6haLSV5GuHfIjRDMujj+ayKyUXhVyUmn9I+NwS Ki+8Cn+8jEW18zRWNuW1OU0XZR9Gd47aZu+gu6WS++pRmQ2bQMbRBX2AwKJgCDcID0KM nfkmVchEpmxOrt3ctK450ZXQun2D/jmBevpfrf09ZNGnZgU56rLGHAPlXghm+fbXZvvs 3yiMp8fGrsMib3Fe9rCQB/QKtDj6PAzhxAQTYMd8HbO1w3izEore0CZ+B3waDKrlgO3E 2ZjQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i10si11673359pgs.259.2017.11.06.14.49.58; Mon, 06 Nov 2017 14:50:10 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752940AbdKFWnS (ORCPT + 94 others); Mon, 6 Nov 2017 17:43:18 -0500 Received: from mx07-00178001.pphosted.com ([62.209.51.94]:63743 "EHLO mx07-00178001.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752508AbdKFWnQ (ORCPT ); Mon, 6 Nov 2017 17:43:16 -0500 Received: from pps.filterd (m0046037.ppops.net [127.0.0.1]) by mx07-.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id vA6MdR4D000515; Mon, 6 Nov 2017 23:42:40 +0100 Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx07-00178001.pphosted.com with ESMTP id 2e146w4ua7-1 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NOT); Mon, 06 Nov 2017 23:42:40 +0100 Received: from zeta.dmz-eu.st.com (zeta.dmz-eu.st.com [164.129.230.9]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id CC58F31; Mon, 6 Nov 2017 22:42:39 +0000 (GMT) Received: from Webmail-eu.st.com (sfhdag7node2.st.com [10.75.127.20]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 837BDD7C; Mon, 6 Nov 2017 22:42:39 +0000 (GMT) Received: from lmecxl0602.lme.st.com (10.75.127.46) by SFHDAG7NODE2.st.com (10.75.127.20) with Microsoft SMTP Server (TLS) id 15.0.1347.2; Mon, 6 Nov 2017 23:42:38 +0100 From: To: Herbert Xu , "David S . Miller" , Maxime Coquelin , Alexandre Torgue , , , CC: Benjamin Gaignard , Fabien Dessenne , Ludovic Barre , Lionel Debieve Subject: [PATCH v2 1/1] crypto: stm32/hash - Fix return issue on update Date: Mon, 6 Nov 2017 23:41:52 +0100 Message-ID: <1510008112-1573-1-git-send-email-lionel.debieve@st.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.75.127.46] X-ClientProxiedBy: SFHDAG5NODE3.st.com (10.75.127.15) To SFHDAG7NODE2.st.com (10.75.127.20) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-11-06_08:,, signatures=0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Lionel Debieve When data append reached the threshold for processing, we must inform that processing is on going to wait before managing the next request. Signed-off-by: Lionel Debieve --- drivers/crypto/stm32/stm32-hash.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/drivers/crypto/stm32/stm32-hash.c b/drivers/crypto/stm32/stm32-hash.c index c462be7..4ca4a26 100644 --- a/drivers/crypto/stm32/stm32-hash.c +++ b/drivers/crypto/stm32/stm32-hash.c @@ -895,7 +895,6 @@ static int stm32_hash_enqueue(struct ahash_request *req, unsigned int op) static int stm32_hash_update(struct ahash_request *req) { struct stm32_hash_request_ctx *rctx = ahash_request_ctx(req); - int ret; if (!req->nbytes || !(rctx->flags & HASH_FLAGS_CPU)) return 0; @@ -909,12 +908,7 @@ static int stm32_hash_update(struct ahash_request *req) return 0; } - ret = stm32_hash_enqueue(req, HASH_OP_UPDATE); - - if (rctx->flags & HASH_FLAGS_FINUP) - return ret; - - return 0; + return stm32_hash_enqueue(req, HASH_OP_UPDATE); } static int stm32_hash_final(struct ahash_request *req) -- 2.7.4 From 1583655724936950818@xxx Fri Nov 10 05:29:50 +0000 2017 X-GM-THRID: 1583003759650790753 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread