* [PATCH net-next] net: caif: remove unused name
@ 2024-09-11 1:52 Jakub Kicinski
2024-09-11 13:51 ` Simon Horman
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Jakub Kicinski @ 2024-09-11 1:52 UTC (permalink / raw)
To: davem; +Cc: netdev, edumazet, pabeni, Jakub Kicinski, justinstitt, horms
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 8391c4aab1aa ("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
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
---
CC: justinstitt@google.com
CC: horms@kernel.org
It's a bit unusual to take over patch submissions but the initial
submission was too low effort to count :|
---
net/caif/chnl_net.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/net/caif/chnl_net.c b/net/caif/chnl_net.c
index 47901bd4def1..94ad09e36df2 100644
--- a/net/caif/chnl_net.c
+++ b/net/caif/chnl_net.c
@@ -47,7 +47,6 @@ struct chnl_net {
struct caif_connect_request conn_req;
struct list_head list_field;
struct net_device *netdev;
- char name[256];
wait_queue_head_t netmgmt_wq;
/* Flow status to remember and control the transmission. */
bool flowenabled;
@@ -347,7 +346,6 @@ static int chnl_net_init(struct net_device *dev)
struct chnl_net *priv;
ASSERT_RTNL();
priv = netdev_priv(dev);
- strncpy(priv->name, dev->name, sizeof(priv->name));
INIT_LIST_HEAD(&priv->list_field);
return 0;
}
--
2.46.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH net-next] net: caif: remove unused name
2024-09-11 1:52 [PATCH net-next] net: caif: remove unused name Jakub Kicinski
@ 2024-09-11 13:51 ` Simon Horman
2024-09-12 20:46 ` Justin Stitt
2024-09-13 3:50 ` patchwork-bot+netdevbpf
2 siblings, 0 replies; 4+ messages in thread
From: Simon Horman @ 2024-09-11 13:51 UTC (permalink / raw)
To: Jakub Kicinski; +Cc: davem, netdev, edumazet, pabeni, justinstitt
On Tue, Sep 10, 2024 at 06:52:28PM -0700, Jakub Kicinski wrote:
> 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 8391c4aab1aa ("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
> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
> ---
> CC: justinstitt@google.com
> CC: horms@kernel.org
>
> It's a bit unusual to take over patch submissions but the initial
> submission was too low effort to count :|
Reviewed-by: Simon Horman <horms@kernel.org>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH net-next] net: caif: remove unused name
2024-09-11 1:52 [PATCH net-next] net: caif: remove unused name Jakub Kicinski
2024-09-11 13:51 ` Simon Horman
@ 2024-09-12 20:46 ` Justin Stitt
2024-09-13 3:50 ` patchwork-bot+netdevbpf
2 siblings, 0 replies; 4+ messages in thread
From: Justin Stitt @ 2024-09-12 20:46 UTC (permalink / raw)
To: Jakub Kicinski; +Cc: davem, netdev, edumazet, pabeni, horms
Hi,
On Tue, Sep 10, 2024 at 6:52 PM Jakub Kicinski <kuba@kernel.org> wrote:
>
> 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 8391c4aab1aa ("caif: Bugfixes in CAIF netdevice for close and flow control")
Thanks for looking into this a bit deeper.
>
> Link: https://lore.kernel.org/20240909-strncpy-net-caif-chnl_net-c-v1-1-438eb870c155@google.com
> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
> ---
> CC: justinstitt@google.com
> CC: horms@kernel.org
>
> It's a bit unusual to take over patch submissions but the initial
> submission was too low effort to count :|
> ---
> net/caif/chnl_net.c | 2 --
> 1 file changed, 2 deletions(-)
the best kind of diff :)
>
> diff --git a/net/caif/chnl_net.c b/net/caif/chnl_net.c
> index 47901bd4def1..94ad09e36df2 100644
> --- a/net/caif/chnl_net.c
> +++ b/net/caif/chnl_net.c
> @@ -47,7 +47,6 @@ struct chnl_net {
> struct caif_connect_request conn_req;
> struct list_head list_field;
> struct net_device *netdev;
> - char name[256];
> wait_queue_head_t netmgmt_wq;
> /* Flow status to remember and control the transmission. */
> bool flowenabled;
> @@ -347,7 +346,6 @@ static int chnl_net_init(struct net_device *dev)
> struct chnl_net *priv;
> ASSERT_RTNL();
> priv = netdev_priv(dev);
> - strncpy(priv->name, dev->name, sizeof(priv->name));
> INIT_LIST_HEAD(&priv->list_field);
> return 0;
> }
> --
> 2.46.0
>
Acked-by: Justin Stitt <justinstitt@google.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH net-next] net: caif: remove unused name
2024-09-11 1:52 [PATCH net-next] net: caif: remove unused name Jakub Kicinski
2024-09-11 13:51 ` Simon Horman
2024-09-12 20:46 ` Justin Stitt
@ 2024-09-13 3:50 ` patchwork-bot+netdevbpf
2 siblings, 0 replies; 4+ messages in thread
From: patchwork-bot+netdevbpf @ 2024-09-13 3:50 UTC (permalink / raw)
To: Jakub Kicinski; +Cc: davem, netdev, edumazet, pabeni, justinstitt, horms
Hello:
This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:
On Tue, 10 Sep 2024 18:52:28 -0700 you wrote:
> 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 8391c4aab1aa ("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
> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
>
> [...]
Here is the summary with links:
- [net-next] net: caif: remove unused name
https://git.kernel.org/netdev/net-next/c/5905c024a776
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2024-09-13 3:50 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-11 1:52 [PATCH net-next] net: caif: remove unused name Jakub Kicinski
2024-09-11 13:51 ` Simon Horman
2024-09-12 20:46 ` Justin Stitt
2024-09-13 3:50 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).