Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1323430 > unrolled thread

[PATCH v2 1/2] crypto: aead - move aead_request_cast helper to aead.h

Started byTadeusz Struk <tadeusz.struk@intel.com>
First post2016-02-01 20:30 +0100
Last post2016-02-06 08:50 +0100
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH v2 1/2] crypto: aead - move aead_request_cast helper to  aead.h Tadeusz Struk <tadeusz.struk@intel.com> - 2016-02-01 20:30 +0100
    Re: [PATCH v2 1/2] crypto: aead - move aead_request_cast helper to  aead.h Herbert Xu <herbert@gondor.apana.org.au> - 2016-02-06 08:50 +0100

#1323430 — [PATCH v2 1/2] crypto: aead - move aead_request_cast helper to aead.h

FromTadeusz Struk <tadeusz.struk@intel.com>
Date2016-02-01 20:30 +0100
Subject[PATCH v2 1/2] crypto: aead - move aead_request_cast helper to aead.h
Message-ID<qXskG-7wZ-13@gated-at.bofh.it>
Move the helper function to common header for everybody to use.

changes in v2:
- move the helper to crypto/internal/aead.h
  instead of crypto/aead.h

Signed-off-by: Tadeusz Struk <tadeusz.struk@intel.com>
---
 drivers/crypto/atmel-aes.c     |    6 ------
 include/crypto/internal/aead.h |    6 ++++++
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/crypto/atmel-aes.c b/drivers/crypto/atmel-aes.c
index 6dd3317..949af89 100644
--- a/drivers/crypto/atmel-aes.c
+++ b/drivers/crypto/atmel-aes.c
@@ -369,12 +369,6 @@ static inline size_t atmel_aes_padlen(size_t len, size_t block_size)
 	return len ? block_size - len : 0;
 }
 
-static inline struct aead_request *
-aead_request_cast(struct crypto_async_request *req)
-{
-	return container_of(req, struct aead_request, base);
-}
-
 static struct atmel_aes_dev *atmel_aes_find_dev(struct atmel_aes_base_ctx *ctx)
 {
 	struct atmel_aes_dev *aes_dd = NULL;
diff --git a/include/crypto/internal/aead.h b/include/crypto/internal/aead.h
index 5554cdd..da38649 100644
--- a/include/crypto/internal/aead.h
+++ b/include/crypto/internal/aead.h
@@ -80,6 +80,12 @@ static inline u32 aead_request_flags(struct aead_request *req)
 	return req->base.flags;
 }
 
+static inline struct aead_request *aead_request_cast(
+	struct crypto_async_request *req)
+{
+	return container_of(req, struct aead_request, base);
+}
+
 static inline void crypto_set_aead_spawn(
 	struct crypto_aead_spawn *spawn, struct crypto_instance *inst)
 {

[toc] | [next] | [standalone]


#1328251

FromHerbert Xu <herbert@gondor.apana.org.au>
Date2016-02-06 08:50 +0100
Message-ID<qZ5N0-46X-17@gated-at.bofh.it>
In reply to#1323430
On Mon, Feb 01, 2016 at 11:17:30AM -0800, Tadeusz Struk wrote:
> Move the helper function to common header for everybody to use.
> 
> changes in v2:
> - move the helper to crypto/internal/aead.h
>   instead of crypto/aead.h
> 
> Signed-off-by: Tadeusz Struk <tadeusz.struk@intel.com>

Applied.
-- 
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web