Skip to contentSkip to conversation

ethernet: remove random_ether_addr()

PATCH Applied Jakub Kicinski 3 participants 3 messages Oct 13, 2021 – Oct 14, 2021

Subsystems (2)
lore
Share & tools
lore

Jakub Kicinski

author maintainer
#0 lore raw

PATCH 1/1 ethernet: remove random_ether_addr()

random_ether_addr() was the original name of the helper which was kept for backward compatibility (?) after the rename in commit 0a4dd594982a ("etherdevice: Rename random_ether_addr to eth_random_addr").

We have a single random_ether_addr() caller left in tree while there are 70 callers of eth_random_addr(). Time to drop this define.

---
CC: [email protected]
CC: [email protected]
CC: [email protected]

---
 drivers/net/ethernet/ti/am65-cpsw-nuss.c | 2 +-
 include/linux/etherdevice.h              | 2 --
 2 files changed, 1 insertion(+), 3 deletions(-)
drivers/net/ethernet/ti/am65-cpsw-nuss.c +1 -1
index 6904bfaa5777..c092cb61416a 100644
@@ -1918,7 +1918,7 @@ static int am65_cpsw_nuss_init_slave_ports(struct am65_cpsw_common *common)
 							port->port_id,
 							port->slave.mac_addr);
 			if (!is_valid_ether_addr(port->slave.mac_addr)) {
-				random_ether_addr(port->slave.mac_addr);
+				eth_random_addr(port->slave.mac_addr);
 				dev_err(dev, "Use random MAC address\n");
 			}
 		}
include/linux/etherdevice.h +0 -2
index 76f7ff684cbf..23681c3d3b8a 100644
@@ -234,8 +234,6 @@ static inline void eth_random_addr(u8 *addr)
 	addr[0] |= 0x02;	/* set local assignment bit (IEEE802) */
 }
 
-#define random_ether_addr(addr) eth_random_addr(addr)
-
 /**
  * eth_broadcast_addr - Assign broadcast address
  * @addr: Pointer to a six-byte array containing the Ethernet address
Signature · 1 line
2.31.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 10 lines · Jakub Kicinski

random_ether_addr() was the original name of the helper which was kept for backward compatibility (?) after the rename in commit 0a4dd594982a ("etherdevice: Rename random_ether_addr to eth_random_addr").

We have a single random_ether_addr() caller left in tree while there are 70 callers of eth_random_addr(). Time to drop this define.

#2 lore raw
In reply to Jakub Kicinski
This patch was applied to netdev/net-next.git (master) by Jakub Kicinski <[email protected]>:

Hello:

This patch was applied to netdev/net-next.git (master) by Jakub Kicinski <[email protected]>:

Quoted 10 lines · On Wed, 13 Oct 2021 13:54:50 -0700 you wrote:

random_ether_addr() was the original name of the helper which was kept for backward compatibility (?) after the rename in commit 0a4dd594982a ("etherdevice: Rename random_ether_addr to eth_random_addr").

We have a single random_ether_addr() caller left in tree while there are 70 callers of eth_random_addr(). Time to drop this define.

[...]

Here is the summary with links:
- [net-next] ethernet: remove random_ether_addr()

    https://git.kernel.org/netdev/net-next/c/ba530fea8ca1

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html