netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Veaceslav Falico <vfalico@gmail.com>
Cc: netdev@vger.kernel.org, "David S. Miller" <davem@davemloft.net>,
	Jason Baron <jbaron@akamai.com>,
	Eric Dumazet <edumazet@google.com>,
	Vlad Yasevich <vyasevic@redhat.com>,
	stephen hemminger <stephen@networkplumber.org>,
	Jerry Chu <hkchu@google.com>,
	Ben Hutchings <bhutchings@solarflare.com>
Subject: Re: [PATCH v3 net-next 2/2] net: print net_device reg_state in netdev_* unless it's registered
Date: Thu, 17 Jul 2014 12:21:39 -0700	[thread overview]
Message-ID: <1405624899.14358.8.camel@joe-AO725> (raw)
In-Reply-To: <1405619171-18172-3-git-send-email-vfalico@gmail.com>

On Thu, 2014-07-17 at 19:46 +0200, Veaceslav Falico wrote:
[]
> diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
[]
> @@ -3444,7 +3459,8 @@ do {								\
>   * file/line information and a backtrace.
>   */
>  #define netdev_WARN(dev, format, args...)			\
> -	WARN(1, "netdevice: %s\n" format, netdev_name(dev), ##args)
> +	WARN(1, "netdevice: %s%s\n" format, netdev_name(dev),	\
> +	     netdev_reg_state(dev), ##args)

trivia:

My preference for style here is to have the format
and args on one line when it fits and separate
the format and args lines when they don't.

	WARN(1, "netdevice: %s%s\n" format,
	     netdev_name(dev), netdev_reg_state(dev), ##args)

Unrelated:  maybe it'd be better to change the '\n' to ": "

> diff --git a/lib/dynamic_debug.c b/lib/dynamic_debug.c
[]
> -		res = printk(KERN_DEBUG "%s: %pV", netdev_name(dev), &vaf);
> +		res = printk(KERN_DEBUG "%s%s: %pV", netdev_name(dev),
> +			     netdev_reg_state(dev), &vaf);

etc...

  reply	other threads:[~2014-07-17 19:21 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-17 17:46 [PATCH v3 net-next 0/2] net: print net_device name/state more often Veaceslav Falico
2014-07-17 17:46 ` [PATCH v3 net-next 1/2] net: use dev->name in netdev_pr* when it's available Veaceslav Falico
2014-07-18  9:01   ` Tom Gundersen
2014-07-17 17:46 ` [PATCH v3 net-next 2/2] net: print net_device reg_state in netdev_* unless it's registered Veaceslav Falico
2014-07-17 19:21   ` Joe Perches [this message]
2014-07-17 19:39     ` Veaceslav Falico
2014-07-21  3:39 ` [PATCH v3 net-next 0/2] net: print net_device name/state more often David Miller

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=1405624899.14358.8.camel@joe-AO725 \
    --to=joe@perches.com \
    --cc=bhutchings@solarflare.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=hkchu@google.com \
    --cc=jbaron@akamai.com \
    --cc=netdev@vger.kernel.org \
    --cc=stephen@networkplumber.org \
    --cc=vfalico@gmail.com \
    --cc=vyasevic@redhat.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;
as well as URLs for NNTP newsgroup(s).