From patchwork Thu Jul 6 07:37:15 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Bourgoin X-Patchwork-Id: 116553 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9f45:0:b0:3ea:f831:8777 with SMTP id v5csp2388475vqx; Thu, 6 Jul 2023 01:01:43 -0700 (PDT) X-Google-Smtp-Source: APBJJlHOAun+bj6VE8Ln5NuVv2z/Eppeqv56fLKIUW+PGpkH6KXqU4mrz/Go8JJJuK67eRr0aHft X-Received: by 2002:a17:902:d2cf:b0:1b8:3936:7b64 with SMTP id n15-20020a170902d2cf00b001b839367b64mr2344587plc.1.1688630502817; Thu, 06 Jul 2023 01:01:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688630502; cv=none; d=google.com; s=arc-20160816; b=g6eFdcbkr5wLzXO4iRG+opEHp9U/gOunWFK6FTWsV9yD910+qjbmLfdAXIhTdRmDHq EdEpw2pUgJRROyq9Zcs5T/1B/FBrmCVih4PgJx/ND1zA+7rjafVo0L1YJH9P215gCgOE 8S50WnjPViP5KofPkZRETZJEGrk1eL8+V7hQtVyCEw4ovUg/F4Vc4yGCq77NxI7Rryyz MPg93Ks1aZ0pKV/IUMvZcjnOUyUkY73nCMgDweNu9pLaexQixsaThDjXbMJxzzs3/YWy xwCxw2Htx0i4BRJPQxqx9R3I/VPFAiKvC44QwLR4qLWfSjTaWuXxPeJk8Sb1bLRDp7Dc 1vqQ== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=0UZnrptdXS5yGGHYmDYslXqI6bEzrBeZUqIwugAY3VQ=; fh=tUOLXbYg6yQ+/v4k7Q2EmKHjiTMAnnvqlYEqREZQ370=; b=tggWdSnqGgoiJPWEGJGXfIn9yfph0bbu4DdeOTEe02I30lRPJgLKefHOIYS5a/Sj7E 3UlG3udKFtmHX3mpW048lR78qIFpitQNybarTI1z3/Ffw4K0oyYBYaAv4UBwnM1CGHDT f/Zm5ABgyBisGyivZCQwI0OxRrun6EfhcdAUtloIdncE2UwZ2Jd1vyGjRfTtqFoNB1X+ Vv4CRPZJEN2iFp0p/nbi5XxrZlLABCD0xnvpIplC9ojhCzW641X7uxRbDNc+0XXZmG0U KznLO/R9UOyoOlvW602hRsd7+BnP7jKo62l8m1zIGorvR+ADPslMxZUYXQA7lZZs68mP 09oA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@foss.st.com header.s=selector1 header.b=DjRfeln2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=foss.st.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h8-20020a170902748800b001ac6e1fd203si786324pll.180.2023.07.06.01.01.27; Thu, 06 Jul 2023 01:01:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@foss.st.com header.s=selector1 header.b=DjRfeln2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=foss.st.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233840AbjGFHi2 (ORCPT + 99 others); Thu, 6 Jul 2023 03:38:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51842 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233816AbjGFHiZ (ORCPT ); Thu, 6 Jul 2023 03:38:25 -0400 Received: from mx07-00178001.pphosted.com (mx08-00178001.pphosted.com [91.207.212.93]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A2AF81990; Thu, 6 Jul 2023 00:38:23 -0700 (PDT) Received: from pps.filterd (m0046661.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3667J0Zt028384; Thu, 6 Jul 2023 09:37:57 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foss.st.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type; s=selector1; bh=0UZnrptdXS5yGGHYmDYslXqI6bEzrBeZUqIwugAY3VQ=; b=DjRfeln28mXFU/WGW3Gvlf0rOAxFBw13O8tzRDX5JsE+Rb1A+4MplN1jCqqtTacmA1b/ KctoCbBj9afuWAsWCh81HCifDZ0oLQTwT/s8RZuMDCWhS3ZlNiQV61gXQSBYmmKu/nPR 2PIiny18uutbBRXcdYp4cMGfhm645V5jW1GRC880ChoeqFyA5pvhgjxcoNIxV3U6k+xK cfE7PUuFn8Ib95BoK0s74R4wW5ykDaDfSpoXEH1g1adQZAO34VinB853LN01/GsT72Wd cDtiuEXlY2QOkftZDEjyFp626mYPsi0t/qY8fki4AqA0HjTc0yo8Ono6MKqH+5lv0qoB hQ== Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx07-00178001.pphosted.com (PPS) with ESMTPS id 3rns47r4q7-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 06 Jul 2023 09:37:57 +0200 Received: from euls16034.sgp.st.com (euls16034.sgp.st.com [10.75.44.20]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 1B52610005B; Thu, 6 Jul 2023 09:37:57 +0200 (CEST) Received: from Webmail-eu.st.com (shfdag1node3.st.com [10.75.129.71]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id 11FF02115ED; Thu, 6 Jul 2023 09:37:57 +0200 (CEST) Received: from localhost (10.201.22.9) by SHFDAG1NODE3.st.com (10.75.129.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.21; Thu, 6 Jul 2023 09:37:56 +0200 From: Thomas BOURGOIN To: Thomas BOURGOIN , Herbert Xu , "David S . Miller" , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Maxime Coquelin , Alexandre Torgue , Lionel Debieve , Linus Walleij CC: , , , , Subject: [PATCH 3/7] crypto: stm32 - remove bufcnt in stm32_hash_write_ctrl. Date: Thu, 6 Jul 2023 09:37:15 +0200 Message-ID: <20230706073719.1156288-4-thomas.bourgoin@foss.st.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230706073719.1156288-1-thomas.bourgoin@foss.st.com> References: <20230706073719.1156288-1-thomas.bourgoin@foss.st.com> MIME-Version: 1.0 X-Originating-IP: [10.201.22.9] X-ClientProxiedBy: SHFCAS1NODE1.st.com (10.75.129.72) To SHFDAG1NODE3.st.com (10.75.129.71) X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.957,Hydra:6.0.591,FMLib:17.11.176.26 definitions=2023-07-06_04,2023-07-06_01,2023-05-22_02 X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1770657417955883855?= X-GMAIL-MSGID: =?utf-8?q?1770657417955883855?= From: Thomas Bourgoin Commit "crypto: stm32 - Fix empty message processing" remove the use of the argument bufcnt in stm32_hash_write_ctrl. Hence, we can remove it from the function prototype and simplify the function declaration. Signed-off-by: Thomas Bourgoin --- drivers/crypto/stm32/stm32-hash.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/crypto/stm32/stm32-hash.c b/drivers/crypto/stm32/stm32-hash.c index ded718196ac9..420df501360d 100644 --- a/drivers/crypto/stm32/stm32-hash.c +++ b/drivers/crypto/stm32/stm32-hash.c @@ -286,7 +286,7 @@ static int stm32_hash_write_key(struct stm32_hash_dev *hdev) return 0; } -static void stm32_hash_write_ctrl(struct stm32_hash_dev *hdev, int bufcnt) +static void stm32_hash_write_ctrl(struct stm32_hash_dev *hdev) { struct stm32_hash_request_ctx *rctx = ahash_request_ctx(hdev->req); struct crypto_ahash *tfm = crypto_ahash_reqtfm(hdev->req); @@ -395,7 +395,7 @@ static int stm32_hash_xmit_cpu(struct stm32_hash_dev *hdev, hdev->flags |= HASH_FLAGS_CPU; - stm32_hash_write_ctrl(hdev, length); + stm32_hash_write_ctrl(hdev); if (stm32_hash_wait_busy(hdev)) return -ETIMEDOUT; @@ -669,7 +669,7 @@ static int stm32_hash_dma_send(struct stm32_hash_dev *hdev) if (rctx->nents < 0) return -EINVAL; - stm32_hash_write_ctrl(hdev, rctx->total); + stm32_hash_write_ctrl(hdev); if (hdev->flags & HASH_FLAGS_HMAC) { err = stm32_hash_hmac_dma_send(hdev);