From: David Daney <ddaney.cavm@gmail.com>
To: Luka Perkov <luka@openwrt.org>, David Miller <davem@davemloft.net>
Cc: netdev@vger.kernel.org, david.daney@cavium.com
Subject: Re: [PATCH] netdev: octeon_mgmt: drop redundant mac address check
Date: Tue, 29 Oct 2013 09:33:56 -0700 [thread overview]
Message-ID: <526FE374.2050304@gmail.com> (raw)
In-Reply-To: <1383010061-25461-1-git-send-email-luka@openwrt.org>
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@openwrt.org>
This looks sane, but I haven't tested it...
Acked-by: David Daney <david.daney@cavium.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);
>
prev parent reply other threads:[~2013-10-29 16:33 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-29 1:27 [PATCH] netdev: octeon_mgmt: drop redundant mac address check Luka Perkov
2013-10-29 16:33 ` David Daney [this message]
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=526FE374.2050304@gmail.com \
--to=ddaney.cavm@gmail.com \
--cc=davem@davemloft.net \
--cc=david.daney@cavium.com \
--cc=luka@openwrt.org \
--cc=netdev@vger.kernel.org \
/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).