drivers: core: fw_devlink: Make the error message a bit more useful
authorSaravana Kannan <saravanak@google.com>
Thu, 24 Oct 2024 06:13:44 +0000 (23:13 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 5 Nov 2024 13:03:27 +0000 (14:03 +0100)
It would make it easier to debugs issues similar to the ones
reported[1][2] recently where some devices didn't have the fwnode set.

[1] - https://lore.kernel.org/all/7b995947-4540-4b17-872e-e107adca4598@notapiano/
[2] - https://lore.kernel.org/all/20240910130019.35081-1-jonathanh@nvidia.com/

Signed-off-by: Saravana Kannan <saravanak@google.com>
Link: https://lore.kernel.org/r/20241024061347.1771063-4-saravanak@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/base/core.c

index 633fb4283282a967fb0b3b4cab97433eefc7462c..3a870662bb6cffec0c4736a236330c22d05c39c2 100644 (file)
@@ -2173,8 +2173,8 @@ static int fw_devlink_create_devlink(struct device *con,
                }
 
                if (con != sup_dev && !device_link_add(con, sup_dev, flags)) {
-                       dev_err(con, "Failed to create device link (0x%x) with %s\n",
-                               flags, dev_name(sup_dev));
+                       dev_err(con, "Failed to create device link (0x%x) with supplier %s for %pfwf\n",
+                               flags, dev_name(sup_dev), link->consumer);
                        ret = -EINVAL;
                }