Skip to contentSkip to conversation

crypto: caam - remove overly verbose debug print

PATCH Applied Ahmad Fatoum 2 participants 2 messages Jan 2, 2024 – Jan 3, 2024

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

PATCH 1/1 crypto: caam - remove overly verbose debug print

We can already read /dev/hwrng to get the randomness as generated by the device. Printing 32K bytes of randomness to the log (or even worse to console) is just not useful for debugging. There are debug prints for the job descriptors and Linux doesn't have this print too since commit 2c5e88dc90f5 ("crypto: caam - simplify RNG implementation"), so let's drop it in barebox too.

---
 drivers/crypto/caam/caamrng.c | 3 ---
 1 file changed, 3 deletions(-)
drivers/crypto/caam/caamrng.c +0 -3
index ede35cea7f80..ea154913cab6 100644
@@ -91,9 +91,6 @@ static void rng_done(struct device *jrdev, u32 *desc, u32 err, void *context)
 
 	/* Buffer refilled, invalidate cache */
 	dma_sync_single_for_cpu(jrdev, bd->addr, RN_BUF_SIZE, DMA_FROM_DEVICE);
-
-	print_hex_dump_debug("rng refreshed buf@: ", DUMP_PREFIX_OFFSET,
-			     16, 4, bd->buf, RN_BUF_SIZE, 1);
 }
 
 static inline int submit_job(struct caam_rng_ctx *ctx, int to_current)
Signature · 1 line
2.39.2
Applied
#1 lore raw
Quoted 11 lines · Ahmad Fatoum

We can already read /dev/hwrng to get the randomness as generated by the device. Printing 32K bytes of randomness to the log (or even worse to console) is just not useful for debugging. There are debug prints for the job descriptors and Linux doesn't have this print too since commit 2c5e88dc90f5 ("crypto: caam - simplify RNG implementation"), so let's drop it in barebox too.

---
 drivers/crypto/caam/caamrng.c | 3 ---
 1 file changed, 3 deletions(-)

Applied, thanks

Sascha

Quoted 20 lines
drivers/crypto/caam/caamrng.c +0 -3
index ede35cea7f80..ea154913cab6 100644
@@ -91,9 +91,6 @@ static void rng_done(struct device *jrdev, u32 *desc, u32 err, void *context)
 
 	/* Buffer refilled, invalidate cache */
 	dma_sync_single_for_cpu(jrdev, bd->addr, RN_BUF_SIZE, DMA_FROM_DEVICE);
-
-	print_hex_dump_debug("rng refreshed buf@: ", DUMP_PREFIX_OFFSET,
-			     16, 4, bd->buf, RN_BUF_SIZE, 1);
 }
 
 static inline int submit_job(struct caam_rng_ctx *ctx, int to_current)
Signature · 1 line
2.39.2
Signature · 4 lines
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |