From: Laurent Navet <laurent.navet@gmail.com>
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 <laurent.navet@gmail.com>
Subject: [PATCH 1/2] octeon_mgmt: remove double validation of mac address
Date: Tue, 29 Oct 2013 22:27:33 +0100 [thread overview]
Message-ID: <1383082053-12405-1-git-send-email-laurent.navet@gmail.com> (raw)
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
next reply other threads:[~2013-10-29 21:27 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-29 21:27 Laurent Navet [this message]
2013-10-29 21:45 ` [PATCH 1/2] octeon_mgmt: remove double validation of mac address David Daney
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1383082053-12405-1-git-send-email-laurent.navet@gmail.com \
--to=laurent.navet@gmail.com \
--cc=davem@davemloft.net \
--cc=david.daney@cavium.com \
--cc=gregkh@linuxfoundation.org \
--cc=jiri@resnulli.us \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=wfp5p@virginia.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).