Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752772Ab3J2V1M (ORCPT ); Tue, 29 Oct 2013 17:27:12 -0400 Received: from mail-wg0-f47.google.com ([74.125.82.47]:61783 "EHLO mail-wg0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751380Ab3J2V1K (ORCPT ); Tue, 29 Oct 2013 17:27:10 -0400 From: Laurent Navet To: davem@davemloft.net Cc: jiri@resnulli.us, david.daney@cavium.com, wfp5p@virginia.edu, gregkh@linuxfoundation.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Laurent Navet Subject: [PATCH 1/2] octeon_mgmt: remove double validation of mac address Date: Tue, 29 Oct 2013 22:27:33 +0100 Message-Id: <1383082053-12405-1-git-send-email-laurent.navet@gmail.com> X-Mailer: git-send-email 1.8.4.rc3 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 997 Lines: 29 Mac address validity is already checked in of_get_mac_address(). No need to do it twice. Signed-off-by: Laurent Navet --- 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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/