crypto: ccp - Reference the correct structure member
Subsystems (2)
PATCH 1/1 crypto: ccp - Reference the correct structure member
Fix a build break by referencing the proper structure member name when invoking functions. Remove unneeded akcipher structure.
Signed-off-by Gary R Hook <[email protected]>
--- drivers/crypto/ccp/Makefile | 1 - drivers/crypto/ccp/ccp-crypto-main.c | 8 -------- drivers/crypto/ccp/ccp-ops.c | 10 +++++----- 3 files changed, 5 insertions(+), 14 deletions(-)
drivers/crypto/ccp/Makefile +0 -1
@@ -12,7 +12,6 @@ ccp-crypto-objs := ccp-crypto-main.o \ ccp-crypto-aes.o \ ccp-crypto-aes-cmac.o \ ccp-crypto-aes-xts.o \ - ccp-crypto-rsa.o \ ccp-crypto-aes-galois.o \ ccp-crypto-des3.o \ ccp-crypto-sha.o
drivers/crypto/ccp/ccp-crypto-main.c +0 -8
@@ -40,7 +40,6 @@/* List heads for the supported algorithms */ static LIST_HEAD (hash_algs);static LIST_HEAD (cipher_algs); -static LIST_HEAD (akcipher_algs);static LIST_HEAD (aead_algs);/* For any tfm, requests for that tfm must be returned on the order
@@ -366,7 +365,6 @@ static void ccp_unregister_algs(void) {struct ccp_crypto_ahash_alg *ahash_alg, *ahash_tmp;struct ccp_crypto_ablkcipher_alg *ablk_alg, *ablk_tmp; -struct ccp_crypto_akcipher_alg *ak_alg, *ak_tmp;struct ccp_crypto_aead *aead_alg, *aead_tmp;list_for_each_entry_safe (ahash_alg, ahash_tmp, &hash_algs, entry) {
@@ -381,12 +379,6 @@ static void ccp_unregister_algs(void)kfree (ablk_alg); } -list_for_each_entry_safe (ak_alg, ak_tmp, &akcipher_algs, entry) { -crypto_unregister_akcipher (&ak_alg->alg); -list_del (&ak_alg->entry); -kfree (ak_alg); - } -list_for_each_entry_safe (aead_alg, aead_tmp, &aead_algs, entry) {crypto_unregister_aead (&aead_alg->alg);list_del (&aead_alg->entry);
drivers/crypto/ccp/ccp-ops.c +5 -5
@@ -709,7 +709,7 @@ static int ccp_run_aes_gcm_cmd(struct ccp_cmd_queue *cmd_q,while (aad.sg_wa.bytes_left) {ccp_prepare_data (&aad,NULL , &op,AES_BLOCK_SIZE , true); - ret = cmd_q->ccp->vdata->ccp_act->aes (&op); + ret = cmd_q->ccp->vdata->perform->aes (&op);if (ret) { cmd->engine_error = cmd_q->cmd_error; goto e_aad;
@@ -758,7 +758,7 @@ static int ccp_run_aes_gcm_cmd(struct ccp_cmd_queue *cmd_q, } } - ret = cmd_q->ccp->vdata->ccp_act->aes (&op); + ret = cmd_q->ccp->vdata->perform->aes (&op);if (ret) { cmd->engine_error = cmd_q->cmd_error; goto e_dst;
@@ -807,7 +807,7 @@ static int ccp_run_aes_gcm_cmd(struct ccp_cmd_queue *cmd_q, op.dst.u.dma.length =AES_BLOCK_SIZE ; op.eom =1 ; op.u.aes.size =0 ; - ret = cmd_q->ccp->vdata->ccp_act->aes (&op); + ret = cmd_q->ccp->vdata->perform->aes (&op);if (ret) goto e_dst;
@@ -1197,7 +1197,7 @@ static int ccp_run_des3_cmd(struct ccp_cmd_queue *cmd_q, struct ccp_cmd *cmd)int ret;/* Error checks */ -if (!cmd_q->ccp->vdata->ccp_act->des3) +if (!cmd_q->ccp->vdata->perform->des3)return -EINVAL ;if (des3->key_len !=DES3_EDE_KEY_SIZE )
@@ -1335,7 +1335,7 @@ static int ccp_run_des3_cmd(struct ccp_cmd_queue *cmd_q, struct ccp_cmd *cmd) op.soc =0 ; } - ret = cmd_q->ccp->vdata->ccp_act->des3 (&op); + ret = cmd_q->ccp->vdata->perform->des3 (&op);if (ret) { cmd->engine_error = cmd_q->cmd_error; goto e_dst;
Quoted 3 lines · Gary R Hook
Fix a build break by referencing the proper structure member name when invoking functions. Remove unneeded akcipher structure.
Please ignore. I was mistakenly under the impression that the referenced patchset had been accepted.
Quoted 110 lines
Signed-off-by Gary R Hook <[email protected]>--- drivers/crypto/ccp/Makefile | 1 - drivers/crypto/ccp/ccp-crypto-main.c | 8 -------- drivers/crypto/ccp/ccp-ops.c | 10 +++++----- 3 files changed, 5 insertions(+), 14 deletions(-)drivers/crypto/ccp/Makefile +0
-1@@ -12,7 +12,6 @@ ccp-crypto-objs := ccp-crypto-main.o \ ccp-crypto-aes.o \ ccp-crypto-aes-cmac.o \ ccp-crypto-aes-xts.o \ - ccp-crypto-rsa.o \ ccp-crypto-aes-galois.o \ ccp-crypto-des3.o \ ccp-crypto-sha.odrivers/crypto/ccp/ccp-crypto-main.c +0
-8@@ -40,7 +40,6 @@/* List heads for the supported algorithms */ static LIST_HEAD (hash_algs);static LIST_HEAD (cipher_algs); -static LIST_HEAD (akcipher_algs);static LIST_HEAD (aead_algs);/* For any tfm, requests for that tfm must be returned on the order @@ -366,7 +365,6 @@ static void ccp_unregister_algs(void) {struct ccp_crypto_ahash_alg *ahash_alg, *ahash_tmp;struct ccp_crypto_ablkcipher_alg *ablk_alg, *ablk_tmp; -struct ccp_crypto_akcipher_alg *ak_alg, *ak_tmp;struct ccp_crypto_aead *aead_alg, *aead_tmp;list_for_each_entry_safe (ahash_alg, ahash_tmp, &hash_algs, entry) {@@ -381,12 +379,6 @@ static void ccp_unregister_algs(void)kfree (ablk_alg); } -list_for_each_entry_safe (ak_alg, ak_tmp, &akcipher_algs, entry) { -crypto_unregister_akcipher (&ak_alg->alg); -list_del (&ak_alg->entry); -kfree (ak_alg); - } -list_for_each_entry_safe (aead_alg, aead_tmp, &aead_algs, entry) {crypto_unregister_aead (&aead_alg->alg);list_del (&aead_alg->entry);drivers/crypto/ccp/ccp-ops.c +1
-1@@ -709,7 +709,7 @@ static int ccp_run_aes_gcm_cmd(struct ccp_cmd_queue *cmd_q, while (aad.sg_wa.bytes_left) {ccp_prepare_data (&aad,NULL , &op,AES_BLOCK_SIZE , true); - ret = cmd_q->ccp->vdata->ccp_act->aes (&op); + ret = cmd_q->ccp->vdata->perform->aes (&op);if (ret) {cmd->engine_error = cmd_q->cmd_error; goto e_aad;drivers/crypto/ccp/ccp-ops.c +1
-1@@ -758,7 +758,7 @@ static int ccp_run_aes_gcm_cmd(struct ccp_cmd_queue *cmd_q, } } - ret = cmd_q->ccp->vdata->ccp_act->aes (&op); + ret = cmd_q->ccp->vdata->perform->aes (&op);if (ret) { cmd->engine_error = cmd_q->cmd_error;goto e_dst;drivers/crypto/ccp/ccp-ops.c +2
-2@@ -807,7 +807,7 @@ static int ccp_run_aes_gcm_cmd(struct ccp_cmd_queue *cmd_q, op.dst.u.dma.length =AES_BLOCK_SIZE ; op.eom =1 ; op.u.aes.size =0 ; - ret = cmd_q->ccp->vdata->ccp_act->aes (&op); + ret = cmd_q->ccp->vdata->perform->aes (&op);if (ret) goto e_dst;@@ -1197,7 +1197,7 @@ static int ccp_run_des3_cmd(struct ccp_cmd_queue *cmd_q, struct ccp_cmd *cmd)int ret;/* Error checks */ -if (!cmd_q->ccp->vdata->ccp_act->des3) +if (!cmd_q->ccp->vdata->perform->des3)return -EINVAL ;if (des3->key_len != DES3_EDE_KEY_SIZE)drivers/crypto/ccp/ccp-ops.c +1
-1@@ -1335,7 +1335,7 @@ static int ccp_run_des3_cmd(struct ccp_cmd_queue *cmd_q, struct ccp_cmd *cmd) op.soc =0 ; } - ret = cmd_q->ccp->vdata->ccp_act->des3 (&op); + ret = cmd_q->ccp->vdata->perform->des3 (&op);if (ret) { cmd->engine_error = cmd_q->cmd_error;goto e_dst;
Signature · 3 lines
This is my day job. Follow me at: IG/Twitter/Facebook: @grhookphoto IG/Twitter/Facebook: @grhphotographer