Skip to contentSkip to conversation

crypto: keembay-ocs-hcu - Fix a WARN() message

PATCH In review Dan Carpenter 3 participants 3 messages Jan 6, 2021 – Jan 14, 2021

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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")
---
 drivers/crypto/keembay/keembay-ocs-hcu-core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/crypto/keembay/keembay-ocs-hcu-core.c +1 -1
index d547af047131..c4b97b4160e9 100644
@@ -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],
Signature · 1 line
2.29.2
#1 lore raw

SGkgRGFuLA0KDQpUaGFua3MgZm9yIGZpbmRpbmcgYW5kIGZpeGluZyB0aGlzLg0KDQpPbiBXZWQs IDIwMjEtMDEtMDYgYXQgMTI6MjUgKzAzMDAsIERhbiBDYXJwZW50ZXIgd3JvdGU6DQo+IFRoZSBm aXJzdCBhcmd1bWVudCB0byBXQVJOKCkgaXMgYSBjb25kaXRpb24gYW5kIHRoZSBtZXNzYWdlcyBp cyB0aGUNCj4gc2Vjb25kIGFyZ3VtZW50IGlzIHRoZSBzdHJpbmcsIHNvIHRoaXMgV0FSTigpIHdp bGwgb25seSBkaXNwbGF5IHRoZQ0KPiBfX2Z1bmNfXyBwYXJ0IG9mIHRoZSBtZXNzYWdlLg0KPiAN Cj4gRml4ZXM6IGFlODMyZTMyOWE4ZCAoImNyeXB0bzoga2VlbWJheS1vY3MtaGN1IC0gQWRkIEhN QUMgc3VwcG9ydCIpDQo+IFNpZ25lZC1vZmYtYnk6IERhbiBDYXJwZW50ZXIgPGRhbi5jYXJwZW50 ZXJAb3JhY2xlLmNvbT4NCj4gLS0tDQo+ICBkcml2ZXJzL2NyeXB0by9rZWVtYmF5L2tlZW1iYXkt b2NzLWhjdS1jb3JlLmMgfCAyICstDQo+ICAxIGZpbGUgY2hhbmdlZCwgMSBpbnNlcnRpb24oKyks IDEgZGVsZXRpb24oLSkNCj4gDQo+IA0KDQpBY2tlZC1ieTogRGFuaWVsZSBBbGVzc2FuZHJlbGxp IDxkYW5pZWxlLmFsZXNzYW5kcmVsbGlAaW50ZWwuY29tPg0K

maintainer
#2 lore raw
In reply to Dan Carpenter
Quoted 9 lines · Dan Carpenter

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

Patch applied. Thanks.

Signature · 3 lines
Email: Herbert Xu <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt