Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1803523imu; Thu, 17 Jan 2019 03:34:49 -0800 (PST) X-Google-Smtp-Source: ALg8bN7+bcU+AGmgK8VkT0394eL7jC6iyXd/bpY78zCbg8hLEYDSq9aLFvtwPjebKT5RrdREUt4X X-Received: by 2002:a63:170c:: with SMTP id x12mr12811908pgl.364.1547724889184; Thu, 17 Jan 2019 03:34:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547724889; cv=none; d=google.com; s=arc-20160816; b=WEjhDnnroOXvf10035L7D43XlRKYcBD7Z1tUaiDNE3HLkf4KIbjU2TRFv/lD1lpBJK rmMH9mShpmV1Fd32phoath8cXxZtNHmdV2INTiOkL6YCeHwjj+tpdTd22pvIfzGq6o8N vULQiEqfy3rBrcKcD4PXqGFPwZa4T+AfqyEXat3LbEcPYSsGtOIg5koWWd5LJWyHKZ4Z 9vC3VxJHLl40F739VS9/SYN54D/umbIs+tJzSb0+Ghvah4TFeZfGRJd25364J6ExKWtu BxY4SS8QuAhNi3I3g8O3vxx6X1GSGx5Rrde76ViQMdcrC9bSqLdA8RdWRGWi8GnGq9lD rafQ== 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=pQsrvktMYuK723pHQddspkJfbQ/EYDDzKqHwecRwY9g=; b=FWMHYiw2H5VaLbwpUbLj3XvzXnY6WkLXZGLrP9YDQgCa0jTifvV98cxUT8rXCQxAOx 7506qrajxO74qxnlPYywehpgKX+KrmJmNsucfL7mGPAhAFXEUZQw7hv/J1MBBW9TERYF QXbHZVz429/xJukU3fIZYIeVCZrrkQ4wr7oXIEMnHF44LnNFnvkOQFwWUHz7QQ6EotyN JVnCWYYLDtzF8M8/jMnZZu0IymIfF2ErLgVMMUqQsB3qvB3ZYdsmvk3jnTcRHrD0aw4z G87pNKVOJvDxCY6o1gbD6jWm1IBH+/lNQJbUulPW6ncTEFIg/92MCNQW4vFQAMYIcfi0 rcEQ== 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 c32si1560643plj.38.2019.01.17.03.34.33; Thu, 17 Jan 2019 03:34:49 -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 S1728723AbfAQGsy (ORCPT + 99 others); Thu, 17 Jan 2019 01:48:54 -0500 Received: from szxga05-in.huawei.com ([45.249.212.191]:2246 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728158AbfAQGsw (ORCPT ); Thu, 17 Jan 2019 01:48:52 -0500 Received: from DGGEMS407-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 6BB83D4CD3F727F93D2F; Thu, 17 Jan 2019 14:48:50 +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; Thu, 17 Jan 2019 14:48:42 +0800 From: Xiongfeng Wang To: , , CC: , , , , , Subject: [PATCH V2 0/5] Crypto Cleanup Date: Thu, 17 Jan 2019 14:47:58 +0800 Message-ID: <1547707683-45878-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: 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 | 43 +++++++++----------------- crypto/gcm.c | 73 ++++++++++++++------------------------------ include/crypto/algapi.h | 2 ++ 6 files changed, 104 insertions(+), 156 deletions(-) -- 1.7.12.4