Message ID | X/WB9IlpyIi+5p5s@mwanda (mailing list archive) |
---|---|
State | Accepted |
Delegated to: | Herbert Xu |
Headers | show |
Series | crypto: keembay-ocs-hcu - Fix a WARN() message | expand |
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>
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.
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],
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(-)