Skip to content

Commit c4f6d44

Browse files
Harsh Jainherbertx
authored andcommitted
crypto: chelsio - cleanup:send addr as value in function argument
Send dma address as value to function arguments instead of pointer. Signed-off-by: Harsh Jain <harsh@chelsio.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
1 parent d5a4dfb commit c4f6d44

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

drivers/crypto/chelsio/chcr_algo.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -391,15 +391,15 @@ static inline void dsgl_walk_end(struct dsgl_walk *walk, unsigned short qid,
391391

392392
static inline void dsgl_walk_add_page(struct dsgl_walk *walk,
393393
size_t size,
394-
dma_addr_t *addr)
394+
dma_addr_t addr)
395395
{
396396
int j;
397397

398398
if (!size)
399399
return;
400400
j = walk->nents;
401401
walk->to->len[j % 8] = htons(size);
402-
walk->to->addr[j % 8] = cpu_to_be64(*addr);
402+
walk->to->addr[j % 8] = cpu_to_be64(addr);
403403
j++;
404404
if ((j % 8) == 0)
405405
walk->to++;
@@ -473,16 +473,16 @@ static inline void ulptx_walk_end(struct ulptx_walk *walk)
473473

474474
static inline void ulptx_walk_add_page(struct ulptx_walk *walk,
475475
size_t size,
476-
dma_addr_t *addr)
476+
dma_addr_t addr)
477477
{
478478
if (!size)
479479
return;
480480

481481
if (walk->nents == 0) {
482482
walk->sgl->len0 = cpu_to_be32(size);
483-
walk->sgl->addr0 = cpu_to_be64(*addr);
483+
walk->sgl->addr0 = cpu_to_be64(addr);
484484
} else {
485-
walk->pair->addr[walk->pair_idx] = cpu_to_be64(*addr);
485+
walk->pair->addr[walk->pair_idx] = cpu_to_be64(addr);
486486
walk->pair->len[walk->pair_idx] = cpu_to_be32(size);
487487
walk->pair_idx = !walk->pair_idx;
488488
if (!walk->pair_idx)
@@ -2481,7 +2481,7 @@ void chcr_add_aead_src_ent(struct aead_request *req,
24812481
ulptx_walk_init(&ulp_walk, ulptx);
24822482
if (reqctx->b0_len)
24832483
ulptx_walk_add_page(&ulp_walk, reqctx->b0_len,
2484-
&reqctx->b0_dma);
2484+
reqctx->b0_dma);
24852485
ulptx_walk_add_sg(&ulp_walk, req->src, req->cryptlen +
24862486
req->assoclen, 0);
24872487
ulptx_walk_end(&ulp_walk);
@@ -2500,7 +2500,7 @@ void chcr_add_aead_dst_ent(struct aead_request *req,
25002500
u32 temp;
25012501

25022502
dsgl_walk_init(&dsgl_walk, phys_cpl);
2503-
dsgl_walk_add_page(&dsgl_walk, IV + reqctx->b0_len, &reqctx->iv_dma);
2503+
dsgl_walk_add_page(&dsgl_walk, IV + reqctx->b0_len, reqctx->iv_dma);
25042504
temp = req->assoclen + req->cryptlen +
25052505
(reqctx->op ? -authsize : authsize);
25062506
dsgl_walk_add_sg(&dsgl_walk, req->dst, temp, 0);
@@ -2571,7 +2571,7 @@ void chcr_add_hash_src_ent(struct ahash_request *req,
25712571
ulptx_walk_init(&ulp_walk, ulptx);
25722572
if (param->bfr_len)
25732573
ulptx_walk_add_page(&ulp_walk, param->bfr_len,
2574-
&reqctx->hctx_wr.dma_addr);
2574+
reqctx->hctx_wr.dma_addr);
25752575
ulptx_walk_add_sg(&ulp_walk, reqctx->hctx_wr.srcsg,
25762576
param->sg_len, reqctx->hctx_wr.src_ofst);
25772577
reqctx->hctx_wr.srcsg = ulp_walk.last_sg;

0 commit comments

Comments
 (0)