All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mvneta: remove double validation of mac address
@ 2013-10-29 21:25 Laurent Navet
  2013-10-29 23:35 ` Thomas Petazzoni
  0 siblings, 1 reply; 2+ messages in thread
From: Laurent Navet @ 2013-10-29 21:25 UTC (permalink / raw)
  To: thomas.petazzoni; +Cc: netdev, linux-kernel, Laurent Navet

Mac address validity is already checked in of_get_mac_address().
No need to do it twice.

Signed-off-by: Laurent Navet <laurent.navet@gmail.com>
---
 drivers/net/ethernet/marvell/mvneta.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/marvell/mvneta.c b/drivers/net/ethernet/marvell/mvneta.c
index e35bac7..7d99e695 100644
--- a/drivers/net/ethernet/marvell/mvneta.c
+++ b/drivers/net/ethernet/marvell/mvneta.c
@@ -2811,7 +2811,7 @@ static int mvneta_probe(struct platform_device *pdev)
 	}
 
 	dt_mac_addr = of_get_mac_address(dn);
-	if (dt_mac_addr && is_valid_ether_addr(dt_mac_addr)) {
+	if (dt_mac_addr) {
 		mac_from = "device tree";
 		memcpy(dev->dev_addr, dt_mac_addr, ETH_ALEN);
 	} else {
-- 
1.8.4.rc3


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

* Re: [PATCH] mvneta: remove double validation of mac address
  2013-10-29 21:25 [PATCH] mvneta: remove double validation of mac address Laurent Navet
@ 2013-10-29 23:35 ` Thomas Petazzoni
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Petazzoni @ 2013-10-29 23:35 UTC (permalink / raw)
  To: Laurent Navet; +Cc: netdev, linux-kernel

Dear Laurent Navet,

On Tue, 29 Oct 2013 22:25:06 +0100, Laurent Navet wrote:
> Mac address validity is already checked in of_get_mac_address().
> No need to do it twice.
> 
> Signed-off-by: Laurent Navet <laurent.navet@gmail.com>

Thanks, but an identical patch has been posted by Luka Perkov
<luka@openwrt.org> just a few days ago. See
http://www.spinics.net/lists/netdev/msg255454.html.

Thanks,

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

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

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

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-10-29 21:25 [PATCH] mvneta: remove double validation of mac address Laurent Navet
2013-10-29 23:35 ` Thomas Petazzoni

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.