Commit 7747cffe authored by Meng Yu's avatar Meng Yu Committed by Herbert Xu

crypto: hisilicon/hpre - remove useless code

1. Remove unused member 'debug_root' in 'struct hpre_debug';
2. The u64 cast is redundant in 'cpu_to_le64'.

Fixes: 84897415("crypto: hisilicon - Add debugfs for HPRE")
Fixes: dadbe4c1("crypto: hisilicon/hpre - update debugfs ...")
Signed-off-by: default avatarMeng Yu <yumeng18@huawei.com>
Reviewed-by: default avatarZaibo Xu <xuzaibo@huawei.com>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent 74d0dcd4
...@@ -56,7 +56,6 @@ struct hpre_dfx { ...@@ -56,7 +56,6 @@ struct hpre_dfx {
* Just relevant for PF. * Just relevant for PF.
*/ */
struct hpre_debug { struct hpre_debug {
struct dentry *debug_root;
struct hpre_dfx dfx[HPRE_DFX_FILE_NUM]; struct hpre_dfx dfx[HPRE_DFX_FILE_NUM];
struct hpre_debugfs_file files[HPRE_DEBUGFS_FILE_NUM]; struct hpre_debugfs_file files[HPRE_DEBUGFS_FILE_NUM];
}; };
......
...@@ -474,7 +474,7 @@ static int hpre_msg_request_set(struct hpre_ctx *ctx, void *req, bool is_rsa) ...@@ -474,7 +474,7 @@ static int hpre_msg_request_set(struct hpre_ctx *ctx, void *req, bool is_rsa)
h_req->areq.dh = kreq; h_req->areq.dh = kreq;
msg = &h_req->req; msg = &h_req->req;
memset(msg, 0, sizeof(*msg)); memset(msg, 0, sizeof(*msg));
msg->key = cpu_to_le64((u64)ctx->dh.dma_xa_p); msg->key = cpu_to_le64(ctx->dh.dma_xa_p);
} }
msg->dw0 |= cpu_to_le32(0x1 << HPRE_SQE_DONE_SHIFT); msg->dw0 |= cpu_to_le32(0x1 << HPRE_SQE_DONE_SHIFT);
...@@ -740,7 +740,7 @@ static int hpre_rsa_enc(struct akcipher_request *req) ...@@ -740,7 +740,7 @@ static int hpre_rsa_enc(struct akcipher_request *req)
return ret; return ret;
msg->dw0 |= cpu_to_le32(HPRE_ALG_NC_NCRT); msg->dw0 |= cpu_to_le32(HPRE_ALG_NC_NCRT);
msg->key = cpu_to_le64((u64)ctx->rsa.dma_pubkey); msg->key = cpu_to_le64(ctx->rsa.dma_pubkey);
ret = hpre_hw_data_init(hpre_req, req->src, req->src_len, 1, 0); ret = hpre_hw_data_init(hpre_req, req->src, req->src_len, 1, 0);
if (unlikely(ret)) if (unlikely(ret))
...@@ -788,11 +788,11 @@ static int hpre_rsa_dec(struct akcipher_request *req) ...@@ -788,11 +788,11 @@ static int hpre_rsa_dec(struct akcipher_request *req)
return ret; return ret;
if (ctx->crt_g2_mode) { if (ctx->crt_g2_mode) {
msg->key = cpu_to_le64((u64)ctx->rsa.dma_crt_prikey); msg->key = cpu_to_le64(ctx->rsa.dma_crt_prikey);
msg->dw0 = cpu_to_le32(le32_to_cpu(msg->dw0) | msg->dw0 = cpu_to_le32(le32_to_cpu(msg->dw0) |
HPRE_ALG_NC_CRT); HPRE_ALG_NC_CRT);
} else { } else {
msg->key = cpu_to_le64((u64)ctx->rsa.dma_prikey); msg->key = cpu_to_le64(ctx->rsa.dma_prikey);
msg->dw0 = cpu_to_le32(le32_to_cpu(msg->dw0) | msg->dw0 = cpu_to_le32(le32_to_cpu(msg->dw0) |
HPRE_ALG_NC_NCRT); HPRE_ALG_NC_NCRT);
} }
......
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