netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Barry Grussling <barry@grussling.com>
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH 3/4] DSA: Convert printk calls to netdev_info calls
Date: Thu, 03 Jan 2013 11:06:12 -0800	[thread overview]
Message-ID: <1357239972.5452.5.camel@joe-AO722> (raw)
In-Reply-To: <1357178098-4057-4-git-send-email-barry@grussling.com>

On Wed, 2013-01-02 at 17:54 -0800, Barry Grussling wrote:
> Convert DSA printk calls to netdev_info calls as recommended by
> checkpatch.pl.

Some defects here.

> diff --git a/drivers/net/dsa/mv88e6060.c b/drivers/net/dsa/mv88e6060.c
[]
> @@ -237,7 +237,7 @@ static void mv88e6060_poll_link(struct dsa_switch *ds)
>  
>  		if (!link) {
>  			if (netif_carrier_ok(dev)) {
> -				printk(KERN_INFO "%s: link down\n", dev->name);
> +				netdev_info(dev, "%s: link down\n", dev->name);

Take out the "%s: ...", dev->name uses in these
conversions because netdev_printk adds them.

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

> @@ -248,7 +248,7 @@ static void mv88e6060_poll_link(struct dsa_switch *ds)
>  		fc = ((port_status & 0xc000) == 0xc000) ? 1 : 0;
>  
>  		if (!netif_carrier_ok(dev)) {
> -			printk(KERN_INFO "%s: link up, %d Mb/s, %s duplex, "
> +			netdev_info(dev, "%s: link up, %d Mb/s, %s duplex, "
>  					 "flow control %sabled\n", dev->name,
>  					 speed, duplex ? "full" : "half",
>  					 fc ? "en" : "dis");

coalesce formats too

			netdev_info(dev, "link up, %d Mb/s, %s duplex, flow control %sabled\n"
				    speed, duplex ? "full" : "half",
				    fc ? "en" : "dis");
etc.

  reply	other threads:[~2013-01-03 19:06 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-03  1:54 [PATCH 0/4] DSA: Fix checkpatch.pl output for DSA drivers Barry Grussling
2013-01-03  1:54 ` [PATCH 1/4] DSA: Convert DSA driver comments to network-style comments Barry Grussling
2013-01-03  2:05   ` Joe Perches
2013-01-03  1:54 ` [PATCH 2/4] DSA: Convert msleep calls to usleep_range calls Barry Grussling
2013-01-03 20:14   ` Ben Hutchings
2013-01-03 22:33     ` Barry Grussling
2013-01-03 22:56       ` Ben Hutchings
2013-01-03  1:54 ` [PATCH 3/4] DSA: Convert printk calls to netdev_info calls Barry Grussling
2013-01-03 19:06   ` Joe Perches [this message]
2013-01-03  1:54 ` [PATCH 4/4] DSA: Convert spaces to tabs where appropriate Barry Grussling

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=1357239972.5452.5.camel@joe-AO722 \
    --to=joe@perches.com \
    --cc=barry@grussling.com \
    --cc=netdev@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).