[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <526FE374.2050304@gmail.com>
Date: Tue, 29 Oct 2013 09:33:56 -0700
From: David Daney <ddaney.cavm@...il.com>
To: Luka Perkov <luka@...nwrt.org>, David Miller <davem@...emloft.net>
CC: netdev@...r.kernel.org, david.daney@...ium.com
Subject: Re: [PATCH] netdev: octeon_mgmt: drop redundant mac address check
On 10/28/2013 06:27 PM, Luka Perkov wrote:
> Checking if MAC address is valid using is_valid_ether_addr() is already done in
> of_get_mac_address().
>
> Signed-off-by: Luka Perkov <luka@...nwrt.org>
This looks sane, but I haven't tested it...
Acked-by: David Daney <david.daney@...ium.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);
>
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists