All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] crypto: aead - move aead_request_cast helper to aead.h
@ 2016-01-27 22:09 Tadeusz Struk
  2016-02-01  9:46 ` Herbert Xu
  0 siblings, 1 reply; 4+ messages in thread
From: Tadeusz Struk @ 2016-01-27 22:09 UTC (permalink / raw)
  To: herbert; +Cc: smueller, tadeusz.struk, linux-crypto, linux-kernel

Move the helper function to common header for everybody to use.

Signed-off-by: Tadeusz Struk <tadeusz.struk@intel.com>
---
 drivers/crypto/atmel-aes.c |    6 ------
 include/crypto/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/aead.h b/include/crypto/aead.h
index 84d13b1..2de15fc 100644
--- a/include/crypto/aead.h
+++ b/include/crypto/aead.h
@@ -304,6 +304,12 @@ static inline struct crypto_aead *crypto_aead_reqtfm(struct aead_request *req)
 	return __crypto_aead_cast(req->base.tfm);
 }
 
+static inline struct aead_request *aead_request_cast(
+					struct crypto_async_request *req)
+{
+	return container_of(req, struct aead_request, base);
+}
+
 /**
  * crypto_aead_encrypt() - encrypt plaintext
  * @req: reference to the aead_request handle that holds all information

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-02-01 16:20 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-01-27 22:09 [PATCH] crypto: aead - move aead_request_cast helper to aead.h Tadeusz Struk
2016-02-01  9:46 ` Herbert Xu
2016-02-01 15:46   ` Tadeusz Struk
2016-02-01 16:20     ` Herbert Xu

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.