Patchwork [U-Boot] phy.c: make less verbose - turn printf() into debug()

login
register
mail settings
Submitter Wolfgang Denk
Date July 25, 2011, 7:39 a.m.
Message ID <1311579550-5610-1-git-send-email-wd@denx.de>
Download mbox | patch
Permalink /patch/106616/
State Accepted
Commit b91a9d9d4dc81d8b62690b03546d92d27744e9b5
Headers show

Comments

Wolfgang Denk - July 25, 2011, 7:39 a.m.
The PHY driver was too verbose and corrupted the boot message display
like this:

	...
	Net:   TSEC0 connected to Marvell 88E1111S
	TSEC1 connected to Marvell 88E1111S
	TSEC0, TSEC1
	...

Turn printf() into debug() so we het the expected output again:

	...
	Net:   TSEC0, TSEC1
	...

Signed-off-by: Wolfgang Denk <wd@denx.de>
Cc: Kumar Gala <galak@kernel.crashing.org>

---
 drivers/net/phy/phy.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
Kumar Gala - July 27, 2011, 1:22 p.m.
On Jul 25, 2011, at 2:39 AM, Wolfgang Denk wrote:

> The PHY driver was too verbose and corrupted the boot message display
> like this:
> 
> 	...
> 	Net:   TSEC0 connected to Marvell 88E1111S
> 	TSEC1 connected to Marvell 88E1111S
> 	TSEC0, TSEC1
> 	...
> 
> Turn printf() into debug() so we het the expected output again:
> 
> 	...
> 	Net:   TSEC0, TSEC1
> 	...
> 
> Signed-off-by: Wolfgang Denk <wd@denx.de>
> Cc: Kumar Gala <galak@kernel.crashing.org>
> 
> ---
> drivers/net/phy/phy.c |    2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c
> index c7edcc0..ce69c19 100644
> --- a/drivers/net/phy/phy.c
> +++ b/drivers/net/phy/phy.c
> @@ -714,7 +714,7 @@ struct phy_device *phy_connect(struct mii_dev *bus, int addr,
> 
> 	phydev->dev = dev;
> 
> -	printf("%s connected to %s\n", dev->name, phydev->drv->name);
> +	debug("%s connected to %s\n", dev->name, phydev->drv->name);
> 
> 	return phydev;
> }
> -- 
> 1.7.6

Andy,

Any comments?

- k
Andy Fleming - July 29, 2011, 9:26 p.m.
On Jul 27, 2011, at 8:22 AM, Kumar Gala wrote:

> 
> On Jul 25, 2011, at 2:39 AM, Wolfgang Denk wrote:
> 
>> The PHY driver was too verbose and corrupted the boot message display
>> like this:
>> 
>> 	...
>> 	Net:   TSEC0 connected to Marvell 88E1111S
>> 	TSEC1 connected to Marvell 88E1111S
>> 	TSEC0, TSEC1
>> 	...
>> 
>> Turn printf() into debug() so we het the expected output again:
>> 
>> 	...
>> 	Net:   TSEC0, TSEC1
>> 	...


Hmmm.... That output is quite useful. There are a large number of situations where those messages signal to the user that their configuration is a certain way (perhaps not the one they thought).  However, I'm fine with those messages not interfering with the Net: foo... printouts.  Perhaps we could add a separate print in the Net code which iterates through the PHYs and prints out the information?

Andy
Wolfgang Denk - July 29, 2011, 9:40 p.m.
Dear Andy Fleming,

In message <45A1D757-BA98-4F92-B8C3-4DDDBFD5CA82@freescale.com> you wrote:
> 
> Hmmm.... That output is quite useful. There are a large number of

I agree that it is useful.

> situations where those messages signal to the user that their
> configuration is a certain way (perhaps not the one they thought).
> However, I'm fine with those messages not interfering with the Net:
> foo... printouts.  Perhaps we could add a separate print in the Net code
> which iterates through the PHYs and prints out the information?

Maybe we should add this as part of the mii command, so that it can be
printed when the user asks for this type of information?

Best regards,

Wolfgang Denk
Wolfgang Denk - Aug. 31, 2011, 8:35 p.m.
Dear Wolfgang Denk,

In message <1311579550-5610-1-git-send-email-wd@denx.de> you wrote:
> The PHY driver was too verbose and corrupted the boot message display
> like this:
> 
> 	...
> 	Net:   TSEC0 connected to Marvell 88E1111S
> 	TSEC1 connected to Marvell 88E1111S
> 	TSEC0, TSEC1
> 	...
> 
> Turn printf() into debug() so we het the expected output again:
> 
> 	...
> 	Net:   TSEC0, TSEC1
> 	...
> 
> Signed-off-by: Wolfgang Denk <wd@denx.de>
> Cc: Kumar Gala <galak@kernel.crashing.org>
> 
> ---
>  drivers/net/phy/phy.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

Patch

diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c
index c7edcc0..ce69c19 100644
--- a/drivers/net/phy/phy.c
+++ b/drivers/net/phy/phy.c
@@ -714,7 +714,7 @@  struct phy_device *phy_connect(struct mii_dev *bus, int addr,
 
 	phydev->dev = dev;
 
-	printf("%s connected to %s\n", dev->name, phydev->drv->name);
+	debug("%s connected to %s\n", dev->name, phydev->drv->name);
 
 	return phydev;
 }