Netdev List
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Jamie Iles <jamie@jamieiles.com>
Cc: netdev@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	nicolas.ferre@atmel.com
Subject: Re: [PATCH 3/8] macb: convert printk to pr_ and friends
Date: Thu, 10 Mar 2011 14:48:04 -0800	[thread overview]
Message-ID: <1299797284.20104.162.camel@Joe-Laptop> (raw)
In-Reply-To: <1299751843-9743-4-git-send-email-jamie@jamieiles.com>

On Thu, 2011-03-10 at 10:10 +0000, Jamie Iles wrote:
> macb is already using the dev_dbg() and friends helpers so use pr_foo()
> along with a pr_fmt() definition to make the printing a little cleaner.
> Signed-off-by: Jamie Iles <jamie@jamieiles.com>

Hi Jamie.

Because these conversions use a struct net_device,
they would be better as:

	netdev_<foo>(struct net_device *dev, const char *fmt, ...)

> diff --git a/drivers/net/macb.c b/drivers/net/macb.c
> @@ -175,11 +176,11 @@ static void macb_handle_link_change(struct net_device *dev)
>  
>  	if (status_change) {
>  		if (phydev->link)
> -			printk(KERN_INFO "%s: link up (%d/%s)\n",
> +			pr_info("%s: link up (%d/%s)\n",
>  			       dev->name, phydev->speed,
>  			       DUPLEX_FULL == phydev->duplex ? "Full":"Half");

			netdev_info(dev, "link up (%d/%s)\n",
				    phydev->speed,
				    phydev->duplex == DUPLEX_FULL ? "Full" : "Half");
 
>  		else
> -			printk(KERN_INFO "%s: link down\n", dev->name);
> +			pr_info("%s: link down\n", dev->name);

			netdev_info(dev, "link down\n");

> @@ -193,7 +194,7 @@ static int macb_mii_probe(struct net_device *dev)
>  
>  	phydev = phy_find_first(bp->mii_bus);
>  	if (!phydev) {
> -		printk (KERN_ERR "%s: no PHY found\n", dev->name);
> +		pr_err("%s: no PHY found\n", dev->name);

		netdev_err(dev, "no PHY found\n");

> @@ -206,7 +207,7 @@ static int macb_mii_probe(struct net_device *dev)
>  				 PHY_INTERFACE_MODE_RMII :
>  				 PHY_INTERFACE_MODE_MII);
>  	if (ret) {
> -		printk(KERN_ERR "%s: Could not attach to PHY\n", dev->name);
> +		pr_err("%s: Could not attach to PHY\n", dev->name);

		netdev_err(dev, "could not attach to PHY\n");

etc...



  reply	other threads:[~2011-03-10 22:48 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-10 10:10 [PATCH 0/8] macb: add support for Cadence GEM Jamie Iles
2011-03-10 10:10 ` [PATCH 1/8] macb: unify at91 and avr32 platform data Jamie Iles
2011-03-10 13:06   ` Nicolas Ferre
2011-03-10 13:17     ` Jamie Iles
2011-03-11  1:41       ` Jean-Christophe PLAGNIOL-VILLARD
2011-03-11  8:56         ` Jamie Iles
2011-03-11 12:52           ` Jean-Christophe PLAGNIOL-VILLARD
2011-03-11 13:25             ` Jamie Iles
2011-03-11 13:37               ` Jean-Christophe PLAGNIOL-VILLARD
2011-03-11 13:53                 ` Jamie Iles
2011-03-10 10:10 ` [PATCH 2/8] macb: detect hclk presence from " Jamie Iles
2011-03-10 10:15   ` Russell King - ARM Linux
2011-03-10 11:41     ` Jamie Iles
2011-03-10 11:45       ` Jamie Iles
2011-03-11  1:44   ` Jean-Christophe PLAGNIOL-VILLARD
2011-03-11  8:54     ` Jamie Iles
2011-03-11 12:47       ` Jean-Christophe PLAGNIOL-VILLARD
2011-03-11 13:08         ` Jamie Iles
2011-03-11 13:39           ` Jean-Christophe PLAGNIOL-VILLARD
2011-03-10 10:10 ` [PATCH 3/8] macb: convert printk to pr_ and friends Jamie Iles
2011-03-10 22:48   ` Joe Perches [this message]
2011-03-11  0:09     ` Jamie Iles
2011-03-11 12:53   ` Jean-Christophe PLAGNIOL-VILLARD
2011-03-10 10:10 ` [PATCH 4/8] macb: initial support for Cadence GEM Jamie Iles
2011-03-11 13:14   ` Jean-Christophe PLAGNIOL-VILLARD
2011-03-11 13:30     ` Jamie Iles
2011-03-11 13:34       ` Jean-Christophe PLAGNIOL-VILLARD
2011-03-11 14:08         ` Jamie Iles
2011-03-10 10:10 ` [PATCH 5/8] macb: handle HW address registers for GEM devices Jamie Iles
2011-03-10 10:10 ` [PATCH 6/8] macb: support higher rate GEM MDIO clock divisors Jamie Iles
2011-03-10 10:10 ` [PATCH 7/8] macb: support statistics for GEM devices Jamie Iles
2011-03-10 10:10 ` [PATCH 8/8] macb: support data bus widths > 32 bits Jamie Iles
2011-03-11 12:55   ` Jean-Christophe PLAGNIOL-VILLARD
2011-03-11 13:15     ` Jamie Iles

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1299797284.20104.162.camel@Joe-Laptop \
    --to=joe@perches.com \
    --cc=jamie@jamieiles.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=netdev@vger.kernel.org \
    --cc=nicolas.ferre@atmel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox