Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

net: stmmac: print stmmac_init_dma_engine() errors using netdev_err()

stmmac_init_dma_engine() uses dev_err() which leads to errors being
reported as e.g:

dwc-eth-dwmac 2490000.ethernet: Failed to reset the dma
dwc-eth-dwmac 2490000.ethernet eth0: stmmac_hw_setup: DMA engine initialization failed

stmmac_init_dma_engine() is only called from stmmac_hw_setup() which
itself uses netdev_err(), and we will have a net_device setup. So,
change the dev_err() to netdev_err() to give consistent error
messages.

Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Link: https://patch.msgid.link/E1tl5y1-004UgG-8X@rmk-PC.armlinux.org.uk
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Russell King (Oracle) and committed by
Jakub Kicinski
3e401818 465b210f

+2 -2
+2 -2
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
··· 3047 3047 int ret = 0; 3048 3048 3049 3049 if (!priv->plat->dma_cfg || !priv->plat->dma_cfg->pbl) { 3050 - dev_err(priv->device, "Invalid DMA configuration\n"); 3050 + netdev_err(priv->dev, "Invalid DMA configuration\n"); 3051 3051 return -EINVAL; 3052 3052 } 3053 3053 ··· 3056 3056 3057 3057 ret = stmmac_reset(priv, priv->ioaddr); 3058 3058 if (ret) { 3059 - dev_err(priv->device, "Failed to reset the dma\n"); 3059 + netdev_err(priv->dev, "Failed to reset the dma\n"); 3060 3060 return ret; 3061 3061 } 3062 3062