From patchwork Thu Jul 13 15:15:14 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Bourgoin X-Patchwork-Id: 119980 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp1904128vqm; Thu, 13 Jul 2023 08:31:18 -0700 (PDT) X-Google-Smtp-Source: APBJJlEbarcvbmQtAOMincNoqzBj5Y5zlzuHBiZZAcCAXK+2xOAiYCI9AQe267vjpu8WoQluEP5X X-Received: by 2002:a05:6a00:39a3:b0:65e:ec60:b019 with SMTP id fi35-20020a056a0039a300b0065eec60b019mr1758753pfb.25.1689262278710; Thu, 13 Jul 2023 08:31:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689262278; cv=none; d=google.com; s=arc-20160816; b=x4U6t76LAh0S4I9DhSQgKJCqC192IO2+MxVegW9nIjy+tgbLs+yENlYSHNOtRgkgk9 s6iaGXd3CmuMxrJp6Mh+/GLU5B36TDBcpqqUMymPKJGwyk5gBtsQkHhUU+NPCeJB/dsO YwVG47slAFgkR7/NOgC49Vmr15N6jwZeMgjzcOwmy0eRF12wWzt1g2uL2fAwEoM/u/Cc d0DsRDsjaksUBjSaLG647A0Smq9vLc8718D1bbVvi15j0tsfky5OQAsGrGRs2Onf1DPT AOrztG/Cftjut1bmOoLVUxDTS2XL2Jm7NV6hpCYGTcjcY+evjjLc7aF8EOnM/21p8kgl JGNQ== 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=EBYL+++8Y7QXiKb+alEJuFsEPa+FX5GJFw0gOxYXtAc=; fh=BWh4Xd1m+7LavT2Vc4jpfZewYY42/q+ZpXjJP8wEGP8=; b=0gCbnaL89HT1nUd3nHBhqvwmGkPEYuxraWEF4v7XnN7Ri41kOgJy4/hzwtvF1+eLrw wSeZhzMqVkC+30vF7OFd1kIEz9Fntu1oNmsrb7jW9fE/N9Guzf7AdobVrQw3CjCVpE9V PHeSjTq12gyP6ZrQYkatHXL7iWDbDvH1APLfWIYcEnm4i0zk466kN27ra1KDKbt5+7mk PJwj+sCDEnnXNNhwej6HjY0J8ofbaYN0W+Z6aW5fb+Yqsyi9Aw7Rm2shhDf992gw3L9m P9hIsuO43p8ggpMOLvTPjAAsGSp3Dq4JgcTVUmzZVF2YIfAdf0/+WbV0LhPaqrfQ8vD8 aovw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@foss.st.com header.s=selector1 header.b=YntLMC7F; 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 q14-20020a056a00084e00b00660b5630927si5335256pfk.133.2023.07.13.08.31.05; Thu, 13 Jul 2023 08:31:18 -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=YntLMC7F; 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 S234253AbjGMPRO (ORCPT + 99 others); Thu, 13 Jul 2023 11:17:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50712 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234040AbjGMPQ5 (ORCPT ); Thu, 13 Jul 2023 11:16:57 -0400 Received: from mx07-00178001.pphosted.com (mx07-00178001.pphosted.com [185.132.182.106]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F1ADD30EB; Thu, 13 Jul 2023 08:16:43 -0700 (PDT) Received: from pps.filterd (m0288072.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 36DDW6wG024917; Thu, 13 Jul 2023 17:16:29 +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=EBYL+++8Y7QXiKb+alEJuFsEPa+FX5GJFw0gOxYXtAc=; b=YntLMC7FvzRyVO0A3ot3sFHT6TPlaq5bi2D2HrD+6k23NFxoSvaR4EladsdvFA/I6KUR eGk54JP00iktO2asypRGpMyoUSkMZPUv3FtvCqOP8PaYL5GFhVbrrgn3Rlnni0TWQrRs IzOhUdCAfyyVUkRdptPt/BvB+ETWoWc9EwQ01TipzlqhuLqmTO9C9rUGewA3EMX6yFsH 799ok1UBUV3mG9l+uoxrMBZlV3034FHcYX/IO8qzDtjCnMLSTtsVdczF232b1R1CfZYN ePCUm2SS9dQozFU25FBQW9IEod2OGbqPtS1ZPQf80KqAGQgdYL6tFdUCED57cP3zyldB sg== 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 3rtejytdef-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 13 Jul 2023 17:16:29 +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 6A95F100056; Thu, 13 Jul 2023 17:16:28 +0200 (CEST) Received: from Webmail-eu.st.com (shfdag1node3.st.com [10.75.129.71]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id 62F8522A6D9; Thu, 13 Jul 2023 17:16:28 +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, 13 Jul 2023 17:16:30 +0200 From: Thomas BOURGOIN To: Herbert Xu , "David S . Miller" , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Maxime Coquelin , Alexandre Torgue , Lionel Debieve , Linus Walleij CC: , , , , , Thomas Bourgoin Subject: [PATCH v2 3/7] crypto: stm32 - remove bufcnt in stm32_hash_write_ctrl. Date: Thu, 13 Jul 2023 17:15:14 +0200 Message-ID: <20230713151518.1513949-4-thomas.bourgoin@foss.st.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230713151518.1513949-1-thomas.bourgoin@foss.st.com> References: <20230713151518.1513949-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-13_05,2023-07-13_01,2023-05-22_02 X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,RCVD_IN_DNSWL_BLOCKED,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: INBOX X-GMAIL-THRID: 1771319883324386615 X-GMAIL-MSGID: 1771319883324386615 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 30e42a402aa7..c179a6c1a457 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);