netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] net: dlink: replace printk() with netdev_info() in rio_probe1()
@ 2026-01-04 11:18 Yeounsu Moon
  2026-01-04 22:06 ` Andrew Lunn
  0 siblings, 1 reply; 3+ messages in thread
From: Yeounsu Moon @ 2026-01-04 11:18 UTC (permalink / raw)
  To: Andrew Lunn, David S. Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni
  Cc: netdev, linux-kernel, Yeounsu Moon

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
Signed-off-by: Yeounsu Moon <yyyynoom@gmail.com>
---
 drivers/net/ethernet/dlink/dl2k.c | 17 +++++++----------
 1 file changed, 7 insertions(+), 10 deletions(-)

diff --git a/drivers/net/ethernet/dlink/dl2k.c b/drivers/net/ethernet/dlink/dl2k.c
index 846d58c769ea..b2af6399c3e8 100644
--- a/drivers/net/ethernet/dlink/dl2k.c
+++ b/drivers/net/ethernet/dlink/dl2k.c
@@ -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:
-- 
2.52.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH net-next] net: dlink: replace printk() with netdev_info() in rio_probe1()
  2026-01-04 11:18 [PATCH net-next] net: dlink: replace printk() with netdev_info() in rio_probe1() Yeounsu Moon
@ 2026-01-04 22:06 ` Andrew Lunn
  2026-01-05 11:03   ` Yeounsu Moon
  0 siblings, 1 reply; 3+ messages in thread
From: Andrew Lunn @ 2026-01-04 22:06 UTC (permalink / raw)
  To: Yeounsu Moon
  Cc: Andrew Lunn, David S. Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, netdev, linux-kernel

On Sun, Jan 04, 2026 at 08:18:50PM +0900, Yeounsu Moon wrote:
> 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
> Signed-off-by: Yeounsu Moon <yyyynoom@gmail.com>
> ---
>  drivers/net/ethernet/dlink/dl2k.c | 17 +++++++----------
>  1 file changed, 7 insertions(+), 10 deletions(-)
> 
> diff --git a/drivers/net/ethernet/dlink/dl2k.c b/drivers/net/ethernet/dlink/dl2k.c
> index 846d58c769ea..b2af6399c3e8 100644
> --- a/drivers/net/ethernet/dlink/dl2k.c
> +++ b/drivers/net/ethernet/dlink/dl2k.c
> @@ -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;

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH net-next] net: dlink: replace printk() with netdev_info() in rio_probe1()
  2026-01-04 22:06 ` Andrew Lunn
@ 2026-01-05 11:03   ` Yeounsu Moon
  0 siblings, 0 replies; 3+ messages in thread
From: Yeounsu Moon @ 2026-01-05 11:03 UTC (permalink / raw)
  To: Andrew Lunn, Yeounsu Moon
  Cc: Andrew Lunn, David S. Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, netdev, linux-kernel

On Mon Jan 5, 2026 at 7:06 AM KST, Andrew Lunn wrote:
> 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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-01-05 11:03 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-04 11:18 [PATCH net-next] net: dlink: replace printk() with netdev_info() in rio_probe1() Yeounsu Moon
2026-01-04 22:06 ` Andrew Lunn
2026-01-05 11:03   ` Yeounsu Moon

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).