]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commitdiff
crypto: aead - move aead_request_cast helper to aead.h
authorTadeusz Struk <tadeusz.struk@intel.com>
Mon, 1 Feb 2016 19:17:30 +0000 (11:17 -0800)
committerHerbert Xu <herbert@gondor.apana.org.au>
Sat, 6 Feb 2016 07:33:22 +0000 (15:33 +0800)
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>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/atmel-aes.c
include/crypto/internal/aead.h

index 6dd3317ca3653947c00ee4790ca18417f3431d79..949af89cdac3de55c0c03c9a78d0e4ad1ae268cb 100644 (file)
@@ -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;
index 5554cdd8d6c17344f049f138e57027defc050dc1..da3864991d4c50b33a4145c57444d8a70a0db14a 100644 (file)
@@ -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)
 {