From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: barebox@lists.infradead.org
Cc: Ahmad Fatoum <a.fatoum@pengutronix.de>
Subject: [PATCH] of: use pr_ family functions to log messages
Date: Thu, 10 Apr 2025 11:59:58 +0200 [thread overview]
Message-ID: <20250410095958.2271159-1-a.fatoum@pengutronix.de> (raw)
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
next reply other threads:[~2025-04-10 11:18 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-10 9:59 Ahmad Fatoum [this message]
2025-04-11 7:21 ` Sascha Hauer
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=20250410095958.2271159-1-a.fatoum@pengutronix.de \
--to=a.fatoum@pengutronix.de \
--cc=barebox@lists.infradead.org \
/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