net: dlink: replace printk() with netdev_info() in rio_probe1()
Subsystems (2)
PATCH 1/1 net: dlink: replace printk() with netdev_info() in rio_probe1()
Replace rio_probe1() printk(KERN_INFO) messages with netdev_info().
Log rx_timeout on a separate line since netdev_info() prefixes each message and the multi-line formatting looks broken otherwise.
No functional change intended.
Tested-on: D-Link DGE 550T Rev-A3
--- drivers/net/ethernet/dlink/dl2k.c | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-)
drivers/net/ethernet/dlink/dl2k.c +7 -10
@@ -279,18 +279,15 @@ rio_probe1 (struct pci_dev *pdev, const struct pci_device_id *ent) card_idx++; -printk (KERN_INFO "%s: %s, %pM, IRQ %d\n" , - dev->name, np->name, dev->dev_addr, irq); +netdev_info (dev,"%s, %pM, IRQ %d" , np->name, dev->dev_addr, irq);if (tx_coalesce >1 ) -printk (KERN_INFO "tx_coalesce:\t%d packets\n" , - tx_coalesce); -if (np->coalesce) -printk (KERN_INFO -"rx_coalesce:\t%d packets\n" -"rx_timeout: \t%d ns\n" , - np->rx_coalesce, np->rx_timeout*640 ); +netdev_info (dev,"tx_coalesce:\t%d packets" , tx_coalesce); +if (np->coalesce) { +netdev_info (dev,"rx_coalesce:\t%d packets" , np->rx_coalesce); +netdev_info (dev,"rx_timeout: \t%d ns" , np->rx_timeout *640 ); + }if (np->vlan) -printk (KERN_INFO "vlan(id):\t%d\n" , np->vlan); +netdev_info (dev,"vlan(id):\t%d" , np->vlan);return 0 ; err_out_unmap_rx:
Signature · 1 line
2.52.0
Quoted 31 lines · Yeounsu Moon
Replace
rio_probe1()printk(KERN_INFO)messages withnetdev_info().Log
rx_timeouton a separate line sincenetdev_info()prefixes each message and the multi-line formatting looks broken otherwise.No functional change intended.
Tested-on: D-Link DGE 550T Rev-A3
Signed-off-by Yeounsu Moon <[email protected]>--- drivers/net/ethernet/dlink/dl2k.c | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-)drivers/net/ethernet/dlink/dl2k.c +1
-8@@ -279,18 +279,15 @@ rio_probe1 (struct pci_dev *pdev, const struct pci_device_id *ent) card_idx++; -printk (KERN_INFO "%s: %s, %pM, IRQ %d\n" , - dev->name, np->name, dev->dev_addr, irq); +netdev_info (dev,"%s, %pM, IRQ %d" , np->name, dev->dev_addr, irq);if (tx_coalesce >1 ) -printk (KERN_INFO "tx_coalesce:\t%d packets\n" , - tx_coalesce); -if (np->coalesce) - printk(KERN_INFO - "rx_coalesce:\t%d packets\n" - "rx_timeout: \t%d ns\n",
drivers/net/ethernet/dlink/dl2k.c rio_probe1 (struct pci_dev *pdev, const struct pci_device_id *ent) · line 291
Quoted 10 lines
drivers/net/ethernet/dlink/dl2k.c +6
-2- np->rx_coalesce, np->rx_timeout*640); +netdev_info (dev,"tx_coalesce:\t%d packets" , tx_coalesce); +if (np->coalesce) { +netdev_info (dev,"rx_coalesce:\t%d packets" , np->rx_coalesce); +netdev_info (dev,"rx_timeout: \t%d ns" , np->rx_timeout *640 ); + }if (np->vlan) -printk (KERN_INFO "vlan(id):\t%d\n" , np->vlan); +netdev_info (dev,"vlan(id):\t%d" , np->vlan);return 0 ;
This looks like a valid transformation, but drivers are not really meant to spam the kernel log like this. So i would actually change them to netdev_dbg() and add a comment in the commit message.
Andrew
Quoted 5 lines · Andrew Lunn
This looks like a valid transformation, but drivers are not really meant to spam the kernel log like this. So i would actually change them to
netdev_dbg()and add a comment in the commit message.Andrew
Thank you for the review.
I'll switch the printk() probe message to netdev_dbg() and add a note in the commit message. I'll send v2.
Yeounsu Moon