Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

net: ethernet: lantiq_etop: remove redundant device name setup

The same name is set when allocating the netdevice structure in the
alloc_etherdev_mq()->alloc_etherrdev_mqs() function. Therefore, there
is no need to manually set it.

This fixes CheckPatch warnings:
WARNING: Prefer strscpy over strcpy - see: https://github.com/KSPP/linux/issues/88
strcpy(dev->name, "eth%d");

Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl>
Link: https://patch.msgid.link/20240713170920.863171-1-olek2@wp.pl
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Aleksander Jan Bajkowski and committed by
Jakub Kicinski
9283477e c49379dc

-1
-1
drivers/net/ethernet/lantiq_etop.c
··· 675 675 err = -ENOMEM; 676 676 goto err_out; 677 677 } 678 - strcpy(dev->name, "eth%d"); 679 678 dev->netdev_ops = &ltq_eth_netdev_ops; 680 679 dev->ethtool_ops = &ltq_etop_ethtool_ops; 681 680 priv = netdev_priv(dev);