abaef6c3a803310a72a2951b9dbdd7c897f1ad40
[openwrt/staging/blocktrron.git] /
1 From 9283477e28913c1e7625c0a8d6959745e2431533 Mon Sep 17 00:00:00 2001
2 From: Aleksander Jan Bajkowski <olek2@wp.pl>
3 Date: Sat, 13 Jul 2024 19:09:20 +0200
4 Subject: [PATCH] net: ethernet: lantiq_etop: remove redundant device name
5 setup
6
7 The same name is set when allocating the netdevice structure in the
8 alloc_etherdev_mq()->alloc_etherrdev_mqs() function. Therefore, there
9 is no need to manually set it.
10
11 This fixes CheckPatch warnings:
12 WARNING: Prefer strscpy over strcpy - see: https://github.com/KSPP/linux/issues/88
13 strcpy(dev->name, "eth%d");
14
15 Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl>
16 Link: https://patch.msgid.link/20240713170920.863171-1-olek2@wp.pl
17 Signed-off-by: Jakub Kicinski <kuba@kernel.org>
18 ---
19 drivers/net/ethernet/lantiq_etop.c | 1 -
20 1 file changed, 1 deletion(-)
21
22 --- a/drivers/net/ethernet/lantiq_etop.c
23 +++ b/drivers/net/ethernet/lantiq_etop.c
24 @@ -675,7 +675,6 @@ ltq_etop_probe(struct platform_device *p
25 err = -ENOMEM;
26 goto err_out;
27 }
28 - strcpy(dev->name, "eth%d");
29 dev->netdev_ops = &ltq_eth_netdev_ops;
30 dev->ethtool_ops = &ltq_etop_ethtool_ops;
31 priv = netdev_priv(dev);