diff mbox series

[net-next] net: caif: remove unused name

Message ID 20240911015228.1555779-1-kuba@kernel.org (mailing list archive)
State Accepted
Commit 5905c024a776c7f592581551993817aaf0cd1f36
Delegated to: Netdev Maintainers
Headers show
Series [net-next] net: caif: remove unused name | expand

Checks

Context Check Description
netdev/series_format success Single patches do not need cover letters
netdev/tree_selection success Clearly marked for net-next
netdev/ynl success Generated files up to date; no warnings/errors; no diff in generated;
netdev/fixes_present success Fixes tag not required for -next series
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 16 this patch: 16
netdev/build_tools success No tools touched, skip
netdev/cc_maintainers success CCed 4 of 4 maintainers
netdev/build_clang success Errors and warnings before: 16 this patch: 16
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/deprecated_api success None detected
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 16 this patch: 16
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 14 lines checked
netdev/build_clang_rust success No Rust files in patch. Skipping build
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0
netdev/contest success net-next-2024-09-12--00-00 (tests: 764)

Commit Message

Jakub Kicinski Sept. 11, 2024, 1:52 a.m. UTC
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(-)

Comments

Simon Horman Sept. 11, 2024, 1:51 p.m. UTC | #1
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>
Justin Stitt Sept. 12, 2024, 8:46 p.m. UTC | #2
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>
patchwork-bot+netdevbpf@kernel.org Sept. 13, 2024, 3:50 a.m. UTC | #3
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!
diff mbox series

Patch

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;
 }