Skip to contentSkip to conversation

net: ethernet: lantiq_etop: remove redundant device name setup

PATCH Superseded Aleksander Jan Bajkowski 1 participant 1 message Jul 13, 2024

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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");
---
 drivers/net/ethernet/lantiq_etop.c | 1 -
 1 file changed, 1 deletion(-)
drivers/net/ethernet/lantiq_etop.c +0 -1
index 0b9982804370..9e6984815386 100644
@@ -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);
Signature · 1 line
2.39.2