Commit 791b4d5f authored by Herbert Xu's avatar Herbert Xu Committed by David S. Miller

[CRYPTO] api: Add missing headers for setkey_unaligned

This patch ensures that kernel.h and slab.h are included for
the setkey_unaligned function.  It also breaks a couple of
long lines.
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent 39e1ee01
...@@ -16,10 +16,13 @@ ...@@ -16,10 +16,13 @@
#include <crypto/algapi.h> #include <crypto/algapi.h>
#include <linux/errno.h> #include <linux/errno.h>
#include <linux/init.h> #include <linux/init.h>
#include <linux/kernel.h>
#include <linux/module.h> #include <linux/module.h>
#include <linux/slab.h>
#include <linux/seq_file.h> #include <linux/seq_file.h>
static int setkey_unaligned(struct crypto_ablkcipher *tfm, const u8 *key, unsigned int keylen) static int setkey_unaligned(struct crypto_ablkcipher *tfm, const u8 *key,
unsigned int keylen)
{ {
struct ablkcipher_alg *cipher = crypto_ablkcipher_alg(tfm); struct ablkcipher_alg *cipher = crypto_ablkcipher_alg(tfm);
unsigned long alignmask = crypto_ablkcipher_alignmask(tfm); unsigned long alignmask = crypto_ablkcipher_alignmask(tfm);
......
...@@ -339,7 +339,8 @@ static int blkcipher_walk_first(struct blkcipher_desc *desc, ...@@ -339,7 +339,8 @@ static int blkcipher_walk_first(struct blkcipher_desc *desc,
return blkcipher_walk_next(desc, walk); return blkcipher_walk_next(desc, walk);
} }
static int setkey_unaligned(struct crypto_tfm *tfm, const u8 *key, unsigned int keylen) static int setkey_unaligned(struct crypto_tfm *tfm, const u8 *key,
unsigned int keylen)
{ {
struct blkcipher_alg *cipher = &tfm->__crt_alg->cra_blkcipher; struct blkcipher_alg *cipher = &tfm->__crt_alg->cra_blkcipher;
unsigned long alignmask = crypto_tfm_alg_alignmask(tfm); unsigned long alignmask = crypto_tfm_alg_alignmask(tfm);
...@@ -360,8 +361,7 @@ static int setkey_unaligned(struct crypto_tfm *tfm, const u8 *key, unsigned int ...@@ -360,8 +361,7 @@ static int setkey_unaligned(struct crypto_tfm *tfm, const u8 *key, unsigned int
return ret; return ret;
} }
static int setkey(struct crypto_tfm *tfm, const u8 *key, static int setkey(struct crypto_tfm *tfm, const u8 *key, unsigned int keylen)
unsigned int keylen)
{ {
struct blkcipher_alg *cipher = &tfm->__crt_alg->cra_blkcipher; struct blkcipher_alg *cipher = &tfm->__crt_alg->cra_blkcipher;
unsigned long alignmask = crypto_tfm_alg_alignmask(tfm); unsigned long alignmask = crypto_tfm_alg_alignmask(tfm);
......
...@@ -16,11 +16,12 @@ ...@@ -16,11 +16,12 @@
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/crypto.h> #include <linux/crypto.h>
#include <linux/errno.h> #include <linux/errno.h>
#include <linux/scatterlist.h> #include <linux/slab.h>
#include <linux/string.h> #include <linux/string.h>
#include "internal.h" #include "internal.h"
static int setkey_unaligned(struct crypto_tfm *tfm, const u8 *key, unsigned int keylen) static int setkey_unaligned(struct crypto_tfm *tfm, const u8 *key,
unsigned int keylen)
{ {
struct cipher_alg *cia = &tfm->__crt_alg->cra_cipher; struct cipher_alg *cia = &tfm->__crt_alg->cra_cipher;
unsigned long alignmask = crypto_tfm_alg_alignmask(tfm); unsigned long alignmask = crypto_tfm_alg_alignmask(tfm);
......
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
#include <linux/errno.h> #include <linux/errno.h>
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/module.h> #include <linux/module.h>
#include <linux/slab.h>
#include <linux/seq_file.h> #include <linux/seq_file.h>
#include "internal.h" #include "internal.h"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment