Skip to contentSkip to conversation

net: sun3lance: Remove redundant assignment

PATCH In review Kamal Heib 3 participants 3 messages Jun 14, 2024 – Jun 18, 2024

Subsystems (2)
lore
Share & tools
lore

Kamal Heib

author
#0 lore raw

PATCH 1/1 net: sun3lance: Remove redundant assignment

There is no point in initializing an ndo to NULL, therefore the assignment is redundant and can be removed.

---
 drivers/net/ethernet/amd/sun3lance.c | 1 -
 1 file changed, 1 deletion(-)
drivers/net/ethernet/amd/sun3lance.c +0 -1
index 246f34c43765..fe12051d8471 100644
@@ -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,
 };
 
Signature · 1 line
2.45.2
maintainer
#2 lore raw
In reply to Kamal Heib
Quoted 13 lines · 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.

---
 drivers/net/ethernet/amd/sun3lance.c | 1 -
 1 file changed, 1 deletion(-)
drivers/net/ethernet/amd/sun3lance.c +0 -0
index 246f34c43765..fe12051d8471 100644

drivers/net/ethernet/amd/sun3lance.c static const struct net_device_ops lance_netdev_ops = { · line 301

Quoted 7 lines
drivers/net/ethernet/amd/sun3lance.c +0 -1
@@ -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.