Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp833693imu; Wed, 16 Jan 2019 08:18:41 -0800 (PST) X-Google-Smtp-Source: ALg8bN6oieiUYyqo+pDf0rpyyEFAdoVMflEEs0OkvWHhvvXJ3SNC0UMZum6rcbabCMWB+ho6R+0W X-Received: by 2002:a17:902:128c:: with SMTP id g12mr10287149pla.146.1547655521020; Wed, 16 Jan 2019 08:18:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547655521; cv=none; d=google.com; s=arc-20160816; b=dxzFi3s3hyarCy2q4iOJwLWhWPY5OrKOJw/Esx/8OfNvDvTSlrz4SQMZTBtnkxTtSB knUhbYGrX32q4G0XpO5cIqIQcyCNgBPnMzYiRC1TD3TxQPtciP+DZYSHRHUvlIaaSrD6 kgNuCF6GFQPSo6Ua3qJ2HTvUTe3ojLouayzpb4ZBG6effKSA2nwx3SIeE1WyhIp1x/2j G+SXN6CGmmJ8Fo2etBCKOJ8xVpSo+Df1R3WqwjNnADPjOwNO+Ydoy+8xQCZ0cwRQ9OdW vMsXXzhuPB66VWHp4WhXzseza/SmK95ovTDoWdTY2hsa/xJ4/2sUM7WZef43yGfReCyX DFNA== 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; bh=6HlpSgGwQbSNyfmOcHbxRnZD+tcudpc6wHtuJs7qDtc=; b=DVq/z+CPtDiSod9gxIiLZ+E2xrCHm6u+8KfOOo8ZUP1DAJyoftO5uUs3MShP2T8ubH CBzXyEb4864oyIO7IsTo7sCxuZzSt/2brbW3bYd3R3ng3JokgRTrs7yxd+nH88pVblfX ja3NhvYMgd+W9El21FgRYw8/y+/sYtTI2UdiJgKApqHdPCmrUsfaXSut1Vqp4ehBk6Pp BxQJhEA5SM1LKUL+KN1LR2FuSjerfDR7WEz+0luHNVOsXZobd49t37J0cYvcgSyKYSe7 ZW/sFu6BCdAB2TpoVB/9WyMuHYtHCm9WLuSddtcItTeFPSWegvZnQSx6XwFHcP+LYuCZ uaug== 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 43si6766020plb.176.2019.01.16.08.18.05; Wed, 16 Jan 2019 08:18:41 -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 S1730026AbfAPCvT (ORCPT + 99 others); Tue, 15 Jan 2019 21:51:19 -0500 Received: from szxga04-in.huawei.com ([45.249.212.190]:17551 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1729853AbfAPCvR (ORCPT ); Tue, 15 Jan 2019 21:51:17 -0500 Received: from DGGEMS407-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 42B781181E3E55BC449B; Wed, 16 Jan 2019 10:51:15 +0800 (CST) Received: from linux-ibm.site (10.175.102.37) by DGGEMS407-HUB.china.huawei.com (10.3.19.207) with Microsoft SMTP Server id 14.3.408.0; Wed, 16 Jan 2019 10:51:09 +0800 From: Xiongfeng Wang To: , CC: , , , , , Subject: [PATCH 0/5] Crypto Cleanup Date: Wed, 16 Jan 2019 10:50:29 +0800 Message-ID: <1547607034-40948-1-git-send-email-wangxiongfeng2@huawei.com> X-Mailer: git-send-email 1.7.12.4 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.175.102.37] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The patchset introduce a helper to (un)register a array of crypto templates. The following patches use this helper to simplify the code. This is also a preparation for a coming patchset, which will register several crypto templates. Xiongfeng Wang (5): crypto: api - add a helper to (un)register a array of templates crypto: ccm - use template array registering API to simplify the code crypto: gcm - use template array registering API to simplify the code crypto: ctr - use template array registering API to simplify the code crypto: chacha20poly1305 - use template array registering API to simplify the code crypto/algapi.c | 27 ++++++++++++++++ crypto/ccm.c | 81 +++++++++++++++-------------------------------- crypto/chacha20poly1305.c | 38 +++++++++------------- crypto/ctr.c | 46 ++++++++++----------------- crypto/gcm.c | 76 +++++++++++++++----------------------------- include/crypto/algapi.h | 2 ++ 6 files changed, 113 insertions(+), 157 deletions(-) -- 1.7.12.4