diff mbox

[U-Boot] core/uclass: Print name of device in uclass_find_device_by_seq()

Message ID 20170404174656.698-1-alex.g@adaptrum.com
State Accepted
Commit ea168e3351cdb9a738ebfa4ad931a81b2f6d48dd
Delegated to: Simon Glass
Headers show

Commit Message

Alexandru Gagniuc April 4, 2017, 5:46 p.m. UTC
uclass_find_device_by_seq() prints seq and req_seq when debugging is
enabled, but this information is not very useful by itself. Add the
name of he driver to this information. This improves debugging as it
shows which devices are being considered.

Signed-off-by: Alexandru Gagniuc <alex.g@adaptrum.com>
---
 drivers/core/uclass.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Simon Glass April 9, 2017, 7:27 p.m. UTC | #1
On 4 April 2017 at 11:46, Alexandru Gagniuc <alex.g@adaptrum.com> wrote:
> uclass_find_device_by_seq() prints seq and req_seq when debugging is
> enabled, but this information is not very useful by itself. Add the
> name of he driver to this information. This improves debugging as it
> shows which devices are being considered.
>
> Signed-off-by: Alexandru Gagniuc <alex.g@adaptrum.com>
> ---
>  drivers/core/uclass.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Acked-by: Simon Glass <sjg@chromium.org>
Simon Glass April 13, 2017, 9:16 p.m. UTC | #2
On 9 April 2017 at 13:27, Simon Glass <sjg@chromium.org> wrote:
> On 4 April 2017 at 11:46, Alexandru Gagniuc <alex.g@adaptrum.com> wrote:
>> uclass_find_device_by_seq() prints seq and req_seq when debugging is
>> enabled, but this information is not very useful by itself. Add the
>> name of he driver to this information. This improves debugging as it
>> shows which devices are being considered.
>>
>> Signed-off-by: Alexandru Gagniuc <alex.g@adaptrum.com>
>> ---
>>  drivers/core/uclass.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> Acked-by: Simon Glass <sjg@chromium.org>


Applied to u-boot-dm, thanks!
diff mbox

Patch

diff --git a/drivers/core/uclass.c b/drivers/core/uclass.c
index 7de3706..fa62800 100644
--- a/drivers/core/uclass.c
+++ b/drivers/core/uclass.c
@@ -250,7 +250,7 @@  int uclass_find_device_by_seq(enum uclass_id id, int seq_or_req_seq,
 		return ret;
 
 	list_for_each_entry(dev, &uc->dev_head, uclass_node) {
-		debug("   - %d %d\n", dev->req_seq, dev->seq);
+		debug("   - %d %d '%s'\n", dev->req_seq, dev->seq, dev->name);
 		if ((find_req_seq ? dev->req_seq : dev->seq) ==
 				seq_or_req_seq) {
 			*devp = dev;