mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ben Collins <bcollins@kernel.org>
To: linux-crypto@vger.kernel.org
Cc: "Horia Geant�~C" <horia.geanta@nxp.com>,
	"Pankaj Gupta" <pankaj.gupta@nxp.com>,
	"Gaurav Jain" <gaurav.jain@nxp.com>,
	"Herbert Xu" <herbert@gondor.apana.org.au>,
	"David S. Miller" <davem@davemloft.net>,
	linux-kernel@vger.kernel.org
Subject: [PATCH] caamalg: Make use of dev_*() instead of pr_*()
Date: Mon, 21 Apr 2025 22:41:33 -0400	[thread overview]
Message-ID: <2025042122-infrared-bumblebee-b2d3dc@boujee-and-buff> (raw)

[-- Attachment #1: Type: text/plain, Size: 2268 bytes --]

It's nice when messages line up with the device, and easy to implement
since it's already available in the functions.

Signed-off-by: Ben Collins <bcollins@kernel.org>
Cc: "Horia Geantă" <horia.geanta@nxp.com>
Cc: Pankaj Gupta <pankaj.gupta@nxp.com>
Cc: Gaurav Jain <gaurav.jain@nxp.com>
Cc: Herbert Xu <herbert@gondor.apana.org.au>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: linux-crypto@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
---
 drivers/crypto/caam/caamalg.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/crypto/caam/caamalg.c b/drivers/crypto/caam/caamalg.c
index 2cfb1b8d8c7cf..d964a62ef9668 100644
--- a/drivers/crypto/caam/caamalg.c
+++ b/drivers/crypto/caam/caamalg.c
@@ -3633,7 +3633,7 @@ static int caam_cra_init(struct crypto_skcipher *tfm)
 		fallback = crypto_alloc_skcipher(tfm_name, 0,
 						 CRYPTO_ALG_NEED_FALLBACK);
 		if (IS_ERR(fallback)) {
-			pr_err("Failed to allocate %s fallback: %ld\n",
+			dev_err(ctx->jrdev, "Failed to allocate %s fallback: %ld\n",
 			       tfm_name, PTR_ERR(fallback));
 			return PTR_ERR(fallback);
 		}
@@ -3814,8 +3814,8 @@ int caam_algapi_init(struct device *ctrldev)
 
 		err = crypto_engine_register_skcipher(&t_alg->skcipher);
 		if (err) {
-			pr_warn("%s alg registration failed\n",
-				t_alg->skcipher.base.base.cra_driver_name);
+			dev_warn(ctrldev, "%s alg registration failed\n",
+				 t_alg->skcipher.base.base.cra_driver_name);
 			continue;
 		}
 
@@ -3866,8 +3866,8 @@ int caam_algapi_init(struct device *ctrldev)
 
 		err = crypto_engine_register_aead(&t_alg->aead);
 		if (err) {
-			pr_warn("%s alg registration failed\n",
-				t_alg->aead.base.base.cra_driver_name);
+			dev_warn(ctrldev, "%s alg registration failed\n",
+				 t_alg->aead.base.base.cra_driver_name);
 			continue;
 		}
 
@@ -3876,7 +3876,7 @@ int caam_algapi_init(struct device *ctrldev)
 	}
 
 	if (registered)
-		pr_info("caam algorithms registered in /proc/crypto\n");
+		dev_info(ctrldev, "caam algorithms registered in /proc/crypto\n");
 
 	return err;
 }
-- 
2.49.0


-- 
 Ben Collins
 https://libjwt.io
 https://github.com/benmcollins
 --
 3EC9 7598 1672 961A 1139  173A 5D5A 57C7 242B 22CF

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

             reply	other threads:[~2025-04-22  2:41 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-22  2:41 Ben Collins [this message]
2025-04-23  9:22 ` Horia Geanta

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2025042122-infrared-bumblebee-b2d3dc@boujee-and-buff \
    --to=bcollins@kernel.org \
    --cc=davem@davemloft.net \
    --cc=gaurav.jain@nxp.com \
    --cc=herbert@gondor.apana.org.au \
    --cc=horia.geanta@nxp.com \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pankaj.gupta@nxp.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®