Skip to content

Commit ebd6823

Browse files
Saravana Kannangregkh
authored andcommitted
driver core: Add debug logs when fwnode links are added/deleted
This will help with debugging fw_devlink issues. Reviewed-by: Geert Uytterhoeven <[email protected]> Signed-off-by: Saravana Kannan <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 76f1308 commit ebd6823

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

drivers/base/core.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,8 @@ int fwnode_link_add(struct fwnode_handle *con, struct fwnode_handle *sup)
9595

9696
list_add(&link->s_hook, &sup->consumers);
9797
list_add(&link->c_hook, &con->suppliers);
98+
pr_debug("%pfwP Linked as a fwnode consumer to %pfwP\n",
99+
con, sup);
98100
out:
99101
mutex_unlock(&fwnode_link_lock);
100102

@@ -109,6 +111,8 @@ int fwnode_link_add(struct fwnode_handle *con, struct fwnode_handle *sup)
109111
*/
110112
static void __fwnode_link_del(struct fwnode_link *link)
111113
{
114+
pr_debug("%pfwP Dropping the fwnode link to %pfwP\n",
115+
link->consumer, link->supplier);
112116
list_del(&link->s_hook);
113117
list_del(&link->c_hook);
114118
kfree(link);

0 commit comments

Comments
 (0)