Linux cryptographic layer development
 help / color / mirror / Atom feed
* [PATCH] crypto: keembay-ocs-hcu - Fix a WARN() message
@ 2021-01-06  9:25 Dan Carpenter
  2021-01-06 12:10 ` Alessandrelli, Daniele
  2021-01-14  6:47 ` Herbert Xu
  0 siblings, 2 replies; 3+ messages in thread
From: Dan Carpenter @ 2021-01-06  9:25 UTC (permalink / raw)
  To: Daniele Alessandrelli
  Cc: Declan Murphy, Herbert Xu, David S. Miller, linux-crypto,
	kernel-janitors

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 <dan.carpenter@oracle.com>
---
 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


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] crypto: keembay-ocs-hcu - Fix a WARN() message
  2021-01-06  9:25 [PATCH] crypto: keembay-ocs-hcu - Fix a WARN() message Dan Carpenter
@ 2021-01-06 12:10 ` Alessandrelli, Daniele
  2021-01-14  6:47 ` Herbert Xu
  1 sibling, 0 replies; 3+ messages in thread
From: Alessandrelli, Daniele @ 2021-01-06 12:10 UTC (permalink / raw)
  To: dan.carpenter@oracle.com
  Cc: Murphy, Declan, herbert@gondor.apana.org.au, davem@davemloft.net,
	linux-crypto@vger.kernel.org, kernel-janitors@vger.kernel.org

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 <dan.carpenter@oracle.com>
> ---
>  drivers/crypto/keembay/keembay-ocs-hcu-core.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> 

Acked-by: Daniele Alessandrelli <daniele.alessandrelli@intel.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] crypto: keembay-ocs-hcu - Fix a WARN() message
  2021-01-06  9:25 [PATCH] crypto: keembay-ocs-hcu - Fix a WARN() message Dan Carpenter
  2021-01-06 12:10 ` Alessandrelli, Daniele
@ 2021-01-14  6:47 ` Herbert Xu
  1 sibling, 0 replies; 3+ messages in thread
From: Herbert Xu @ 2021-01-14  6:47 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: Daniele Alessandrelli, Declan Murphy, David S. Miller,
	linux-crypto, kernel-janitors

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 <dan.carpenter@oracle.com>
> ---
>  drivers/crypto/keembay/keembay-ocs-hcu-core.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-01-14  6:49 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-01-06  9:25 [PATCH] crypto: keembay-ocs-hcu - Fix a WARN() message Dan Carpenter
2021-01-06 12:10 ` Alessandrelli, Daniele
2021-01-14  6:47 ` Herbert Xu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox