Commit 1b3eeb87 authored by Christophe JAILLET's avatar Christophe JAILLET Committed by Herbert Xu

crypto: chelsio - Fix some pr_xxx messages

At the top this file, we have:
   #define pr_fmt(fmt) "chcr:" fmt

So there is no need to repeat "chcr : " in some error message when the
pr_xxx macro is used.
This would lead to log "chcr:chcr : blabla"
Signed-off-by: default avatarChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent d110cf0a
...@@ -1215,7 +1215,7 @@ static int chcr_handle_cipher_resp(struct skcipher_request *req, ...@@ -1215,7 +1215,7 @@ static int chcr_handle_cipher_resp(struct skcipher_request *req,
wrparam.bytes = bytes; wrparam.bytes = bytes;
skb = create_cipher_wr(&wrparam); skb = create_cipher_wr(&wrparam);
if (IS_ERR(skb)) { if (IS_ERR(skb)) {
pr_err("chcr : %s : Failed to form WR. No memory\n", __func__); pr_err("%s : Failed to form WR. No memory\n", __func__);
err = PTR_ERR(skb); err = PTR_ERR(skb);
goto unmap; goto unmap;
} }
...@@ -1545,7 +1545,7 @@ static int get_alg_config(struct algo_param *params, ...@@ -1545,7 +1545,7 @@ static int get_alg_config(struct algo_param *params,
params->result_size = SHA512_DIGEST_SIZE; params->result_size = SHA512_DIGEST_SIZE;
break; break;
default: default:
pr_err("chcr : ERROR, unsupported digest size\n"); pr_err("ERROR, unsupported digest size\n");
return -EINVAL; return -EINVAL;
} }
return 0; return 0;
...@@ -3560,7 +3560,7 @@ static int chcr_authenc_setkey(struct crypto_aead *authenc, const u8 *key, ...@@ -3560,7 +3560,7 @@ static int chcr_authenc_setkey(struct crypto_aead *authenc, const u8 *key,
goto out; goto out;
if (get_alg_config(&param, max_authsize)) { if (get_alg_config(&param, max_authsize)) {
pr_err("chcr : Unsupported digest size\n"); pr_err("Unsupported digest size\n");
goto out; goto out;
} }
subtype = get_aead_subtype(authenc); subtype = get_aead_subtype(authenc);
...@@ -3579,7 +3579,7 @@ static int chcr_authenc_setkey(struct crypto_aead *authenc, const u8 *key, ...@@ -3579,7 +3579,7 @@ static int chcr_authenc_setkey(struct crypto_aead *authenc, const u8 *key,
} else if (keys.enckeylen == AES_KEYSIZE_256) { } else if (keys.enckeylen == AES_KEYSIZE_256) {
ck_size = CHCR_KEYCTX_CIPHER_KEY_SIZE_256; ck_size = CHCR_KEYCTX_CIPHER_KEY_SIZE_256;
} else { } else {
pr_err("chcr : Unsupported cipher key\n"); pr_err("Unsupported cipher key\n");
goto out; goto out;
} }
...@@ -3597,7 +3597,7 @@ static int chcr_authenc_setkey(struct crypto_aead *authenc, const u8 *key, ...@@ -3597,7 +3597,7 @@ static int chcr_authenc_setkey(struct crypto_aead *authenc, const u8 *key,
} }
base_hash = chcr_alloc_shash(max_authsize); base_hash = chcr_alloc_shash(max_authsize);
if (IS_ERR(base_hash)) { if (IS_ERR(base_hash)) {
pr_err("chcr : Base driver cannot be loaded\n"); pr_err("Base driver cannot be loaded\n");
goto out; goto out;
} }
{ {
...@@ -3613,7 +3613,7 @@ static int chcr_authenc_setkey(struct crypto_aead *authenc, const u8 *key, ...@@ -3613,7 +3613,7 @@ static int chcr_authenc_setkey(struct crypto_aead *authenc, const u8 *key,
keys.authkeylen, keys.authkeylen,
o_ptr); o_ptr);
if (err) { if (err) {
pr_err("chcr : Base driver cannot be loaded\n"); pr_err("Base driver cannot be loaded\n");
goto out; goto out;
} }
keys.authkeylen = max_authsize; keys.authkeylen = max_authsize;
...@@ -3698,7 +3698,7 @@ static int chcr_aead_digest_null_setkey(struct crypto_aead *authenc, ...@@ -3698,7 +3698,7 @@ static int chcr_aead_digest_null_setkey(struct crypto_aead *authenc,
} else if (keys.enckeylen == AES_KEYSIZE_256) { } else if (keys.enckeylen == AES_KEYSIZE_256) {
ck_size = CHCR_KEYCTX_CIPHER_KEY_SIZE_256; ck_size = CHCR_KEYCTX_CIPHER_KEY_SIZE_256;
} else { } else {
pr_err("chcr : Unsupported cipher key %d\n", keys.enckeylen); pr_err("Unsupported cipher key %d\n", keys.enckeylen);
goto out; goto out;
} }
memcpy(aeadctx->key, keys.enckey, keys.enckeylen); memcpy(aeadctx->key, keys.enckey, keys.enckeylen);
...@@ -3734,7 +3734,7 @@ static int chcr_aead_op(struct aead_request *req, ...@@ -3734,7 +3734,7 @@ static int chcr_aead_op(struct aead_request *req,
cdev = a_ctx(tfm)->dev; cdev = a_ctx(tfm)->dev;
if (!cdev) { if (!cdev) {
pr_err("chcr : %s : No crypto device.\n", __func__); pr_err("%s : No crypto device.\n", __func__);
return -ENXIO; return -ENXIO;
} }
...@@ -4487,8 +4487,7 @@ static int chcr_register_alg(void) ...@@ -4487,8 +4487,7 @@ static int chcr_register_alg(void)
break; break;
} }
if (err) { if (err) {
pr_err("chcr : %s : Algorithm registration failed\n", pr_err("%s : Algorithm registration failed\n", name);
name);
goto register_err; goto register_err;
} else { } else {
driver_algs[i].is_registered = 1; driver_algs[i].is_registered = 1;
......
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