Skip to content

Commit 5905c02

Browse files
committed
net: caif: remove unused name
Justin sent a patch to use strscpy_pad() instead of strncpy() on the name field. Simon rightly asked why the _pad() version is used, and looking closer name seems completely unused, the last code which referred to it was removed in commit 8391c4a ("caif: Bugfixes in CAIF netdevice for close and flow control") Link: https://lore.kernel.org/20240909-strncpy-net-caif-chnl_net-c-v1-1-438eb870c155@google.com Reviewed-by: Simon Horman <[email protected]> Acked-by: Justin Stitt <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent b215580 commit 5905c02

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

net/caif/chnl_net.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ struct chnl_net {
4747
struct caif_connect_request conn_req;
4848
struct list_head list_field;
4949
struct net_device *netdev;
50-
char name[256];
5150
wait_queue_head_t netmgmt_wq;
5251
/* Flow status to remember and control the transmission. */
5352
bool flowenabled;
@@ -347,7 +346,6 @@ static int chnl_net_init(struct net_device *dev)
347346
struct chnl_net *priv;
348347
ASSERT_RTNL();
349348
priv = netdev_priv(dev);
350-
strncpy(priv->name, dev->name, sizeof(priv->name));
351349
INIT_LIST_HEAD(&priv->list_field);
352350
return 0;
353351
}

0 commit comments

Comments
 (0)