mirror of
https://github.com/torvalds/linux.git
synced 2024-11-10 06:01:57 +00:00
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 8391c4aab1
("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 <horms@kernel.org>
Acked-by: Justin Stitt <justinstitt@google.com>
Link: https://patch.msgid.link/20240911015228.1555779-1-kuba@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
b215580789
commit
5905c024a7
@ -47,7 +47,6 @@ struct chnl_net {
|
|||||||
struct caif_connect_request conn_req;
|
struct caif_connect_request conn_req;
|
||||||
struct list_head list_field;
|
struct list_head list_field;
|
||||||
struct net_device *netdev;
|
struct net_device *netdev;
|
||||||
char name[256];
|
|
||||||
wait_queue_head_t netmgmt_wq;
|
wait_queue_head_t netmgmt_wq;
|
||||||
/* Flow status to remember and control the transmission. */
|
/* Flow status to remember and control the transmission. */
|
||||||
bool flowenabled;
|
bool flowenabled;
|
||||||
@ -347,7 +346,6 @@ static int chnl_net_init(struct net_device *dev)
|
|||||||
struct chnl_net *priv;
|
struct chnl_net *priv;
|
||||||
ASSERT_RTNL();
|
ASSERT_RTNL();
|
||||||
priv = netdev_priv(dev);
|
priv = netdev_priv(dev);
|
||||||
strncpy(priv->name, dev->name, sizeof(priv->name));
|
|
||||||
INIT_LIST_HEAD(&priv->list_field);
|
INIT_LIST_HEAD(&priv->list_field);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user