]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
net: ethernet: lantiq_etop: remove redundant device name setup
authorAleksander Jan Bajkowski <olek2@wp.pl>
Sat, 13 Jul 2024 17:09:20 +0000 (19:09 +0200)
committerJakub Kicinski <kuba@kernel.org>
Mon, 15 Jul 2024 14:02:22 +0000 (07:02 -0700)
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>
drivers/net/ethernet/lantiq_etop.c

index 0b99828043708e83215aac7f015e3ba78762c36a..9e69848153864b5bb4fedc48769ee370ad7448eb 100644 (file)
@@ -675,7 +675,6 @@ ltq_etop_probe(struct platform_device *pdev)
                err = -ENOMEM;
                goto err_out;
        }
-       strcpy(dev->name, "eth%d");
        dev->netdev_ops = &ltq_eth_netdev_ops;
        dev->ethtool_ops = &ltq_etop_ethtool_ops;
        priv = netdev_priv(dev);