Re: [PATCH 1/2] mv643xx_eth: move mac_addr inside of mv643xx_eth_platform_data



On Wed, Feb 28, 2007 at 03:11:03PM -0800, Stephen Hemminger wrote:
On Wed, 28 Feb 2007 15:40:31 -0700
"Dale Farnsworth" <dale@xxxxxxxxxxxxxx> 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@xxxxxxxxxxxxxx>

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

Thanks. I follow up with a modified patch in a day or two.

-Dale
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



Relevant Pages

  • Re: Enlighten me - Mac vs. PC processing speeds
    ... it's just slower on a Mac. ... Dim count As Integer, pointer As Integer, num As Integer ... ' advance the source data cell pointer ...
    (microsoft.public.mac.office.excel)
  • Re: Enlighten me - Mac vs. PC processing speeds
    ... it's just slower on a Mac. ... Dim count As Integer, pointer As Integer, num As Integer ... ' find the start of the next data record ...
    (microsoft.public.mac.office.excel)
  • Re: How does free() knows?
    ... > more memory can be addressed than is available, ... > two bytes of your pointer to tell you the block size. ... max out the 32-bit address space on a 68000 Mac I, ... Apple was smart enough to ...
    (comp.lang.c)
  • Re: How does free() knows?
    ... > more memory can be addressed than is available, ... > two bytes of your pointer to tell you the block size. ... max out the 32-bit address space on a 68000 Mac I, ... Apple was smart enough to ...
    (comp.lang.cpp)
  • Re: Orphaned Links -- HELP!
    ... pointer to the article on the MS site at ... I think this is essentially the source code for the add-in. ... I don't know if it'll work with your Mac. ... I copied a range of cells into a a new worksheet in a workbook. ...
    (microsoft.public.excel)