mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] of: use pr_ family functions to log messages
@ 2025-04-10  9:59 Ahmad Fatoum
  2025-04-11  7:21 ` Sascha Hauer
  0 siblings, 1 reply; 2+ messages in thread
From: Ahmad Fatoum @ 2025-04-10  9:59 UTC (permalink / raw)
  To: barebox; +Cc: Ahmad Fatoum

KERN_DEBUG and KERN_ERR don't work in barebox, replace them with pr_
family of functions and while at it simplify hexdump.

Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
 drivers/of/address.c | 11 ++---------
 1 file changed, 2 insertions(+), 9 deletions(-)

diff --git a/drivers/of/address.c b/drivers/of/address.c
index c9b801e3fec6..1e3e7a101189 100644
--- a/drivers/of/address.c
+++ b/drivers/of/address.c
@@ -16,17 +16,10 @@
 #define OF_CHECK_COUNTS(na, ns)	(OF_CHECK_ADDR_COUNT(na) && (ns) > 0)
 
 /* Debug utility */
-#ifdef DEBUG
 static void of_dump_addr(const char *s, const __be32 *addr, int na)
 {
-	printk(KERN_DEBUG "%s", s);
-	while (na--)
-		printk(" %08x", be32_to_cpu(*(addr++)));
-	printk("\n");
+	pr_debug("%*phN\n", na * (int)sizeof(__be32), addr);
 }
-#else
-static void of_dump_addr(const char *s, const __be32 *addr, int na) { }
-#endif
 
 /* Callbacks for bus specific translators */
 struct of_bus {
@@ -399,7 +392,7 @@ static u64 __of_translate_address(struct device_node *dev,
 		pbus = of_match_bus(parent);
 		pbus->count_cells(dev, &pna, &pns);
 		if (!OF_CHECK_COUNTS(pna, pns)) {
-			printk(KERN_ERR "prom_parse: Bad cell count for %pOF\n", dev);
+			pr_err("prom_parse: Bad cell count for %pOF\n", dev);
 			break;
 		}
 
-- 
2.39.5




^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] of: use pr_ family functions to log messages
  2025-04-10  9:59 [PATCH] of: use pr_ family functions to log messages Ahmad Fatoum
@ 2025-04-11  7:21 ` Sascha Hauer
  0 siblings, 0 replies; 2+ messages in thread
From: Sascha Hauer @ 2025-04-11  7:21 UTC (permalink / raw)
  To: barebox, Ahmad Fatoum


On Thu, 10 Apr 2025 11:59:58 +0200, Ahmad Fatoum wrote:
> KERN_DEBUG and KERN_ERR don't work in barebox, replace them with pr_
> family of functions and while at it simplify hexdump.
> 
> 

Applied, thanks!

[1/1] of: use pr_ family functions to log messages
      https://git.pengutronix.de/cgit/barebox/commit/?id=8508f002b397 (link may not be stable)

Best regards,
-- 
Sascha Hauer <s.hauer@pengutronix.de>




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-04-11  7:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-04-10  9:59 [PATCH] of: use pr_ family functions to log messages Ahmad Fatoum
2025-04-11  7:21 ` Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox