070-v5.10-0001-net-dsa-b53-Use-dev_-err-info-instead-of-pr_.patch 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. From 3b33438c52def0de4a5577ad541e50923bcc2596 Mon Sep 17 00:00:00 2001
  2. From: Paul Barker <[email protected]>
  3. Date: Thu, 3 Sep 2020 12:26:20 +0100
  4. Subject: [PATCH] net: dsa: b53: Use dev_{err,info} instead of pr_*
  5. This change allows us to see which device the err or info messages are
  6. referring to if we have multiple b53 compatible devices on a board.
  7. As this removes the only pr_*() calls in this file we can drop the
  8. definition of pr_fmt().
  9. Signed-off-by: Paul Barker <[email protected]>
  10. Signed-off-by: David S. Miller <[email protected]>
  11. ---
  12. drivers/net/dsa/b53/b53_common.c | 10 +++++-----
  13. 1 file changed, 5 insertions(+), 5 deletions(-)
  14. --- a/drivers/net/dsa/b53/b53_common.c
  15. +++ b/drivers/net/dsa/b53/b53_common.c
  16. @@ -17,8 +17,6 @@
  17. * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  18. */
  19. -#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
  20. -
  21. #include <linux/delay.h>
  22. #include <linux/export.h>
  23. #include <linux/gpio.h>
  24. @@ -2476,8 +2474,9 @@ int b53_switch_detect(struct b53_device
  25. dev->chip_id = id32;
  26. break;
  27. default:
  28. - pr_err("unsupported switch detected (BCM53%02x/BCM%x)\n",
  29. - id8, id32);
  30. + dev_err(dev->dev,
  31. + "unsupported switch detected (BCM53%02x/BCM%x)\n",
  32. + id8, id32);
  33. return -ENODEV;
  34. }
  35. }
  36. @@ -2507,7 +2506,8 @@ int b53_switch_register(struct b53_devic
  37. if (ret)
  38. return ret;
  39. - pr_info("found switch: %s, rev %i\n", dev->name, dev->core_rev);
  40. + dev_info(dev->dev, "found switch: %s, rev %i\n",
  41. + dev->name, dev->core_rev);
  42. return dsa_register_switch(dev->ds);
  43. }