2021-01-06 09:31:30

by Dan Carpenter

[permalink] [raw]
Subject: [PATCH] crypto: keembay-ocs-hcu - Fix a WARN() message

The first argument to WARN() is a condition and the messages is the
second argument is the string, so this WARN() will only display the
__func__ part of the message.

Fixes: ae832e329a8d ("crypto: keembay-ocs-hcu - Add HMAC support")
Signed-off-by: Dan Carpenter <[email protected]>
---
drivers/crypto/keembay/keembay-ocs-hcu-core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/crypto/keembay/keembay-ocs-hcu-core.c b/drivers/crypto/keembay/keembay-ocs-hcu-core.c
index d547af047131..c4b97b4160e9 100644
--- a/drivers/crypto/keembay/keembay-ocs-hcu-core.c
+++ b/drivers/crypto/keembay/keembay-ocs-hcu-core.c
@@ -388,7 +388,7 @@ static int prepare_ipad(struct ahash_request *req)
* longer keys are hashed by kmb_ocs_hcu_setkey()).
*/
if (ctx->key_len > rctx->blk_sz) {
- WARN("%s: Invalid key length in tfm context\n", __func__);
+ WARN(1, "%s: Invalid key length in tfm context\n", __func__);
return -EINVAL;
}
memzero_explicit(&ctx->key[ctx->key_len],
--
2.29.2


2021-01-06 12:11:25

by Alessandrelli, Daniele

[permalink] [raw]
Subject: Re: [PATCH] crypto: keembay-ocs-hcu - Fix a WARN() message

Hi Dan,

Thanks for finding and fixing this.

On Wed, 2021-01-06 at 12:25 +0300, Dan Carpenter wrote:
> The first argument to WARN() is a condition and the messages is the
> second argument is the string, so this WARN() will only display the
> __func__ part of the message.
>
> Fixes: ae832e329a8d ("crypto: keembay-ocs-hcu - Add HMAC support")
> Signed-off-by: Dan Carpenter <[email protected]>
> ---
> drivers/crypto/keembay/keembay-ocs-hcu-core.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
>

Acked-by: Daniele Alessandrelli <[email protected]>

2021-01-14 06:50:05

by Herbert Xu

[permalink] [raw]
Subject: Re: [PATCH] crypto: keembay-ocs-hcu - Fix a WARN() message

On Wed, Jan 06, 2021 at 12:25:08PM +0300, Dan Carpenter wrote:
> The first argument to WARN() is a condition and the messages is the
> second argument is the string, so this WARN() will only display the
> __func__ part of the message.
>
> Fixes: ae832e329a8d ("crypto: keembay-ocs-hcu - Add HMAC support")
> Signed-off-by: Dan Carpenter <[email protected]>
> ---
> drivers/crypto/keembay/keembay-ocs-hcu-core.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)

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