2019-08-20 11:27:10

by Iuliana Prodan

[permalink] [raw]
Subject: [PATCH] crypto: caam/qi - use print_hex_dump_debug function to print debug messages

Use print_hex_dump_debug function to print debug messages, instead of
print_hex_dump inside #ifdef DEBUG.

Fixes: 6e005503199b ("crypto: caam - print debug messages at debug level")
Signed-off-by: Iuliana Prodan <[email protected]>
---
drivers/crypto/caam/caamalg_qi.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/drivers/crypto/caam/caamalg_qi.c b/drivers/crypto/caam/caamalg_qi.c
index fb54b2c..3b30862 100644
--- a/drivers/crypto/caam/caamalg_qi.c
+++ b/drivers/crypto/caam/caamalg_qi.c
@@ -234,11 +234,10 @@ static int aead_setkey(struct crypto_aead *aead, const u8 *key,
dma_sync_single_for_device(jrdev->parent, ctx->key_dma,
ctx->adata.keylen_pad + keys.enckeylen,
ctx->dir);
-#ifdef DEBUG
- print_hex_dump(KERN_ERR, "ctx.key@" __stringify(__LINE__)": ",
- DUMP_PREFIX_ADDRESS, 16, 4, ctx->key,
- ctx->adata.keylen_pad + keys.enckeylen, 1);
-#endif
+
+ print_hex_dump_debug("ctx.key@" __stringify(__LINE__)": ",
+ DUMP_PREFIX_ADDRESS, 16, 4, ctx->key,
+ ctx->adata.keylen_pad + keys.enckeylen, 1);

skip_split_key:
ctx->cdata.keylen = keys.enckeylen;
--
2.1.0


2019-08-30 08:21:09

by Herbert Xu

[permalink] [raw]
Subject: Re: [PATCH] crypto: caam/qi - use print_hex_dump_debug function to print debug messages

On Tue, Aug 20, 2019 at 02:26:39PM +0300, Iuliana Prodan wrote:
> Use print_hex_dump_debug function to print debug messages, instead of
> print_hex_dump inside #ifdef DEBUG.
>
> Fixes: 6e005503199b ("crypto: caam - print debug messages at debug level")
> Signed-off-by: Iuliana Prodan <[email protected]>
> ---
> drivers/crypto/caam/caamalg_qi.c | 9 ++++-----
> 1 file changed, 4 insertions(+), 5 deletions(-)

Patch applied. Thanks.
--
Email: Herbert Xu <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt