]> git.baikalelectronics.ru Git - kernel.git/commit
net: stmmac: use dev_err_probe() for reporting mdio bus registration failure
authorRasmus Villemoes <linux@rasmusvillemoes.dk>
Thu, 2 Jun 2022 07:48:40 +0000 (09:48 +0200)
committerJakub Kicinski <kuba@kernel.org>
Thu, 2 Jun 2022 17:14:30 +0000 (10:14 -0700)
commitc80c2dcc00244a27de48db597d4d408181f5c9fa
tree458fb266b287676f7555e2a410ffd1d32d33080d
parent78fa19d5906f6e32811ad8c8c625e13f62aa9fde
net: stmmac: use dev_err_probe() for reporting mdio bus registration failure

I have a board where these two lines are always printed during boot:

   imx-dwmac 30bf0000.ethernet: Cannot register the MDIO bus
   imx-dwmac 30bf0000.ethernet: stmmac_dvr_probe: MDIO bus (id: 1) registration failed

It's perfectly fine, and the device is successfully (and silently, as
far as the console goes) probed later.

Use dev_err_probe() instead, which will demote these messages to debug
level (thus removing the alarming messages from the console) when the
error is -EPROBE_DEFER, and also has the advantage of including the
error code if/when it happens to be something other than -EPROBE_DEFER.

While here, add the missing \n to one of the format strings.

Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Link: https://lore.kernel.org/r/20220602074840.1143360-1-linux@rasmusvillemoes.dk
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c