diff mbox series

[net-next] net: sun3lance: Remove redundant assignment

Message ID 20240614145231.13322-1-kheib@redhat.com (mailing list archive)
State Rejected
Delegated to: Netdev Maintainers
Headers show
Series [net-next] net: sun3lance: Remove redundant assignment | 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: 8 this patch: 8
netdev/build_tools success No tools touched, skip
netdev/cc_maintainers warning 1 maintainers not CCed: edumazet@google.com
netdev/build_clang success Errors and warnings before: 8 this patch: 8
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: 8 this patch: 8
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 7 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-06-16--18-00 (tests: 659)

Commit Message

Kamal Heib June 14, 2024, 2:52 p.m. UTC
There is no point in initializing an ndo to NULL, therefore the
assignment is redundant and can be removed.

Signed-off-by: Kamal Heib <kheib@redhat.com>
---
 drivers/net/ethernet/amd/sun3lance.c | 1 -
 1 file changed, 1 deletion(-)

Comments

Joe Damato June 14, 2024, 5:01 p.m. UTC | #1
On Fri, Jun 14, 2024 at 10:52:31AM -0400, Kamal Heib wrote:
> There is no point in initializing an ndo to NULL, therefore the
> assignment is redundant and can be removed.
> 
> Signed-off-by: Kamal Heib <kheib@redhat.com>
> ---
>  drivers/net/ethernet/amd/sun3lance.c | 1 -
>  1 file changed, 1 deletion(-)

Reviewed-by: Joe Damato <jdamato@fastly.com>
Jakub Kicinski June 18, 2024, 1 a.m. UTC | #2
On Fri, 14 Jun 2024 10:52:31 -0400 Kamal Heib wrote:
> There is no point in initializing an ndo to NULL, therefore the
> assignment is redundant and can be removed.
> 
> Signed-off-by: Kamal Heib <kheib@redhat.com>
> ---
>  drivers/net/ethernet/amd/sun3lance.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/drivers/net/ethernet/amd/sun3lance.c b/drivers/net/ethernet/amd/sun3lance.c
> index 246f34c43765..fe12051d8471 100644
> --- a/drivers/net/ethernet/amd/sun3lance.c
> +++ b/drivers/net/ethernet/amd/sun3lance.c
> @@ -296,7 +296,6 @@ static const struct net_device_ops lance_netdev_ops = {
>  	.ndo_stop		= lance_close,
>  	.ndo_start_xmit		= lance_start_xmit,
>  	.ndo_set_rx_mode	= set_multicast_list,
> -	.ndo_set_mac_address	= NULL,
>  	.ndo_validate_addr	= eth_validate_addr,
>  };
>  

We seem to have a lot of these:

$ git grep -E '^[[:space:]]\.[a-z_]*[[:space:]]*= NULL,' -- drivers/net/
| wc -l
287

and we try to discourage folks from sending cleanup patches to
very old device drivers. So, unfortunately, I'd prefer to leave 
this code as is.
diff mbox series

Patch

diff --git a/drivers/net/ethernet/amd/sun3lance.c b/drivers/net/ethernet/amd/sun3lance.c
index 246f34c43765..fe12051d8471 100644
--- a/drivers/net/ethernet/amd/sun3lance.c
+++ b/drivers/net/ethernet/amd/sun3lance.c
@@ -296,7 +296,6 @@  static const struct net_device_ops lance_netdev_ops = {
 	.ndo_stop		= lance_close,
 	.ndo_start_xmit		= lance_start_xmit,
 	.ndo_set_rx_mode	= set_multicast_list,
-	.ndo_set_mac_address	= NULL,
 	.ndo_validate_addr	= eth_validate_addr,
 };