[PATCH 2/5] lib: random: don't duplicate error/warning prefix in log message

Ahmad Fatoum a.fatoum at pengutronix.de
Mon Oct 9 04:52:36 PDT 2023


pr_err and pr_warn already print an ERROR/WARNING prefix, so no need to
duplicate it.

Signed-off-by: Ahmad Fatoum <a.fatoum at pengutronix.de>
---
 lib/random.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/random.c b/lib/random.c
index c6532df55249..e83935d0e17c 100644
--- a/lib/random.c
+++ b/lib/random.c
@@ -68,11 +68,11 @@ int get_crypto_bytes(void *buf, int len)
 	}
 
 	if (!IS_ENABLED(CONFIG_ALLOW_PRNG_FALLBACK)) {
-		pr_err("error: no HWRNG available!\n");
+		pr_err("no HWRNG available!\n");
 		return err;
 	}
 
-	pr_warn("warning: falling back to Pseudo RNG source!\n");
+	pr_warn("falling back to Pseudo RNG source!\n");
 
 	get_random_bytes(buf, len);
 
-- 
2.39.2




More information about the barebox mailing list