Skip to content

Commit 3e3dc25

Browse files
mdrustadherbertx
authored andcommitted
crypto: Resolve shadow warnings
Change formal parameters to not clash with global names to eliminate many W=2 warnings. Signed-off-by: Mark Rustad <mark.d.rustad@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
1 parent 4839ddc commit 3e3dc25

9 files changed

Lines changed: 82 additions & 81 deletions

File tree

‎crypto/cryptd.c‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -233,15 +233,15 @@ static void cryptd_blkcipher_decrypt(struct crypto_async_request *req, int err)
233233
}
234234

235235
static int cryptd_blkcipher_enqueue(struct ablkcipher_request *req,
236-
crypto_completion_t complete)
236+
crypto_completion_t compl)
237237
{
238238
struct cryptd_blkcipher_request_ctx *rctx = ablkcipher_request_ctx(req);
239239
struct crypto_ablkcipher *tfm = crypto_ablkcipher_reqtfm(req);
240240
struct cryptd_queue *queue;
241241

242242
queue = cryptd_get_queue(crypto_ablkcipher_tfm(tfm));
243243
rctx->complete = req->base.complete;
244-
req->base.complete = complete;
244+
req->base.complete = compl;
245245

246246
return cryptd_enqueue_request(queue, &req->base);
247247
}
@@ -414,15 +414,15 @@ static int cryptd_hash_setkey(struct crypto_ahash *parent,
414414
}
415415

416416
static int cryptd_hash_enqueue(struct ahash_request *req,
417-
crypto_completion_t complete)
417+
crypto_completion_t compl)
418418
{
419419
struct cryptd_hash_request_ctx *rctx = ahash_request_ctx(req);
420420
struct crypto_ahash *tfm = crypto_ahash_reqtfm(req);
421421
struct cryptd_queue *queue =
422422
cryptd_get_queue(crypto_ahash_tfm(tfm));
423423

424424
rctx->complete = req->base.complete;
425-
req->base.complete = complete;
425+
req->base.complete = compl;
426426

427427
return cryptd_enqueue_request(queue, &req->base);
428428
}
@@ -667,14 +667,14 @@ static void cryptd_aead_decrypt(struct crypto_async_request *areq, int err)
667667
}
668668

669669
static int cryptd_aead_enqueue(struct aead_request *req,
670-
crypto_completion_t complete)
670+
crypto_completion_t compl)
671671
{
672672
struct cryptd_aead_request_ctx *rctx = aead_request_ctx(req);
673673
struct crypto_aead *tfm = crypto_aead_reqtfm(req);
674674
struct cryptd_queue *queue = cryptd_get_queue(crypto_aead_tfm(tfm));
675675

676676
rctx->complete = req->base.complete;
677-
req->base.complete = complete;
677+
req->base.complete = compl;
678678
return cryptd_enqueue_request(queue, &req->base);
679679
}
680680

‎crypto/eseqiv.c‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ static int eseqiv_givencrypt(struct skcipher_givcrypt_request *req)
6868
struct eseqiv_ctx *ctx = crypto_ablkcipher_ctx(geniv);
6969
struct eseqiv_request_ctx *reqctx = skcipher_givcrypt_reqctx(req);
7070
struct ablkcipher_request *subreq;
71-
crypto_completion_t complete;
71+
crypto_completion_t compl;
7272
void *data;
7373
struct scatterlist *osrc, *odst;
7474
struct scatterlist *dst;
@@ -86,7 +86,7 @@ static int eseqiv_givencrypt(struct skcipher_givcrypt_request *req)
8686
ablkcipher_request_set_tfm(subreq, skcipher_geniv_cipher(geniv));
8787

8888
giv = req->giv;
89-
complete = req->creq.base.complete;
89+
compl = req->creq.base.complete;
9090
data = req->creq.base.data;
9191

9292
osrc = req->creq.src;
@@ -101,11 +101,11 @@ static int eseqiv_givencrypt(struct skcipher_givcrypt_request *req)
101101
if (vsrc != giv + ivsize && vdst != giv + ivsize) {
102102
giv = PTR_ALIGN((u8 *)reqctx->tail,
103103
crypto_ablkcipher_alignmask(geniv) + 1);
104-
complete = eseqiv_complete;
104+
compl = eseqiv_complete;
105105
data = req;
106106
}
107107

108-
ablkcipher_request_set_callback(subreq, req->creq.base.flags, complete,
108+
ablkcipher_request_set_callback(subreq, req->creq.base.flags, compl,
109109
data);
110110

111111
sg_init_table(reqctx->src, 2);

‎crypto/gcm.c‎

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -228,14 +228,14 @@ static void gcm_hash_final_done(struct crypto_async_request *areq, int err);
228228

229229
static int gcm_hash_update(struct aead_request *req,
230230
struct crypto_gcm_req_priv_ctx *pctx,
231-
crypto_completion_t complete,
231+
crypto_completion_t compl,
232232
struct scatterlist *src,
233233
unsigned int len)
234234
{
235235
struct ahash_request *ahreq = &pctx->u.ahreq;
236236

237237
ahash_request_set_callback(ahreq, aead_request_flags(req),
238-
complete, req);
238+
compl, req);
239239
ahash_request_set_crypt(ahreq, src, NULL, len);
240240

241241
return crypto_ahash_update(ahreq);
@@ -244,12 +244,12 @@ static int gcm_hash_update(struct aead_request *req,
244244
static int gcm_hash_remain(struct aead_request *req,
245245
struct crypto_gcm_req_priv_ctx *pctx,
246246
unsigned int remain,
247-
crypto_completion_t complete)
247+
crypto_completion_t compl)
248248
{
249249
struct ahash_request *ahreq = &pctx->u.ahreq;
250250

251251
ahash_request_set_callback(ahreq, aead_request_flags(req),
252-
complete, req);
252+
compl, req);
253253
sg_init_one(pctx->src, gcm_zeroes, remain);
254254
ahash_request_set_crypt(ahreq, pctx->src, NULL, remain);
255255

@@ -375,14 +375,14 @@ static void __gcm_hash_assoc_remain_done(struct aead_request *req, int err)
375375
{
376376
struct crypto_gcm_req_priv_ctx *pctx = crypto_gcm_reqctx(req);
377377
struct crypto_gcm_ghash_ctx *gctx = &pctx->ghash_ctx;
378-
crypto_completion_t complete;
378+
crypto_completion_t compl;
379379
unsigned int remain = 0;
380380

381381
if (!err && gctx->cryptlen) {
382382
remain = gcm_remain(gctx->cryptlen);
383-
complete = remain ? gcm_hash_crypt_done :
383+
compl = remain ? gcm_hash_crypt_done :
384384
gcm_hash_crypt_remain_done;
385-
err = gcm_hash_update(req, pctx, complete,
385+
err = gcm_hash_update(req, pctx, compl,
386386
gctx->src, gctx->cryptlen);
387387
if (err == -EINPROGRESS || err == -EBUSY)
388388
return;
@@ -429,14 +429,14 @@ static void gcm_hash_assoc_done(struct crypto_async_request *areq, int err)
429429
static void __gcm_hash_init_done(struct aead_request *req, int err)
430430
{
431431
struct crypto_gcm_req_priv_ctx *pctx = crypto_gcm_reqctx(req);
432-
crypto_completion_t complete;
432+
crypto_completion_t compl;
433433
unsigned int remain = 0;
434434

435435
if (!err && req->assoclen) {
436436
remain = gcm_remain(req->assoclen);
437-
complete = remain ? gcm_hash_assoc_done :
437+
compl = remain ? gcm_hash_assoc_done :
438438
gcm_hash_assoc_remain_done;
439-
err = gcm_hash_update(req, pctx, complete,
439+
err = gcm_hash_update(req, pctx, compl,
440440
req->assoc, req->assoclen);
441441
if (err == -EINPROGRESS || err == -EBUSY)
442442
return;
@@ -462,7 +462,7 @@ static int gcm_hash(struct aead_request *req,
462462
struct crypto_gcm_ghash_ctx *gctx = &pctx->ghash_ctx;
463463
struct crypto_gcm_ctx *ctx = crypto_tfm_ctx(req->base.tfm);
464464
unsigned int remain;
465-
crypto_completion_t complete;
465+
crypto_completion_t compl;
466466
int err;
467467

468468
ahash_request_set_tfm(ahreq, ctx->ghash);
@@ -473,8 +473,8 @@ static int gcm_hash(struct aead_request *req,
473473
if (err)
474474
return err;
475475
remain = gcm_remain(req->assoclen);
476-
complete = remain ? gcm_hash_assoc_done : gcm_hash_assoc_remain_done;
477-
err = gcm_hash_update(req, pctx, complete, req->assoc, req->assoclen);
476+
compl = remain ? gcm_hash_assoc_done : gcm_hash_assoc_remain_done;
477+
err = gcm_hash_update(req, pctx, compl, req->assoc, req->assoclen);
478478
if (err)
479479
return err;
480480
if (remain) {
@@ -484,8 +484,8 @@ static int gcm_hash(struct aead_request *req,
484484
return err;
485485
}
486486
remain = gcm_remain(gctx->cryptlen);
487-
complete = remain ? gcm_hash_crypt_done : gcm_hash_crypt_remain_done;
488-
err = gcm_hash_update(req, pctx, complete, gctx->src, gctx->cryptlen);
487+
compl = remain ? gcm_hash_crypt_done : gcm_hash_crypt_remain_done;
488+
err = gcm_hash_update(req, pctx, compl, gctx->src, gctx->cryptlen);
489489
if (err)
490490
return err;
491491
if (remain) {

‎crypto/seqiv.c‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -100,15 +100,15 @@ static int seqiv_givencrypt(struct skcipher_givcrypt_request *req)
100100
struct crypto_ablkcipher *geniv = skcipher_givcrypt_reqtfm(req);
101101
struct seqiv_ctx *ctx = crypto_ablkcipher_ctx(geniv);
102102
struct ablkcipher_request *subreq = skcipher_givcrypt_reqctx(req);
103-
crypto_completion_t complete;
103+
crypto_completion_t compl;
104104
void *data;
105105
u8 *info;
106106
unsigned int ivsize;
107107
int err;
108108

109109
ablkcipher_request_set_tfm(subreq, skcipher_geniv_cipher(geniv));
110110

111-
complete = req->creq.base.complete;
111+
compl = req->creq.base.complete;
112112
data = req->creq.base.data;
113113
info = req->creq.info;
114114

@@ -122,11 +122,11 @@ static int seqiv_givencrypt(struct skcipher_givcrypt_request *req)
122122
if (!info)
123123
return -ENOMEM;
124124

125-
complete = seqiv_complete;
125+
compl = seqiv_complete;
126126
data = req;
127127
}
128128

129-
ablkcipher_request_set_callback(subreq, req->creq.base.flags, complete,
129+
ablkcipher_request_set_callback(subreq, req->creq.base.flags, compl,
130130
data);
131131
ablkcipher_request_set_crypt(subreq, req->creq.src, req->creq.dst,
132132
req->creq.nbytes, info);
@@ -146,15 +146,15 @@ static int seqiv_aead_givencrypt(struct aead_givcrypt_request *req)
146146
struct seqiv_ctx *ctx = crypto_aead_ctx(geniv);
147147
struct aead_request *areq = &req->areq;
148148
struct aead_request *subreq = aead_givcrypt_reqctx(req);
149-
crypto_completion_t complete;
149+
crypto_completion_t compl;
150150
void *data;
151151
u8 *info;
152152
unsigned int ivsize;
153153
int err;
154154

155155
aead_request_set_tfm(subreq, aead_geniv_base(geniv));
156156

157-
complete = areq->base.complete;
157+
compl = areq->base.complete;
158158
data = areq->base.data;
159159
info = areq->iv;
160160

@@ -168,11 +168,11 @@ static int seqiv_aead_givencrypt(struct aead_givcrypt_request *req)
168168
if (!info)
169169
return -ENOMEM;
170170

171-
complete = seqiv_aead_complete;
171+
compl = seqiv_aead_complete;
172172
data = req;
173173
}
174174

175-
aead_request_set_callback(subreq, areq->base.flags, complete, data);
175+
aead_request_set_callback(subreq, areq->base.flags, compl, data);
176176
aead_request_set_crypt(subreq, areq->src, areq->dst, areq->cryptlen,
177177
info);
178178
aead_request_set_assoc(subreq, areq->assoc, areq->assoclen);

0 commit comments

Comments
 (0)