From patchwork Thu Jul 2 05:18:33 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lokesh Vutla X-Patchwork-Id: 6707741 Return-Path: X-Original-To: patchwork-linux-omap@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 89F8EC05AC for ; Thu, 2 Jul 2015 05:24:13 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C491B206E0 for ; Thu, 2 Jul 2015 05:24:12 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D880D20671 for ; Thu, 2 Jul 2015 05:24:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752980AbbGBFWM (ORCPT ); Thu, 2 Jul 2015 01:22:12 -0400 Received: from comal.ext.ti.com ([198.47.26.152]:35618 "EHLO comal.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751361AbbGBFVv (ORCPT ); Thu, 2 Jul 2015 01:21:51 -0400 Received: from dflxv15.itg.ti.com ([128.247.5.124]) by comal.ext.ti.com (8.13.7/8.13.7) with ESMTP id t625LmbM020677; Thu, 2 Jul 2015 00:21:48 -0500 Received: from DLEE70.ent.ti.com (dlemailx.itg.ti.com [157.170.170.113]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id t625LmBp017319; Thu, 2 Jul 2015 00:21:48 -0500 Received: from dflp33.itg.ti.com (10.64.6.16) by DLEE70.ent.ti.com (157.170.170.113) with Microsoft SMTP Server id 14.3.224.2; Thu, 2 Jul 2015 00:21:42 -0500 Received: from a0131933.apr.dhcp.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp33.itg.ti.com (8.14.3/8.13.8) with ESMTP id t625Lb9Y024297; Thu, 2 Jul 2015 00:21:46 -0500 From: Lokesh Vutla To: , , CC: , , , , Subject: [PATCH 03/10] crypto: aead: Add aead_request_cast() api Date: Thu, 2 Jul 2015 10:48:33 +0530 Message-ID: <1435814320-30347-4-git-send-email-lokeshvutla@ti.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1435814320-30347-1-git-send-email-lokeshvutla@ti.com> References: <1435814320-30347-1-git-send-email-lokeshvutla@ti.com> MIME-Version: 1.0 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Add aead_request_cast() api to get pointer to aead_request from cryto_async_request. Signed-off-by: Lokesh Vutla --- include/linux/crypto.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/linux/crypto.h b/include/linux/crypto.h index 10df5d2..20fac3d 100644 --- a/include/linux/crypto.h +++ b/include/linux/crypto.h @@ -1460,6 +1460,12 @@ static inline void aead_request_set_tfm(struct aead_request *req, req->base.tfm = crypto_aead_tfm(crypto_aead_crt(tfm)->base); } +static inline struct aead_request *aead_request_cast( + struct crypto_async_request *req) +{ + return container_of(req, struct aead_request, base); +} + /** * aead_request_alloc() - allocate request data structure * @tfm: cipher handle to be registered with the request