netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
To: Joe Perches <joe@perches.com>,
	"Allan, Bruce W" <bruce.w.allan@intel.com>
Cc: David Miller <davem@davemloft.net>,
	netdev@vger.kernel.org, gospo@redhat.com, sassmann@redhat.com
Subject: Re: [net-next 04/13] e1000e: cleanup checkpatch PREFER_PR_LEVEL warning
Date: Fri, 24 Aug 2012 14:19:24 -0700	[thread overview]
Message-ID: <1345843164.3613.9.camel@jtkirshe-mobl> (raw)
In-Reply-To: <1345831348.32359.8.camel@joe2Laptop>

[-- Attachment #1: Type: text/plain, Size: 2021 bytes --]

On Fri, 2012-08-24 at 11:02 -0700, Joe Perches wrote:
> On Thu, 2012-08-23 at 07:01 -0700, Joe Perches wrote:
> > On Thu, 2012-08-23 at 02:56 -0700, Jeff Kirsher wrote:
> > > From: Bruce Allan <bruce.w.allan@intel.com>
> > > 
> > > checkpatch warning: Prefer pr_info(... to printk(KERN_INFO, ...
> > []
> > > diff --git a/drivers/net/ethernet/intel/e1000e/netdev.c b/drivers/net/ethernet/intel/e1000e/netdev.c
> > []
> > > @@ -4330,9 +4330,8 @@ static void e1000_print_link_info(struct e1000_adapter *adapter)
> > >  	u32 ctrl = er32(CTRL);
> > >  
> > >  	/* Link status message must follow this format for user tools */
> > > -	printk(KERN_INFO "e1000e: %s NIC Link is Up %d Mbps %s Duplex, Flow Control: %s\n",
> > > -		adapter->netdev->name,
> > > -		adapter->link_speed,
> > > +	pr_info("e1000e: %s NIC Link is Up %d Mbps %s Duplex, Flow Control: %s\n",
> > > +		adapter->netdev->name, adapter->link_speed,
> > >  		adapter->link_duplex == FULL_DUPLEX ? "Full" : "Half",
> > >  		(ctrl & E1000_CTRL_TFCE) && (ctrl & E1000_CTRL_RFCE) ? "Rx/Tx" :
> > >  		(ctrl & E1000_CTRL_RFCE) ? "Rx" :
> > 
> > I think these conversions are not a good idea.
> > 
> > When you have a specific message format that must be
> > followed, use printk.
> > 
> > pr_<level> may at some point in the near future use
> > #define pr_fmt(fmt) KBUiLD_MODNAME ": " fmt
> > as a global default equivalent.
> 
> Hey Jeff.
> 
> The comment above this change (and the other) reads
> 
>   	/* Link status message must follow this format for user tools */
> 
> This file already uses #define pr_fmt(fmt) KBUILD_MODNAME...
> With this patch, the output form changes to use 2 prefixes.
> 
> Is that really desired?  Probably not.
> 
> If the comments are old and don't apply any more, they
> should be removed.
> 

Bruce really should answer this since this is his patch and there was a
reason why he made the change.  My guess was the current output was
providing incorrect or mis-leading information.

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

  reply	other threads:[~2012-08-24 21:19 UTC|newest]

Thread overview: 61+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-23  9:56 [net-next 00/13][pull request] Intel Wired LAN Driver Updates Jeff Kirsher
2012-08-23  9:56 ` [net-next 01/13] e1000e: use correct type for read of 32-bit register Jeff Kirsher
2012-08-23  9:56 ` [net-next 02/13] e1000e: cleanup strict checkpatch check Jeff Kirsher
2012-08-23  9:56 ` [net-next 03/13] e1000e: cleanup - remove inapplicable comment Jeff Kirsher
2012-08-23  9:56 ` [net-next 04/13] e1000e: cleanup checkpatch PREFER_PR_LEVEL warning Jeff Kirsher
2012-08-23 14:01   ` Joe Perches
2012-08-24 18:02     ` Joe Perches
2012-08-24 21:19       ` Jeff Kirsher [this message]
2012-08-24 22:43         ` Joe Perches
2012-08-23  9:56 ` [net-next 05/13] e1000e: cleanup - remove unnecessary variable Jeff Kirsher
2012-08-23  9:56 ` [net-next 06/13] e1000e: update driver version number Jeff Kirsher
2012-08-23  9:56 ` [net-next 07/13] e1000e: cleanup strict checkpatch MEMORY_BARRIER checks Jeff Kirsher
2012-08-23  9:56 ` [net-next 08/13] igb: Add loopback test support for i210 Jeff Kirsher
2012-08-23  9:56 ` [net-next 09/13] igb: reduce Rx header size Jeff Kirsher
2012-08-23  9:56 ` [net-next 10/13] igb: Tidy up wrapping for CONFIG_IGB_PTP Jeff Kirsher
2012-08-23 11:03   ` Richard Cochran
2012-08-23 16:09     ` Vick, Matthew
2012-08-23 17:29       ` Richard Cochran
2012-08-23 17:40         ` Vick, Matthew
2012-08-23 18:03           ` Richard Cochran
2012-08-23 18:03         ` Keller, Jacob E
2012-08-23 18:40           ` Vick, Matthew
2012-08-24  7:04             ` Richard Cochran
2012-08-24 10:10             ` Richard Cochran
2012-08-24 16:51               ` Ben Hutchings
2012-08-24 19:38                 ` Keller, Jacob E
2012-08-25  6:20                   ` Richard Cochran
2012-08-26  1:33                     ` Keller, Jacob E
2012-08-26 13:01                       ` Richard Cochran
2012-08-23 11:28   ` Richard Cochran
2012-08-23 16:27     ` Vick, Matthew
2012-08-23  9:56 ` [net-next 11/13] igb: Update PTP function names/variables and locations Jeff Kirsher
2012-08-23 11:16   ` Richard Cochran
2012-08-23 16:22     ` Vick, Matthew
2012-08-23 17:53       ` Richard Cochran
2012-08-23 18:00         ` Keller, Jacob E
2012-08-23 18:11           ` Richard Cochran
2012-08-23 18:44             ` Vick, Matthew
2012-08-24  6:55               ` Richard Cochran
2012-08-24 15:52                 ` Vick, Matthew
2012-08-25  5:48                   ` Richard Cochran
2012-08-27 15:23                     ` Vick, Matthew
2012-08-27 16:44                       ` Richard Cochran
2012-08-27 17:39                         ` Vick, Matthew
2012-08-23 18:35         ` Vick, Matthew
2012-08-23 18:48           ` Keller, Jacob E
2012-08-23 18:58             ` Vick, Matthew
2012-08-24  3:02         ` Joe Perches
2012-08-24  6:32           ` Richard Cochran
2012-08-24  9:22             ` Joe Perches
2012-08-24 15:12               ` David Miller
2012-08-24 17:56                 ` Joe Perches
2012-08-23  9:56 ` [net-next 12/13] igb: Correct PTP support query from ethtool Jeff Kirsher
2012-08-23 11:24   ` Richard Cochran
2012-08-23 16:38     ` Vick, Matthew
2012-08-23  9:56 ` [net-next 13/13] igb: Store the MAC address in the name in the PTP struct Jeff Kirsher
2012-08-23 10:45   ` Richard Cochran
2012-08-23 16:05     ` Vick, Matthew
2012-08-23 21:35     ` Ben Hutchings
2012-08-24  6:19       ` Richard Cochran
2012-09-06 23:04         ` Keller, Jacob E

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=1345843164.3613.9.camel@jtkirshe-mobl \
    --to=jeffrey.t.kirsher@intel.com \
    --cc=bruce.w.allan@intel.com \
    --cc=davem@davemloft.net \
    --cc=gospo@redhat.com \
    --cc=joe@perches.com \
    --cc=netdev@vger.kernel.org \
    --cc=sassmann@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).