* [PATCH] drivers/net/e1000/e1000_main.c: Fix message logging defect
@ 2010-06-11 6:29 Joe Perches
2010-06-11 19:46 ` Jeff Kirsher
0 siblings, 1 reply; 2+ messages in thread
From: Joe Perches @ 2010-06-11 6:29 UTC (permalink / raw)
To: Jeff Kirsher; +Cc: Emil Tantilov, netdev, e1000-devel, LKML
commit 675ad47375c76a7c3be4ace9554d92cd55518ced
removed the capability to use ethtool.set_msglevel to
control the types of messages emitted by the driver.
That commit should probably be reverted.
If not, then this patch fixes a message logging defect
introduced by converting a printk without KERN_<level>
to e_info.
This also reduces text by about 200 bytes.
Signed-off-by: Joe Perches <joe@perches.com>
---
diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c
index ebdea08..68a8089 100644
--- a/drivers/net/e1000/e1000_main.c
+++ b/drivers/net/e1000/e1000_main.c
@@ -1047,15 +1047,14 @@ static int __devinit e1000_probe(struct pci_dev *pdev,
goto err_register;
/* print bus type/speed/width info */
- e_info("(PCI%s:%s:%s) ",
- ((hw->bus_type == e1000_bus_type_pcix) ? "-X" : ""),
- ((hw->bus_speed == e1000_bus_speed_133) ? "133MHz" :
- (hw->bus_speed == e1000_bus_speed_120) ? "120MHz" :
- (hw->bus_speed == e1000_bus_speed_100) ? "100MHz" :
- (hw->bus_speed == e1000_bus_speed_66) ? "66MHz" : "33MHz"),
- ((hw->bus_width == e1000_bus_width_64) ? "64-bit" : "32-bit"));
-
- e_info("%pM\n", netdev->dev_addr);
+ e_info("(PCI%s:%dMHz:%d-bit) %pM\n",
+ ((hw->bus_type == e1000_bus_type_pcix) ? "-X" : ""),
+ ((hw->bus_speed == e1000_bus_speed_133) ? 133 :
+ (hw->bus_speed == e1000_bus_speed_120) ? 120 :
+ (hw->bus_speed == e1000_bus_speed_100) ? 100 :
+ (hw->bus_speed == e1000_bus_speed_66) ? 66 : 33),
+ ((hw->bus_width == e1000_bus_width_64) ? 64 : 32),
+ netdev->dev_addr);
/* carrier off reporting is important to ethtool even BEFORE open */
netif_carrier_off(netdev);
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] drivers/net/e1000/e1000_main.c: Fix message logging defect
2010-06-11 6:29 [PATCH] drivers/net/e1000/e1000_main.c: Fix message logging defect Joe Perches
@ 2010-06-11 19:46 ` Jeff Kirsher
0 siblings, 0 replies; 2+ messages in thread
From: Jeff Kirsher @ 2010-06-11 19:46 UTC (permalink / raw)
To: Joe Perches; +Cc: Emil Tantilov, netdev, e1000-devel, LKML
On Thu, Jun 10, 2010 at 23:29, Joe Perches <joe@perches.com> wrote:
> commit 675ad47375c76a7c3be4ace9554d92cd55518ced
> removed the capability to use ethtool.set_msglevel to
> control the types of messages emitted by the driver.
>
> That commit should probably be reverted.
>
> If not, then this patch fixes a message logging defect
> introduced by converting a printk without KERN_<level>
> to e_info.
>
> This also reduces text by about 200 bytes.
>
> Signed-off-by: Joe Perches <joe@perches.com>
> ---
Thanks Joe. I have added the patch to my queue.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-06-11 19:46 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-06-11 6:29 [PATCH] drivers/net/e1000/e1000_main.c: Fix message logging defect Joe Perches
2010-06-11 19:46 ` Jeff Kirsher
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox