Re: [PATCH 4.19 13/36] net: stmmac: use dev_err_probe() for reporting mdio bus registration failure

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Dec 18, 2023 at 12:45:42PM -0600, Daniel Díaz wrote:
> Hello!
> 
> On 18/12/23 7:51 a. m., Greg Kroah-Hartman wrote:
> > 4.19-stable review patch.  If anyone has any objections, please let me know.
> > 
> > ------------------
> > 
> > From: Rasmus Villemoes <linux@xxxxxxxxxxxxxxxxxx>
> > 
> > [ Upstream commit 839612d23ffd933174db911ce56dc3f3ca883ec5 ]
> > 
> > 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@xxxxxxxxxxxxxxxxxx>
> > Link: https://lore.kernel.org/r/20220602074840.1143360-1-linux@xxxxxxxxxxxxxxxxxx
> > Signed-off-by: Jakub Kicinski <kuba@xxxxxxxxxx>
> > Stable-dep-of: e23c0d21ce92 ("net: stmmac: Handle disabled MDIO busses from devicetree")
> > Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>
> > Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
> > ---
> >   drivers/net/ethernet/stmicro/stmmac/stmmac_main.c |    2 +-
> >   1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> > +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> > @@ -4428,7 +4428,7 @@ int stmmac_dvr_probe(struct device *devi
> >   		ret = stmmac_mdio_register(ndev);
> >   		if (ret < 0) {
> >   			dev_err(priv->device,
> > -				"%s: MDIO bus (id: %d) registration failed",
> > +				"%s: MDIO bus (id: %d) registration failed\n",
> >   				__func__, priv->plat->bus_id);
> >   			goto error_mdio_register;
> >   		}
> 
> This patch doesn't do what it says it does.

Hah, it really doesn't, good catch.  I removed dev_err_probe() from the
4.19 tree as it didn't make sense to backport it so late in the release
cycle of it (and it required many other follow-on fixes.)  and so I
fixed up this commit to build properly, but I didn't realize that all I
did was properly add a \n to the string, the rest of the commit faded
away.

I'll just go drop this entirely, thanks for the review!

greg k-h




[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux