netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ethernet/arc/arc_emac: drop redundant mac address check
@ 2013-10-29  1:32 Luka Perkov
  2013-10-29  3:48 ` David Miller
  0 siblings, 1 reply; 3+ messages in thread
From: Luka Perkov @ 2013-10-29  1:32 UTC (permalink / raw)
  To: netdev; +Cc: abrodkin, Luka Perkov

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.

Signed-off-by: Luka Perkov <luka@openwrt.org>
---
 drivers/net/ethernet/arc/emac_main.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/ethernet/arc/emac_main.c b/drivers/net/ethernet/arc/emac_main.c
index 9e16014..d818ded 100644
--- a/drivers/net/ethernet/arc/emac_main.c
+++ b/drivers/net/ethernet/arc/emac_main.c
@@ -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);
 
-- 
1.8.4.1

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] ethernet/arc/arc_emac: drop redundant mac address check
  2013-10-29  1:32 [PATCH] ethernet/arc/arc_emac: drop redundant mac address check Luka Perkov
@ 2013-10-29  3:48 ` David Miller
  2013-10-29  9:10   ` Luka Perkov
  0 siblings, 1 reply; 3+ messages in thread
From: David Miller @ 2013-10-29  3:48 UTC (permalink / raw)
  To: luka; +Cc: netdev, abrodkin


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.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] ethernet/arc/arc_emac: drop redundant mac address check
  2013-10-29  3:48 ` David Miller
@ 2013-10-29  9:10   ` Luka Perkov
  0 siblings, 0 replies; 3+ messages in thread
From: Luka Perkov @ 2013-10-29  9:10 UTC (permalink / raw)
  To: David Miller; +Cc: netdev, abrodkin

Hi David,

On Mon, Oct 28, 2013 at 11:48:42PM -0400, David Miller wrote:
> 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:

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

> 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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-10-29  9:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-29  1:32 [PATCH] ethernet/arc/arc_emac: drop redundant mac address check Luka Perkov
2013-10-29  3:48 ` David Miller
2013-10-29  9:10   ` Luka Perkov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).