lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <d5b585f3-eb84-4c72-9bdb-80721eb412a7@lunn.ch>
Date: Sun, 4 Jan 2026 23:06:28 +0100
From: Andrew Lunn <andrew@...n.ch>
To: Yeounsu Moon <yyyynoom@...il.com>
Cc: Andrew Lunn <andrew+netdev@...n.ch>,
	"David S. Miller" <davem@...emloft.net>,
	Eric Dumazet <edumazet@...gle.com>,
	Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
	netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH net-next] net: dlink: replace printk() with netdev_info()
 in rio_probe1()

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@...il.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ