From: Stephen Hemminger <shemminger@linux-foundation.org>
To: "Dale Farnsworth" <dale@farnsworth.org>
Cc: Jeff Garzik <jgarzik@pobox.com>,
linux-kernel@vger.kernel.org, netdev@vger.kernel.org,
linux-mips@linux-mips.org, Ralf Baechle <ralf@linux-mips.org>
Subject: Re: [PATCH 1/2] mv643xx_eth: move mac_addr inside of mv643xx_eth_platform_data
Date: Wed, 28 Feb 2007 15:11:03 -0800 [thread overview]
Message-ID: <20070228151103.0c5a320d@freekitty> (raw)
In-Reply-To: <20070228224031.GA8233@xyzzy.farnsworth.org>
On Wed, 28 Feb 2007 15:40:31 -0700
"Dale Farnsworth" <dale@farnsworth.org> wrote:
> The information contained within platform_data should be self-contained.
> Replace the pointer to a MAC address with the actual MAC address in
> struct mv643xx_eth_platform_data.
>
> Signed-off-by: Dale Farnsworth <dale@farnsworth.org>
>
> Index: b/drivers/net/mv643xx_eth.c
> ===================================================================
> --- a/drivers/net/mv643xx_eth.c
> +++ b/drivers/net/mv643xx_eth.c
> @@ -1380,7 +1380,9 @@ static int mv643xx_eth_probe(struct plat
>
> pd = pdev->dev.platform_data;
> if (pd) {
> - if (pd->mac_addr)
> + static u8 zero_mac_addr[6] = { 0 };
> +
> + if (memcmp(pd->mac_addr, zero_mac_addr, 6) != 0)
> memcpy(dev->dev_addr, pd->mac_addr, 6);
is_zero_ether_addr() is faster/cleaner for this
--
Stephen Hemminger <shemminger@linux-foundation.org>
next prev parent reply other threads:[~2007-02-28 23:17 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-02-28 22:40 [PATCH 1/2] mv643xx_eth: move mac_addr inside of mv643xx_eth_platform_data Dale Farnsworth
2007-02-28 22:47 ` [PATCH 2/2] mv643xx_eth: Place explicit port number in mv643xx_eth_platform_data Dale Farnsworth
2007-02-28 23:11 ` Stephen Hemminger [this message]
2007-02-28 23:40 ` [PATCH 1/2] mv643xx_eth: move mac_addr inside of mv643xx_eth_platform_data Dale Farnsworth
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=20070228151103.0c5a320d@freekitty \
--to=shemminger@linux-foundation.org \
--cc=dale@farnsworth.org \
--cc=jgarzik@pobox.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@linux-mips.org \
--cc=netdev@vger.kernel.org \
--cc=ralf@linux-mips.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 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.