Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2761004imu; Thu, 17 Jan 2019 22:00:33 -0800 (PST) X-Google-Smtp-Source: ALg8bN6iE55Md7Yav4AT/r5v1zSXjPyMHFgb+4clbytpMwMWYZZWkAvIP3yjiyllvIL9R6lVaH9B X-Received: by 2002:a17:902:6f09:: with SMTP id w9mr18351218plk.309.1547791233826; Thu, 17 Jan 2019 22:00:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547791233; cv=none; d=google.com; s=arc-20160816; b=r9bD1CDu/3LCkZR6TCQaRgWNeCmjWORO2mNSWMZvi8L6HCRiWpBQ7mo3EVQ+hPtUt6 rDSegKAJ8ZIOQzJUBWP/bQLJ4XsdBwsVi8G8QoEj92CmnjYZPkAQcbY3i+ypEYTt0Pxb vgZ6yJr0Wkkb+eNJ3+xabJrZuNH5iDpa3JLx1HB8n8kJASD5Woq97ZLPB7YxfShXDwQ6 jKs4Tw11UbXeSpmarfdpkROK6UMWxp09qK+g5NDtVQWO82j9BxLiKUPj+q3eomMSlYDp tLWLYcIqGsh99qQg2WafMzPrafF3mlLw3jWBBtN7jidecwyKMsfM13Rjd+G/731z6r1a oUaQ== 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=XpAjS8a4MRPeYtMhq2Rrzjelgc5ywwtNEgXu4kLcc7U=; b=V+qgC6mOHdAGSA9oh2b1XIyInP27HtCwoW+bG0v1ssy322Lz2CTp+hqH/+WZFH6DqF h7lTu7sTE9BorjST5m9fK2i69iuXZZQoeLZX3xNDLYgQ0Fl5R9cyIb5Ivt0bGY32D42R 6QoPRPjGoBoZ4Yqu+2WqhwoULYw8BCUUhfF+Q7mDmF0v5e1IYTC757c1bOFD5o42RZwV 8Y1dKiDeToLUtNoFI79qUvkdOqQDSAls+hRU1SPjfxvVh7gUZChF/mvdu5q0Bi+/IGY2 mg4c4+MyMCpnWCLS0T4D7O5LBF54PFeyOYB+Uf8HhsiFNDywrokGcp17Bhnjy3lh0fwC GnvQ== 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 124si3385988pgg.397.2019.01.17.22.00.15; Thu, 17 Jan 2019 22:00:33 -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 S1727225AbfARF66 (ORCPT + 99 others); Fri, 18 Jan 2019 00:58:58 -0500 Received: from szxga05-in.huawei.com ([45.249.212.191]:2257 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727084AbfARF65 (ORCPT ); Fri, 18 Jan 2019 00:58:57 -0500 Received: from DGGEMS403-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id C316EE5D7D3A6B51A102; Fri, 18 Jan 2019 13:58:54 +0800 (CST) Received: from linux-ibm.site (10.175.102.37) by DGGEMS403-HUB.china.huawei.com (10.3.19.203) with Microsoft SMTP Server id 14.3.408.0; Fri, 18 Jan 2019 13:58:48 +0800 From: Xiongfeng Wang To: , , CC: , , , , , Subject: [PATCH V3 0/5] Crypto Cleanup Date: Fri, 18 Jan 2019 13:58:10 +0800 Message-ID: <1547791095-48339-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. Changelog: v2 -> v3: remove the extra blank line in the fourth patch change author to Xiongfeng Wang v1 -> v2: rebased to cryptodev, fix some format issue 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 | 78 ++++++++++++++--------------------------------- crypto/chacha20poly1305.c | 37 +++++++++------------- crypto/ctr.c | 42 +++++++++---------------- crypto/gcm.c | 73 ++++++++++++++------------------------------ include/crypto/algapi.h | 2 ++ 6 files changed, 103 insertions(+), 156 deletions(-) -- 1.7.12.4