Skip to content

Commit e2b537b

Browse files
committed
crypto: hisilicon - Use request_complete helpers
Use the request_complete helpers instead of calling the completion function directly. Signed-off-by: Herbert Xu <[email protected]>
1 parent 17fcc82 commit e2b537b

File tree

2 files changed

+7
-9
lines changed

2 files changed

+7
-9
lines changed

drivers/crypto/hisilicon/sec/sec_algs.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -504,8 +504,8 @@ static void sec_skcipher_alg_callback(struct sec_bd_info *sec_resp,
504504
kfifo_avail(&ctx->queue->softqueue) >
505505
backlog_req->num_elements)) {
506506
sec_send_request(backlog_req, ctx->queue);
507-
backlog_req->req_base->complete(backlog_req->req_base,
508-
-EINPROGRESS);
507+
crypto_request_complete(backlog_req->req_base,
508+
-EINPROGRESS);
509509
list_del(&backlog_req->backlog_head);
510510
}
511511
}
@@ -534,7 +534,7 @@ static void sec_skcipher_alg_callback(struct sec_bd_info *sec_resp,
534534
if (skreq->src != skreq->dst)
535535
dma_unmap_sg(dev, skreq->dst, sec_req->len_out,
536536
DMA_BIDIRECTIONAL);
537-
skreq->base.complete(&skreq->base, sec_req->err);
537+
skcipher_request_complete(skreq, sec_req->err);
538538
}
539539
}
540540

drivers/crypto/hisilicon/sec2/sec_crypto.c

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1459,12 +1459,11 @@ static void sec_skcipher_callback(struct sec_ctx *ctx, struct sec_req *req,
14591459
break;
14601460

14611461
backlog_sk_req = backlog_req->c_req.sk_req;
1462-
backlog_sk_req->base.complete(&backlog_sk_req->base,
1463-
-EINPROGRESS);
1462+
skcipher_request_complete(backlog_sk_req, -EINPROGRESS);
14641463
atomic64_inc(&ctx->sec->debug.dfx.recv_busy_cnt);
14651464
}
14661465

1467-
sk_req->base.complete(&sk_req->base, err);
1466+
skcipher_request_complete(sk_req, err);
14681467
}
14691468

14701469
static void set_aead_auth_iv(struct sec_ctx *ctx, struct sec_req *req)
@@ -1736,12 +1735,11 @@ static void sec_aead_callback(struct sec_ctx *c, struct sec_req *req, int err)
17361735
break;
17371736

17381737
backlog_aead_req = backlog_req->aead_req.aead_req;
1739-
backlog_aead_req->base.complete(&backlog_aead_req->base,
1740-
-EINPROGRESS);
1738+
aead_request_complete(backlog_aead_req, -EINPROGRESS);
17411739
atomic64_inc(&c->sec->debug.dfx.recv_busy_cnt);
17421740
}
17431741

1744-
a_req->base.complete(&a_req->base, err);
1742+
aead_request_complete(a_req, err);
17451743
}
17461744

17471745
static void sec_request_uninit(struct sec_ctx *ctx, struct sec_req *req)

0 commit comments

Comments
 (0)