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 <geert+renesas@glider.be> Signed-off-by: Saravana Kannan <saravanak@google.com> Link: https://lore.kernel.org/r/20210915172808.620546-4-saravanak@google.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 76f1308 commit ebd6823

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

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)