]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
net: stmmac: Use the right logging function in stmmac_mdio_register
authorRomain Perier <romain.perier@collabora.com>
Thu, 10 Aug 2017 14:56:05 +0000 (16:56 +0200)
committerDavid S. Miller <davem@davemloft.net>
Fri, 11 Aug 2017 21:38:55 +0000 (14:38 -0700)
commitfbca164776e438b639af592c522b8b0506b54dcc
treef241f022fbd0cf58a9f69d905d0667cbe26bcf35
parent8d55373875052b891ae72c9bcaf9c2d7178676c0
net: stmmac: Use the right logging function in stmmac_mdio_register

Currently, the function stmmac_mdio_register() is only used by
stmmac_dvr_probe() from stmmac_main.c, in order to register the MDIO bus
and probe information about the PHY. As this function is called before
calling register_netdev(), all messages logged from stmmac_mdio_register
are prefixed by "(unnamed net_device)". The goal of netdev_info or
netdev_err is to dump useful infos about a net_device, when this data
structure is partially initialized, there is no point for using these
functions.

This commit fixes the issue by replacing all netdev_*() by the
corresponding dev_*() function for logging. The last netdev_info is
replaced by phy_attached_info(), as a valid phydev can be used at this
point.

Signed-off-by: Romain Perier <romain.perier@collabora.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c