Skip to contentSkip to conversation

ethernet/arc/arc_emac: drop redundant mac address check

PATCH Superseded Luka Perkov 2 participants 3 messages Oct 29, 2013

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ethernet/arc/arc_emac: drop redundant mac address check

Checking if MAC address is valid using is_valid_ether_addr() is already done in of_get_mac_address(). While at it, reorganize checking so it matches checks in other drivers.

---
 drivers/net/ethernet/arc/emac_main.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/net/ethernet/arc/emac_main.c +3 -3
index 9e16014..d818ded 100644
@@ -725,10 +725,10 @@ static int arc_emac_probe(struct platform_device *pdev)
 	/* Get MAC address from device tree */
 	mac_addr = of_get_mac_address(pdev->dev.of_node);
 
-	if (!mac_addr || !is_valid_ether_addr(mac_addr))
-		eth_hw_addr_random(ndev);
-	else
+	if (mac_addr)
 		memcpy(ndev->dev_addr, mac_addr, ETH_ALEN);
+	else
+		eth_hw_addr_random(ndev);
 
 	dev_info(&pdev->dev, "MAC address is now %pM\n", ndev->dev_addr);
 
Signature · 1 line
1.8.4.1
maintainer
#1 lore raw

I've seen you use three inconsistent Subject prefixes here, pick a scheme and stick to it please!

First patch was:

netdev: ${driver_name}:

Second patch was:

net: ${driver_name}:

Third patch was:

patch/to/driver/directory:

This is really not acceptable. Just using "${driver_name}: " is good enough.

#2 lore raw

Hi David,

Quoted 7 lines · David Miller

I've seen you use three inconsistent Subject prefixes here, pick a scheme and stick to it please!

First patch was:

netdev: ${driver_name}:

Quoted 7 lines

Second patch was:

net: ${driver_name}:

Third patch was:

patch/to/driver/directory:

True. I have sent it that way because I've followed the commit schematics of each driver individually.

Quoted 2 lines

This is really not acceptable. Just using "${driver_name}: " is good enough.

It's not a problem to resend them... But I'm wondering should this be squashed into one patch?

Luka