Re: [PATCH] miitool: Fix inconsistent spacing
On Fri, Oct 26, 2018 at 6:31 PM Andrey Smirnov wrote: > > Make sure that there's a space between device name and it's status > string regardless if if device is using "id" field or not. > > Before: > > barebox@ZII RDU2 Board:/ miitool > mdio0-phy00: mdio:no link > mdio1-phy15: 2188000.ethernet@2188000:10 Mbit, half duplex, no link > mdio1-phy16: 2188000.ethernet@2188000:10 Mbit, half duplex, no link > mdio2-phy00: 2188000.ethernet@2188000:mdio:switch@0:no link > mdio2-phy01: 2188000.ethernet@2188000:mdio:switch@0:no link > mdio2-phy02: 2188000.ethernet@2188000:mdio:switch@0:negotiated 100baseTx-FD, > link ok > mdio2-phy03: 2188000.ethernet@2188000:mdio:switch@0:no link > mdio2-phy04: 2188000.ethernet@2188000:mdio:switch@0:no link > mdio3-phy01: eth1: negotiated 1000baseT-FD flow-control, link ok > > After: > > barebox@ZII RDU2 Board:/ miitool > mdio0-phy00: mdio: no link > mdio1-phy15: 2188000.ethernet@2188000: 10 Mbit, half duplex, no link > mdio1-phy16: 2188000.ethernet@2188000: 10 Mbit, half duplex, no link > mdio2-phy00: 2188000.ethernet@2188000:mdio:switch@0: no link > mdio2-phy01: 2188000.ethernet@2188000:mdio:switch@0: no link > mdio2-phy02: 2188000.ethernet@2188000:mdio:switch@0: no link > mdio2-phy03: 2188000.ethernet@2188000:mdio:switch@0: no link > mdio2-phy04: 2188000.ethernet@2188000:mdio:switch@0: no link > mdio3-phy01: eth1: no link > > Signed-off-by: Andrey Smirnov Ugh, didn't mean to send this patch out. Sorry for the noise. Thanks, Andrey Smirnov > --- > commands/miitool.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/commands/miitool.c b/commands/miitool.c > index dea4f853c..acf61421b 100644 > --- a/commands/miitool.c > +++ b/commands/miitool.c > @@ -115,7 +115,7 @@ static int show_basic_mii(struct mii_bus *mii, struct > phy_device *phydev, > for (i = 0; i < 32; i++) > mii_val[i] = mii->read(mii, phydev->addr, i); > > - printf((mii->parent->id) < 0 ? "%s: %s:" : "%s: %s%d: ", > + printf((mii->parent->id) < 0 ? "%s: %s: " : "%s: %s%d: ", >phydev->cdev.name, mii->parent->name, mii->parent->id); > > > -- > 2.17.1 > ___ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox
[PATCH] miitool: Fix inconsistent spacing
Make sure that there's a space between device name and it's status string regardless if if device is using "id" field or not. Before: barebox@ZII RDU2 Board:/ miitool mdio0-phy00: mdio:no link mdio1-phy15: 2188000.ethernet@2188000:10 Mbit, half duplex, no link mdio1-phy16: 2188000.ethernet@2188000:10 Mbit, half duplex, no link mdio2-phy00: 2188000.ethernet@2188000:mdio:switch@0:no link mdio2-phy01: 2188000.ethernet@2188000:mdio:switch@0:no link mdio2-phy02: 2188000.ethernet@2188000:mdio:switch@0:negotiated 100baseTx-FD, link ok mdio2-phy03: 2188000.ethernet@2188000:mdio:switch@0:no link mdio2-phy04: 2188000.ethernet@2188000:mdio:switch@0:no link mdio3-phy01: eth1: negotiated 1000baseT-FD flow-control, link ok After: barebox@ZII RDU2 Board:/ miitool mdio0-phy00: mdio: no link mdio1-phy15: 2188000.ethernet@2188000: 10 Mbit, half duplex, no link mdio1-phy16: 2188000.ethernet@2188000: 10 Mbit, half duplex, no link mdio2-phy00: 2188000.ethernet@2188000:mdio:switch@0: no link mdio2-phy01: 2188000.ethernet@2188000:mdio:switch@0: no link mdio2-phy02: 2188000.ethernet@2188000:mdio:switch@0: no link mdio2-phy03: 2188000.ethernet@2188000:mdio:switch@0: no link mdio2-phy04: 2188000.ethernet@2188000:mdio:switch@0: no link mdio3-phy01: eth1: no link Signed-off-by: Andrey Smirnov --- commands/miitool.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/commands/miitool.c b/commands/miitool.c index dea4f853c..acf61421b 100644 --- a/commands/miitool.c +++ b/commands/miitool.c @@ -115,7 +115,7 @@ static int show_basic_mii(struct mii_bus *mii, struct phy_device *phydev, for (i = 0; i < 32; i++) mii_val[i] = mii->read(mii, phydev->addr, i); - printf((mii->parent->id) < 0 ? "%s: %s:" : "%s: %s%d: ", + printf((mii->parent->id) < 0 ? "%s: %s: " : "%s: %s%d: ", phydev->cdev.name, mii->parent->name, mii->parent->id); -- 2.17.1 ___ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox
Re: [PATCH] miitool: Fix inconsistent spacing
On Mon, Oct 15, 2018 at 05:38:35PM -0700, Andrey Smirnov wrote: > Make sure that there's a space between device name and it's status > string regardless if if device is using "id" field or not. > > Before: > > barebox@ZII RDU2 Board:/ miitool > mdio0-phy00: mdio:no link > mdio1-phy15: 2188000.ethernet@2188000:10 Mbit, half duplex, no link > mdio1-phy16: 2188000.ethernet@2188000:10 Mbit, half duplex, no link > mdio2-phy00: 2188000.ethernet@2188000:mdio:switch@0:no link > mdio2-phy01: 2188000.ethernet@2188000:mdio:switch@0:no link > mdio2-phy02: 2188000.ethernet@2188000:mdio:switch@0:negotiated 100baseTx-FD, > link ok > mdio2-phy03: 2188000.ethernet@2188000:mdio:switch@0:no link > mdio2-phy04: 2188000.ethernet@2188000:mdio:switch@0:no link > mdio3-phy01: eth1: negotiated 1000baseT-FD flow-control, link ok > > After: > > barebox@ZII RDU2 Board:/ miitool > mdio0-phy00: mdio: no link > mdio1-phy15: 2188000.ethernet@2188000: 10 Mbit, half duplex, no link > mdio1-phy16: 2188000.ethernet@2188000: 10 Mbit, half duplex, no link > mdio2-phy00: 2188000.ethernet@2188000:mdio:switch@0: no link > mdio2-phy01: 2188000.ethernet@2188000:mdio:switch@0: no link > mdio2-phy02: 2188000.ethernet@2188000:mdio:switch@0: no link > mdio2-phy03: 2188000.ethernet@2188000:mdio:switch@0: no link > mdio2-phy04: 2188000.ethernet@2188000:mdio:switch@0: no link > mdio3-phy01: eth1: no link Looks better. Applied, thanks Sascha > > Signed-off-by: Andrey Smirnov > --- > commands/miitool.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/commands/miitool.c b/commands/miitool.c > index dea4f853c..acf61421b 100644 > --- a/commands/miitool.c > +++ b/commands/miitool.c > @@ -115,7 +115,7 @@ static int show_basic_mii(struct mii_bus *mii, struct > phy_device *phydev, > for (i = 0; i < 32; i++) > mii_val[i] = mii->read(mii, phydev->addr, i); > > - printf((mii->parent->id) < 0 ? "%s: %s:" : "%s: %s%d: ", > + printf((mii->parent->id) < 0 ? "%s: %s: " : "%s: %s%d: ", > phydev->cdev.name, mii->parent->name, mii->parent->id); > > > -- > 2.17.1 > > > ___ > barebox mailing list > barebox@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/barebox > -- Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0| Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917- | ___ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox
Re: [PATCH] miitool: Fix inconsistent spacing
On Mon, Oct 15, 2018 at 05:38:35PM -0700, Andrey Smirnov wrote: > Make sure that there's a space between device name and it's status > string regardless if if device is using "id" field or not. > > Before: > > barebox@ZII RDU2 Board:/ miitool > mdio0-phy00: mdio:no link > mdio1-phy15: 2188000.ethernet@2188000:10 Mbit, half duplex, no link > mdio1-phy16: 2188000.ethernet@2188000:10 Mbit, half duplex, no link > mdio2-phy00: 2188000.ethernet@2188000:mdio:switch@0:no link > mdio2-phy01: 2188000.ethernet@2188000:mdio:switch@0:no link > mdio2-phy02: 2188000.ethernet@2188000:mdio:switch@0:negotiated 100baseTx-FD, > link ok > mdio2-phy03: 2188000.ethernet@2188000:mdio:switch@0:no link > mdio2-phy04: 2188000.ethernet@2188000:mdio:switch@0:no link > mdio3-phy01: eth1: negotiated 1000baseT-FD flow-control, link ok > > After: > > barebox@ZII RDU2 Board:/ miitool > mdio0-phy00: mdio: no link > mdio1-phy15: 2188000.ethernet@2188000: 10 Mbit, half duplex, no link > mdio1-phy16: 2188000.ethernet@2188000: 10 Mbit, half duplex, no link > mdio2-phy00: 2188000.ethernet@2188000:mdio:switch@0: no link > mdio2-phy01: 2188000.ethernet@2188000:mdio:switch@0: no link > mdio2-phy02: 2188000.ethernet@2188000:mdio:switch@0: no link > mdio2-phy03: 2188000.ethernet@2188000:mdio:switch@0: no link > mdio2-phy04: 2188000.ethernet@2188000:mdio:switch@0: no link > mdio3-phy01: eth1: no link the patch seems to have some impact on the link status of mdio2-phy02 and mdio3-phy01. I wonder where this comes from :-) Other than that: Acked-by: Uwe Kleine-König because it makes the output better readable. Best regards Uwe -- Pengutronix e.K. | Uwe Kleine-König| Industrial Linux Solutions | http://www.pengutronix.de/ | ___ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox
[PATCH] miitool: Fix inconsistent spacing
Make sure that there's a space between device name and it's status string regardless if if device is using "id" field or not. Before: barebox@ZII RDU2 Board:/ miitool mdio0-phy00: mdio:no link mdio1-phy15: 2188000.ethernet@2188000:10 Mbit, half duplex, no link mdio1-phy16: 2188000.ethernet@2188000:10 Mbit, half duplex, no link mdio2-phy00: 2188000.ethernet@2188000:mdio:switch@0:no link mdio2-phy01: 2188000.ethernet@2188000:mdio:switch@0:no link mdio2-phy02: 2188000.ethernet@2188000:mdio:switch@0:negotiated 100baseTx-FD, link ok mdio2-phy03: 2188000.ethernet@2188000:mdio:switch@0:no link mdio2-phy04: 2188000.ethernet@2188000:mdio:switch@0:no link mdio3-phy01: eth1: negotiated 1000baseT-FD flow-control, link ok After: barebox@ZII RDU2 Board:/ miitool mdio0-phy00: mdio: no link mdio1-phy15: 2188000.ethernet@2188000: 10 Mbit, half duplex, no link mdio1-phy16: 2188000.ethernet@2188000: 10 Mbit, half duplex, no link mdio2-phy00: 2188000.ethernet@2188000:mdio:switch@0: no link mdio2-phy01: 2188000.ethernet@2188000:mdio:switch@0: no link mdio2-phy02: 2188000.ethernet@2188000:mdio:switch@0: no link mdio2-phy03: 2188000.ethernet@2188000:mdio:switch@0: no link mdio2-phy04: 2188000.ethernet@2188000:mdio:switch@0: no link mdio3-phy01: eth1: no link Signed-off-by: Andrey Smirnov --- commands/miitool.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/commands/miitool.c b/commands/miitool.c index dea4f853c..acf61421b 100644 --- a/commands/miitool.c +++ b/commands/miitool.c @@ -115,7 +115,7 @@ static int show_basic_mii(struct mii_bus *mii, struct phy_device *phydev, for (i = 0; i < 32; i++) mii_val[i] = mii->read(mii, phydev->addr, i); - printf((mii->parent->id) < 0 ? "%s: %s:" : "%s: %s%d: ", + printf((mii->parent->id) < 0 ? "%s: %s: " : "%s: %s%d: ", phydev->cdev.name, mii->parent->name, mii->parent->id); -- 2.17.1 ___ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox