RE: [net-next 09/15] e1000e: resolve checkpatch PREFER_PR_LEVEL warning
flat view
From: Allan, Bruce W <hidden>
Date: 2013-01-11 18:05:28
-----Original Message----- From: Joe Perches [mailto:joe@perches.com] Sent: Friday, January 11, 2013 9:04 AM To: Kirsher, Jeffrey T Cc: davem@davemloft.net; Allan, Bruce W; netdev@vger.kernel.org; gospo@redhat.com; sassmann@redhat.com Subject: Re: [net-next 09/15] e1000e: resolve checkpatch PREFER_PR_LEVEL warning On Fri, 2013-01-11 at 02:23 -0800, Jeff Kirsher wrote:quoted
WARNING: Prefer netdev_info(netdev, ... then dev_info(dev, ... then pr_info(... to printk(KERN_INFO ...[]quoted
diff --git a/drivers/net/ethernet/intel/e1000e/netdev.cb/drivers/net/ethernet/intel/e1000e/netdev.c []quoted
@@ -4300,9 +4300,8 @@ static void e1000_print_link_info(structe1000_adapter *adapter)quoted
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",quoted
- adapter->netdev->name, - adapter->link_speed, + pr_info("e1000e: %s NIC Link is Up %d Mbps %s Duplex, FlowControl: %s\n",quoted
+ adapter->netdev->name, adapter->link_speed,Don't these changes break a user-space tool? If not, please remove the comment above the pr_info()s and remove the unnecessary e1000e: prefixes.quoted
@@ -4521,8 +4520,8 @@ static void e1000_watchdog_task(structwork_struct *work) []quoted
/* Link status message must follow this format */ - printk(KERN_INFO "e1000e: %s NIC Link is Down\n", - adapter->netdev->name); + pr_info("e1000e: %s NIC Link is Down\n", + adapter->netdev->name);
Hmm, I'm not sure how that got past our testing even after I asked to check for redundant instances of "e1000e". This patch can be dropped and I will submit an updated one but it will still have the "must follow this format for user tools" comment since the user tools key off of "e1000e: <iface> NIC Link is ..." text. Thanks, Bruce.