summaryrefslogtreecommitdiffstats
path: root/crypto
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2015-05-23 15:41:57 +0800
committerHerbert Xu <herbert@gondor.apana.org.au>2015-05-25 18:41:32 +0800
commit374d4ad18a0c4bc844dee42b3b43916e5f46608d (patch)
tree5ed06f31f36a694f9f8706a309f117735b2f1f00 /crypto
parentdd04446e48e859c913a395497ba1a289e707269a (diff)
downloadlinux-374d4ad18a0c4bc844dee42b3b43916e5f46608d.tar.bz2
crypto: aead - Remove unused cryptoff parameter
This patch removes the cryptoff parameter now that all users set it to zero. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'crypto')
-rw-r--r--crypto/aead.c6
-rw-r--r--crypto/echainiv.c4
-rw-r--r--crypto/seqiv.c8
3 files changed, 8 insertions, 10 deletions
diff --git a/crypto/aead.c b/crypto/aead.c
index 070e4b9e94f8..7c3d725bd264 100644
--- a/crypto/aead.c
+++ b/crypto/aead.c
@@ -106,10 +106,8 @@ static int old_crypt(struct aead_request *req,
if (req->old)
return crypt(req);
- src = scatterwalk_ffwd(nreq->srcbuf, req->src,
- req->assoclen + req->cryptoff);
- dst = scatterwalk_ffwd(nreq->dstbuf, req->dst,
- req->assoclen + req->cryptoff);
+ src = scatterwalk_ffwd(nreq->srcbuf, req->src, req->assoclen);
+ dst = scatterwalk_ffwd(nreq->dstbuf, req->dst, req->assoclen);
aead_request_set_tfm(&nreq->subreq, aead);
aead_request_set_callback(&nreq->subreq, aead_request_flags(req),
diff --git a/crypto/echainiv.c b/crypto/echainiv.c
index 149d8fb87962..bd85dcc4fa3d 100644
--- a/crypto/echainiv.c
+++ b/crypto/echainiv.c
@@ -259,7 +259,7 @@ static int echainiv_encrypt(struct aead_request *req)
aead_request_set_callback(subreq, req->base.flags, compl, data);
aead_request_set_crypt(subreq, req->dst, req->dst,
req->cryptlen - ivsize, info);
- aead_request_set_ad(subreq, req->assoclen + ivsize, 0);
+ aead_request_set_ad(subreq, req->assoclen + ivsize);
crypto_xor(info, ctx->salt, ivsize);
scatterwalk_map_and_copy(info, req->dst, req->assoclen, ivsize, 1);
@@ -322,7 +322,7 @@ static int echainiv_decrypt(struct aead_request *req)
aead_request_set_callback(subreq, req->base.flags, compl, data);
aead_request_set_crypt(subreq, req->src, req->dst,
req->cryptlen - ivsize, req->iv);
- aead_request_set_ad(subreq, req->assoclen + ivsize, 0);
+ aead_request_set_ad(subreq, req->assoclen + ivsize);
scatterwalk_map_and_copy(req->iv, req->src, req->assoclen, ivsize, 0);
if (req->src != req->dst)
diff --git a/crypto/seqiv.c b/crypto/seqiv.c
index 16738c5f62bd..127970a69ecf 100644
--- a/crypto/seqiv.c
+++ b/crypto/seqiv.c
@@ -337,7 +337,7 @@ static int seqiv_aead_encrypt_compat(struct aead_request *req)
aead_request_set_callback(subreq, req->base.flags, compl, data);
aead_request_set_crypt(subreq, dst, dst,
req->cryptlen - ivsize, req->iv);
- aead_request_set_ad(subreq, req->assoclen, 0);
+ aead_request_set_ad(subreq, req->assoclen);
memcpy(buf, req->iv, ivsize);
crypto_xor(buf, ctx->salt, ivsize);
@@ -406,7 +406,7 @@ static int seqiv_aead_encrypt(struct aead_request *req)
aead_request_set_callback(subreq, req->base.flags, compl, data);
aead_request_set_crypt(subreq, req->dst, req->dst,
req->cryptlen - ivsize, info);
- aead_request_set_ad(subreq, req->assoclen + ivsize, 0);
+ aead_request_set_ad(subreq, req->assoclen + ivsize);
crypto_xor(info, ctx->salt, ivsize);
scatterwalk_map_and_copy(info, req->dst, req->assoclen, ivsize, 1);
@@ -473,7 +473,7 @@ static int seqiv_aead_decrypt_compat(struct aead_request *req)
aead_request_set_callback(subreq, req->base.flags, compl, data);
aead_request_set_crypt(subreq, dst, dst,
req->cryptlen - ivsize, req->iv);
- aead_request_set_ad(subreq, req->assoclen, 0);
+ aead_request_set_ad(subreq, req->assoclen);
err = crypto_aead_decrypt(subreq);
if (req->assoclen > 8)
@@ -501,7 +501,7 @@ static int seqiv_aead_decrypt(struct aead_request *req)
aead_request_set_callback(subreq, req->base.flags, compl, data);
aead_request_set_crypt(subreq, req->src, req->dst,
req->cryptlen - ivsize, req->iv);
- aead_request_set_ad(subreq, req->assoclen + ivsize, 0);
+ aead_request_set_ad(subreq, req->assoclen + ivsize);
scatterwalk_map_and_copy(req->iv, req->src, req->assoclen, ivsize, 0);
if (req->src != req->dst)