* [PATCH 1/2] octeon_mgmt: remove double validation of mac address
@ 2013-10-29 21:27 Laurent Navet
2013-10-29 21:45 ` David Daney
0 siblings, 1 reply; 2+ messages in thread
From: Laurent Navet @ 2013-10-29 21:27 UTC (permalink / raw)
To: davem
Cc: jiri, david.daney, wfp5p, gregkh, 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/octeon/octeon_mgmt.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/octeon/octeon_mgmt.c b/drivers/net/ethernet/octeon/octeon_mgmt.c
index 622aa75..1b326cbc 100644
--- a/drivers/net/ethernet/octeon/octeon_mgmt.c
+++ b/drivers/net/ethernet/octeon/octeon_mgmt.c
@@ -1545,7 +1545,7 @@ static int octeon_mgmt_probe(struct platform_device *pdev)
mac = of_get_mac_address(pdev->dev.of_node);
- if (mac && is_valid_ether_addr(mac))
+ if (mac)
memcpy(netdev->dev_addr, mac, ETH_ALEN);
else
eth_hw_addr_random(netdev);
--
1.8.4.rc3
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH 1/2] octeon_mgmt: remove double validation of mac address
2013-10-29 21:27 [PATCH 1/2] octeon_mgmt: remove double validation of mac address Laurent Navet
@ 2013-10-29 21:45 ` David Daney
0 siblings, 0 replies; 2+ messages in thread
From: David Daney @ 2013-10-29 21:45 UTC (permalink / raw)
To: Laurent Navet, Luka Perkov
Cc: davem, jiri, david.daney, wfp5p, gregkh, netdev, linux-kernel
On 10/29/2013 02:27 PM, 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>
Luka already sent this exact patch, and I acked his.
No need to do it twice.
David Daney
> ---
> drivers/net/ethernet/octeon/octeon_mgmt.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/octeon/octeon_mgmt.c b/drivers/net/ethernet/octeon/octeon_mgmt.c
> index 622aa75..1b326cbc 100644
> --- a/drivers/net/ethernet/octeon/octeon_mgmt.c
> +++ b/drivers/net/ethernet/octeon/octeon_mgmt.c
> @@ -1545,7 +1545,7 @@ static int octeon_mgmt_probe(struct platform_device *pdev)
>
> mac = of_get_mac_address(pdev->dev.of_node);
>
> - if (mac && is_valid_ether_addr(mac))
> + if (mac)
> memcpy(netdev->dev_addr, mac, ETH_ALEN);
> else
> eth_hw_addr_random(netdev);
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-10-29 21:45 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:27 [PATCH 1/2] octeon_mgmt: remove double validation of mac address Laurent Navet
2013-10-29 21:45 ` David Daney
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.