From patchwork Mon Dec 20 09:23:13 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tianjia Zhang X-Patchwork-Id: 1570939 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from gandalf.ozlabs.org (gandalf.ozlabs.org [150.107.74.76]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4JHYzm38pmz9sCD for ; Mon, 20 Dec 2021 20:23:32 +1100 (AEDT) Received: from gandalf.ozlabs.org (gandalf.ozlabs.org [IPv6:2404:9400:2:0:216:3eff:fee2:21ea]) by gandalf.ozlabs.org (Postfix) with ESMTP id 4JHYzl06ztz4xhk for ; Mon, 20 Dec 2021 20:23:31 +1100 (AEDT) Received: by gandalf.ozlabs.org (Postfix) id 4JHYzl00pGz4xhn; Mon, 20 Dec 2021 20:23:31 +1100 (AEDT) Delivered-To: patchwork-incoming@ozlabs.org Authentication-Results: gandalf.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=23.128.96.18; helo=vger.kernel.org; envelope-from=sparclinux-owner@vger.kernel.org; receiver=) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by gandalf.ozlabs.org (Postfix) with ESMTP id 4JHYzk74DQz4xhk for ; Mon, 20 Dec 2021 20:23:30 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232620AbhLTJX3 (ORCPT ); Mon, 20 Dec 2021 04:23:29 -0500 Received: from out30-45.freemail.mail.aliyun.com ([115.124.30.45]:55691 "EHLO out30-45.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231598AbhLTJXY (ORCPT ); Mon, 20 Dec 2021 04:23:24 -0500 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R191e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e04394;MF=tianjia.zhang@linux.alibaba.com;NM=1;PH=DS;RN=17;SR=0;TI=SMTPD_---0V.B9zbM_1639992199; Received: from localhost(mailfrom:tianjia.zhang@linux.alibaba.com fp:SMTPD_---0V.B9zbM_1639992199) by smtp.aliyun-inc.com(127.0.0.1); Mon, 20 Dec 2021 17:23:20 +0800 From: Tianjia Zhang To: Herbert Xu , "David S. Miller" , Thomas Bogendoerfer , Michael Ellerman , Benjamin Herrenschmidt , Paul Mackerras , Heiko Carstens , Vasily Gorbik , Christian Borntraeger , Alexander Gordeev , linux-crypto@vger.kernel.org, linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-s390@vger.kernel.org, sparclinux@vger.kernel.org Cc: Tianjia Zhang Subject: [PATCH 0/5] Remove duplicate context init function for sha algorithm Date: Mon, 20 Dec 2021 17:23:13 +0800 Message-Id: <20211220092318.5793-1-tianjia.zhang@linux.alibaba.com> X-Mailer: git-send-email 2.32.0 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: sparclinux@vger.kernel.org This series of patches is mainly for repetitive code cleaning. The sha algorithm has provided generic context initialization implementation. The context initialization code in the optimized implementation of each platform is a repetitive code and can be deleted. The sha*_base_init() series of functions are used uniformly. Tianjia Zhang (5): crypto: sha256 - remove duplicate generic hash init function crypto: mips/sha - remove duplicate hash init function crypto: powerpc/sha - remove duplicate hash init function crypto: sparc/sha - remove duplicate hash init function crypto: s390/sha512 - Use macros instead of direct IV numbers arch/mips/cavium-octeon/crypto/octeon-sha1.c | 17 +------- .../mips/cavium-octeon/crypto/octeon-sha256.c | 39 ++----------------- .../mips/cavium-octeon/crypto/octeon-sha512.c | 39 ++----------------- arch/powerpc/crypto/sha1-spe-glue.c | 17 +------- arch/powerpc/crypto/sha1.c | 14 +------ arch/powerpc/crypto/sha256-spe-glue.c | 39 ++----------------- arch/s390/crypto/sha512_s390.c | 32 +++++++-------- arch/sparc/crypto/sha1_glue.c | 14 +------ arch/sparc/crypto/sha256_glue.c | 37 ++---------------- arch/sparc/crypto/sha512_glue.c | 37 ++---------------- crypto/sha256_generic.c | 16 +------- 11 files changed, 41 insertions(+), 260 deletions(-)