Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp1416267pxu; Thu, 17 Dec 2020 09:25:09 -0800 (PST) X-Google-Smtp-Source: ABdhPJxL8DxR4MkqX04QmEk3s2mSZbWCiRjTOaWvokVJQUmXEdQf8js3Fe6S/bKzyydDsIef6MVQ X-Received: by 2002:a17:906:82ce:: with SMTP id a14mr36488559ejy.421.1608225909296; Thu, 17 Dec 2020 09:25:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608225909; cv=none; d=google.com; s=arc-20160816; b=lAIvs+4bv9xLlc+42211FCUPM0hd1/kO1PiWL+98PZM21opUA+2w1W2Zh0Bb6UbIUK vlAiMzdlBKFtgVYrwhzRzd+/kL06K9GvqR0X6xSvv1b+/t6b50ybAcda/Ovo28kXHTSg 5YcHIBPzNkGrsq4rmr8T4Sfzge78tRKncSNX0VoSUM+mF8fzwIblv73TrJlVdxiR9oO/ VUX254CwJTHj7ANSaJ4/8cJPChu+qAOUKUi+2JLReA8A1qyJhd9Tq+j2NehBmZ3T2HLr iFxVJ4KJFWKel+lGmwZYGHLj/tc63nnYYd1MBV0VnJUbGX1dTLtHo1H9c1+HRMJcV4vm zj/g== 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 :ironport-sdr:ironport-sdr; bh=vudrT7wnYyL75uSK3/lyR0f+ohJXbk24oeJtw5qvvws=; b=QLylkBYrjaqIRaFA7Ge67fF9+6cNLtgfuxIxSpzYpALnlofEIfgFsncsbPoAJSfhz0 3ig4FlrIOYci/6fhrXiVtcOEbZ0kj4Vg1uxv22p6FkPzpeG8CJt3aS3FqaMOo3hpqjEm Wd9ed5G1rIhSje2wuTwtYKBPtnfC6DNGrPSdj6GZOzc2Z7Z9tKXJ5YCcTDct05fgCa96 o48KThnQbJ3knxgBkbEVVGf2vr992/xjj4qPWBhyfJWAg5phSDV9BTFgHbdi93m1BU/Y OO4MvtvKSL5+2SXCd9xiH8obm/lBBInG5GecJe8JfGqtVXuCT0NZlOiSf7DRLNL/DHxK ZWug== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n9si5047141edi.179.2020.12.17.09.24.50; Thu, 17 Dec 2020 09:25:09 -0800 (PST) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728677AbgLQRXT (ORCPT + 99 others); Thu, 17 Dec 2020 12:23:19 -0500 Received: from mga05.intel.com ([192.55.52.43]:47109 "EHLO mga05.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728080AbgLQRXT (ORCPT ); Thu, 17 Dec 2020 12:23:19 -0500 IronPort-SDR: FRnS5eWIqSOMuNuSWwwg+ERU45LLIuo/M7kly4pywr1NZAR1wtPb90AYD97+iyFAHfY5b8hiKC Tl8kZg/xFYfw== X-IronPort-AV: E=McAfee;i="6000,8403,9838"; a="260017886" X-IronPort-AV: E=Sophos;i="5.78,428,1599548400"; d="scan'208";a="260017886" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Dec 2020 09:21:33 -0800 IronPort-SDR: 3ktaQRjA2hM4aHVK5MIggWjDMziplyWZz+UONeXn4Qgzp8Lc8/6ZMumirnxUR+5FTQ8dSLjqTD 6DOmP25GMYmw== X-IronPort-AV: E=Sophos;i="5.78,428,1599548400"; d="scan'208";a="369930940" Received: from cdonohoe-mobl2.ger.corp.intel.com (HELO dalessan-mobl1.ir.intel.com) ([10.252.13.146]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Dec 2020 09:21:30 -0800 From: Daniele Alessandrelli To: linux-crypto@vger.kernel.org, Herbert Xu , "David S. Miller" Cc: devicetree@vger.kernel.org, Rob Herring , Daniele Alessandrelli , Mark Gross , Prabhjot Khurana , Elena Reshetova Subject: [RFC PATCH 2/6] crypto: ecc - Move ecc.h to include/crypto/internal Date: Thu, 17 Dec 2020 17:20:57 +0000 Message-Id: <20201217172101.381772-3-daniele.alessandrelli@linux.intel.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20201217172101.381772-1-daniele.alessandrelli@linux.intel.com> References: <20201217172101.381772-1-daniele.alessandrelli@linux.intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org From: Daniele Alessandrelli Move ecc.h header file to 'include/crypto/internal' so that it can be easily imported from everywhere in the kernel tree. This change is done to allow crypto device drivers to re-use the symbols exported by 'crypto/ecc.c', thus avoiding code duplication. Signed-off-by: Daniele Alessandrelli --- crypto/ecc.c | 2 +- crypto/ecdh.c | 2 +- crypto/ecrdsa.c | 2 +- crypto/ecrdsa_defs.h | 2 +- {crypto => include/crypto/internal}/ecc.h | 0 5 files changed, 4 insertions(+), 4 deletions(-) rename {crypto => include/crypto/internal}/ecc.h (100%) diff --git a/crypto/ecc.c b/crypto/ecc.c index c80aa25994a0..9aa801315a32 100644 --- a/crypto/ecc.c +++ b/crypto/ecc.c @@ -31,10 +31,10 @@ #include #include #include +#include #include #include -#include "ecc.h" #include "ecc_curve_defs.h" typedef struct { diff --git a/crypto/ecdh.c b/crypto/ecdh.c index d56b8603dec9..edb06ce90d1d 100644 --- a/crypto/ecdh.c +++ b/crypto/ecdh.c @@ -6,11 +6,11 @@ */ #include +#include #include #include #include #include -#include "ecc.h" struct ecdh_ctx { unsigned int curve_id; diff --git a/crypto/ecrdsa.c b/crypto/ecrdsa.c index 6a3fd09057d0..b32ffcaad9ad 100644 --- a/crypto/ecrdsa.c +++ b/crypto/ecrdsa.c @@ -20,12 +20,12 @@ #include #include #include +#include #include #include #include #include "ecrdsa_params.asn1.h" #include "ecrdsa_pub_key.asn1.h" -#include "ecc.h" #include "ecrdsa_defs.h" #define ECRDSA_MAX_SIG_SIZE (2 * 512 / 8) diff --git a/crypto/ecrdsa_defs.h b/crypto/ecrdsa_defs.h index 170baf039007..0056335b9d03 100644 --- a/crypto/ecrdsa_defs.h +++ b/crypto/ecrdsa_defs.h @@ -13,7 +13,7 @@ #ifndef _CRYTO_ECRDSA_DEFS_H #define _CRYTO_ECRDSA_DEFS_H -#include "ecc.h" +#include #define ECRDSA_MAX_SIG_SIZE (2 * 512 / 8) #define ECRDSA_MAX_DIGITS (512 / 64) diff --git a/crypto/ecc.h b/include/crypto/internal/ecc.h similarity index 100% rename from crypto/ecc.h rename to include/crypto/internal/ecc.h -- 2.26.2