From: David Lechner <dlechner@baylibre.com>
To: Lukasz Majewski <lukma@denx.de>, Tom Rini <trini@konsulko.com>
Cc: Julien Stephan <jstephan@baylibre.com>,
u-boot@lists.denx.de, David Lechner <dlechner@baylibre.com>
Subject: [PATCH 2/2] clk: clk-uclass: used dev name in debug message
Date: Thu, 08 Jan 2026 12:05:55 -0600 [thread overview]
Message-ID: <20260108-clk-uclass-better-debug-v1-2-265900a42fe5@baylibre.com> (raw)
In-Reply-To: <20260108-clk-uclass-better-debug-v1-0-265900a42fe5@baylibre.com>
Consistently use the device name in debug messages. The clk-uclass file
previously had a mix of printing the dev pointer and the device name.
Changing all to use the device name makes the debug messages more
useful.
Signed-off-by: David Lechner <dlechner@baylibre.com>
---
drivers/clk/clk-uclass.c | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/drivers/clk/clk-uclass.c b/drivers/clk/clk-uclass.c
index 0e56d207b0e..c33f415917e 100644
--- a/drivers/clk/clk-uclass.c
+++ b/drivers/clk/clk-uclass.c
@@ -122,7 +122,8 @@ static int clk_get_by_indexed_prop(struct udevice *dev, const char *prop_name,
int ret;
struct ofnode_phandle_args args;
- debug("%s(dev=%p, index=%d, clk=%p)\n", __func__, dev, index, clk);
+ debug("%s(dev=%s, index=%d, clk=%p)\n", __func__, dev_read_name(dev),
+ index, clk);
assert(clk);
clk->dev = NULL;
@@ -183,8 +184,8 @@ int clk_get_bulk(struct udevice *dev, struct clk_bulk *bulk)
bulk_get_err:
err = clk_release_all(bulk->clks, bulk->count);
if (err)
- debug("%s: could not release all clocks for %p\n",
- __func__, dev);
+ debug("%s: could not release all clocks for %s\n",
+ __func__, dev_read_name(dev));
return ret;
}
@@ -217,8 +218,8 @@ static int clk_set_default_parents(struct udevice *dev,
num_parents = dev_count_phandle_with_args(dev, "assigned-clock-parents",
"#clock-cells", 0);
if (num_parents < 0) {
- debug("%s: could not read assigned-clock-parents for %p\n",
- __func__, dev);
+ debug("%s: could not read assigned-clock-parents for %s\n",
+ __func__, dev_read_name(dev));
return 0;
}
@@ -467,7 +468,7 @@ int clk_request(struct udevice *dev, struct clk *clk)
{
const struct clk_ops *ops;
- debug("%s(dev=%p, clk=%p)\n", __func__, dev, clk);
+ debug("%s(dev=%s, clk=%p)\n", __func__, dev_read_name(dev), clk);
if (!clk)
return 0;
ops = clk_dev_ops(dev);
--
2.43.0
next prev parent reply other threads:[~2026-01-08 20:24 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-08 18:05 [PATCH 0/2] clk: clk-uclass: debug message improvements David Lechner
2026-01-08 18:05 ` [PATCH 1/2] clk: clk-uclass: fix format specifier for ofnode name David Lechner
2026-01-08 18:05 ` David Lechner [this message]
2026-01-21 20:48 ` [PATCH 0/2] clk: clk-uclass: debug message improvements Tom Rini
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=20260108-clk-uclass-better-debug-v1-2-265900a42fe5@baylibre.com \
--to=dlechner@baylibre.com \
--cc=jstephan@baylibre.com \
--cc=lukma@denx.de \
--cc=trini@konsulko.com \
--cc=u-boot@lists.denx.de \
/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