* [PATCH] caamalg: Make use of dev_*() instead of pr_*()
@ 2025-04-22 2:41 Ben Collins
2025-04-23 9:22 ` Horia Geanta
0 siblings, 1 reply; 2+ messages in thread
From: Ben Collins @ 2025-04-22 2:41 UTC (permalink / raw)
To: linux-crypto
Cc: Horia Geant�~C, Pankaj Gupta, Gaurav Jain, Herbert Xu,
David S. Miller, linux-kernel
[-- 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 --]
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] caamalg: Make use of dev_*() instead of pr_*()
2025-04-22 2:41 [PATCH] caamalg: Make use of dev_*() instead of pr_*() Ben Collins
@ 2025-04-23 9:22 ` Horia Geanta
0 siblings, 0 replies; 2+ messages in thread
From: Horia Geanta @ 2025-04-23 9:22 UTC (permalink / raw)
To: linux-crypto, Pankaj Gupta, Gaurav Jain, Herbert Xu,
David S. Miller, linux-kernel
On 4/23/2025 10:29 AM, Ben Collins wrote:
> 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",
ctx->jrdev is not initialized at this point;
it's done later in caam_init_common().
Actually, we've fixed the same issue some time ago in commit
ab95bd2aa904 ("crypto: caam - fix printing on xts fallback allocation error path")
Thanks,
Horia
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-04-23 9:22 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-04-22 2:41 [PATCH] caamalg: Make use of dev_*() instead of pr_*() Ben Collins
2025-04-23 9:22 ` Horia Geanta
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®