Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp2120505ybc; Sun, 17 Nov 2019 14:31:45 -0800 (PST) X-Google-Smtp-Source: APXvYqwUU3x9l2nnFDiHYwwD9l2mgdPhhOEwRoEBWQN9srteTXcfqt12lPuI7h3McRdvJ29C6Bfu X-Received: by 2002:a17:906:c57:: with SMTP id t23mr21565530ejf.240.1574029905764; Sun, 17 Nov 2019 14:31:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574029905; cv=none; d=google.com; s=arc-20160816; b=LJqEVCHU5ePmEoR1ukfz0/NgTB4AanyMKHkB6j4a0sPW3YenCPsdQdJw9f10Z26Bcf CnLobA7FrmP3YaIYHE0LY/RP1ET5pfz2uaZbo3MidYIhpwxwhNxeBgruLjMyB31jXoRk zUDt7v0OeWy7ptQ4OQ8dKWx+DejZSc0+DC2d7Obt4kE34sYYNMdOvjG0TPBgi0mEKjUh BU4vwbJhB+908neIkQvaPMLrno6muEGPxZEprlDYMPhiEavWOf1vhJjQN2GAutZ2NVjQ HU0tL91xsWPlCxY/hypyAAeM2zRuCIr4o28oqP26RBUTe/OPc+IUSObK7wiGABeMTRxH Xqpg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from; bh=j9/VeDsRPLunMxDc4Ubbu5KmsRAao2Up6KuO88KsSeE=; b=gEwt9VNBrIGeNmwk6oPBPaZ5Slj9AIJvFE8WGXHnwTVm6uwhIHCibpJQTuhmRjiYTB LE6okpDV0nRbcSUA+U5AzecfhtRCrkCbcr0WHuODGF4pUxbvBRKHqHMrYBBxNgIkrs40 Xo6rJhmNhhz8G3BD+viFKeGudDEDDgnXdWZMUgOHeGWvzwhgGmpvhII2pmtZZJLZ5sEl Pzj06NWzBCL7NLpuVafLKsVaNfULoDPBPdLmSV22A3p04tsWw7YAATMqnydtlgU+wzhE 2jvh9iR78KenEgQAD02w2FVjBqq9C9wuM2pj3OQPfP/bIEGyP/NOP3FF4FKFUjPxjJCd lkNA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m9si6279235eds.14.2019.11.17.14.31.08; Sun, 17 Nov 2019 14:31:45 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-crypto-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-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726157AbfKQWbE (ORCPT + 99 others); Sun, 17 Nov 2019 17:31:04 -0500 Received: from inva020.nxp.com ([92.121.34.13]:56860 "EHLO inva020.nxp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726171AbfKQWbE (ORCPT ); Sun, 17 Nov 2019 17:31:04 -0500 Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id CE2771A0D0D; Sun, 17 Nov 2019 23:31:02 +0100 (CET) Received: from inva024.eu-rdc02.nxp.com (inva024.eu-rdc02.nxp.com [134.27.226.22]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id C1D601A0D0A; Sun, 17 Nov 2019 23:31:02 +0100 (CET) Received: from lorenz.ea.freescale.net (lorenz.ea.freescale.net [10.171.71.5]) by inva024.eu-rdc02.nxp.com (Postfix) with ESMTP id 5C67B202AF; Sun, 17 Nov 2019 23:31:02 +0100 (CET) From: Iuliana Prodan To: Herbert Xu , Horia Geanta , Aymen Sghaier Cc: "David S. Miller" , Tom Lendacky , Gary Hook , linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org, linux-imx , Iuliana Prodan Subject: [PATCH 01/12] crypto: add helper function for akcipher_request Date: Mon, 18 Nov 2019 00:30:34 +0200 Message-Id: <1574029845-22796-2-git-send-email-iuliana.prodan@nxp.com> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1574029845-22796-1-git-send-email-iuliana.prodan@nxp.com> References: <1574029845-22796-1-git-send-email-iuliana.prodan@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org Add akcipher_request_cast function to get an akcipher_request struct from a crypto_async_request struct. Remove this function from ccp driver. Signed-off-by: Iuliana Prodan --- drivers/crypto/ccp/ccp-crypto-rsa.c | 6 ------ include/crypto/akcipher.h | 6 ++++++ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/crypto/ccp/ccp-crypto-rsa.c b/drivers/crypto/ccp/ccp-crypto-rsa.c index 649c91d..3ab659d 100644 --- a/drivers/crypto/ccp/ccp-crypto-rsa.c +++ b/drivers/crypto/ccp/ccp-crypto-rsa.c @@ -19,12 +19,6 @@ #include "ccp-crypto.h" -static inline struct akcipher_request *akcipher_request_cast( - struct crypto_async_request *req) -{ - return container_of(req, struct akcipher_request, base); -} - static inline int ccp_copy_and_save_keypart(u8 **kpbuf, unsigned int *kplen, const u8 *buf, size_t sz) { diff --git a/include/crypto/akcipher.h b/include/crypto/akcipher.h index 6924b09..4365edd 100644 --- a/include/crypto/akcipher.h +++ b/include/crypto/akcipher.h @@ -170,6 +170,12 @@ static inline struct crypto_akcipher *crypto_akcipher_reqtfm( return __crypto_akcipher_tfm(req->base.tfm); } +static inline struct akcipher_request *akcipher_request_cast( + struct crypto_async_request *req) +{ + return container_of(req, struct akcipher_request, base); +} + /** * crypto_free_akcipher() - free AKCIPHER tfm handle * -- 2.1.0