All of lore.kernel.org
 help / color / mirror / Atom feed
From: olof@lixom.net (Olof Johansson)
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: linuxppc-dev@ozlabs.org, paulus@samba.org,
	Timur Tabi <timur@freescale.com>
Subject: Re: [PATCH] powerpc: add of_get_mac_address() and update fsl_soc.c to use it
Date: Tue, 13 Feb 2007 18:21:33 -0600	[thread overview]
Message-ID: <20070214002133.GA4851@lixom.net> (raw)
In-Reply-To: <1171411219.20192.118.camel@localhost.localdomain>

On Wed, Feb 14, 2007 at 11:00:19AM +1100, Benjamin Herrenschmidt wrote:
> 
> > +	return get_property(np, "address", NULL);
> 
> Since there is so much room for confusion with "address", please at
> least do some basic sanity checking, like check that it's size is 6
> bytes and maybe that the multicast bit isn't set.

No need to reinvent the wheel, is_valid_ether_addr() is easy to use.

Might still want to check the property length though.


-Olof

  reply	other threads:[~2007-02-14  0:12 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-13 23:10 [PATCH] powerpc: add of_get_mac_address() and update fsl_soc.c to use it Timur Tabi
2007-02-14  0:00 ` Benjamin Herrenschmidt
2007-02-14  0:21   ` Olof Johansson [this message]
2007-02-14  5:17   ` Timur Tabi
2007-02-14  5:28     ` Benjamin Herrenschmidt
2007-02-14  5:30       ` Timur Tabi
2007-02-14 14:09     ` Sergei Shtylyov
2007-02-15 20:47   ` Segher Boessenkool
2007-02-15 20:55     ` Timur Tabi
2007-02-16 13:25       ` Segher Boessenkool
2007-02-16 14:38         ` Timur Tabi

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=20070214002133.GA4851@lixom.net \
    --to=olof@lixom.net \
    --cc=benh@kernel.crashing.org \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=paulus@samba.org \
    --cc=timur@freescale.com \
    /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.