Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753918AbbGFHly (ORCPT ); Mon, 6 Jul 2015 03:41:54 -0400 Received: from helcar.hengli.com.au ([209.40.204.226]:49135 "EHLO helcar.hengli.com.au" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752855AbbGFHlv (ORCPT ); Mon, 6 Jul 2015 03:41:51 -0400 Date: Mon, 6 Jul 2015 15:41:45 +0800 From: Herbert Xu To: Lokesh Vutla Cc: linux-crypto@vger.kernel.org, davem@davemloft.net, linux-omap@vger.kernel.org, linux-kernel@vger.kernel.org, t-kristo@ti.com, nsekhar@ti.com Subject: Re: [PATCH 03/10] crypto: aead: Add aead_request_cast() api Message-ID: <20150706074145.GC20192@gondor.apana.org.au> References: <1435814320-30347-1-git-send-email-lokeshvutla@ti.com> <1435814320-30347-4-git-send-email-lokeshvutla@ti.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1435814320-30347-4-git-send-email-lokeshvutla@ti.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1244 Lines: 36 On Thu, Jul 02, 2015 at 10:48:33AM +0530, Lokesh Vutla wrote: > 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); > +} > + This should go into include/crypto/internal/aead.h. Thanks, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/