[PATCH] Check mac-address first in fsl_soc.c
Kumar Gala
galak at kernel.crashing.org
Wed Feb 14 04:37:04 EST 2007
On Feb 13, 2007, at 11:25 AM, Timur Tabi wrote:
> Sergei Shtylyov wrote:
>
>> I'm mainly concerned about 85xx. I guess the needed change
>> should be very alike...
>
> I've submitted U-Boot patches for 83xx, 85xx, 86xx, and 5xxx to the
> maintainers. You'll have to ask them when the patches will be
> applied.
>
>>> I wanted to keep my patch simple.
>> That's clearly an over-simplification to repeat the same code
>> thrice.
>
> Actually, the 2nd and third instances are conditionally compiled,
> so in most cases only one instance of the code will actually be
> compiled. gfar_of_init() should probably also be conditionally
> compiled, so if I make it a separate function, I'd have to prefix
> it with something like this:
>
> #if defined(CONFIG_GIANFAR) || defined(CONFIG_CPM2) || defined
> (CONFIG_8xx)
>
> and then I would need to pass a bunch of parameters. I don't
> really think that's an improvement.
>
> Paul, if there are no serious objections, please apply this patch.
Paul asked me to look at this.
I'd ask one style change.
if (!mac_addr || (memcmp(mac_addr, "\0\0\0\0\0", 6) == 0)) {
How about something like comparing against a local null array
instead. Something like:
u8 null_mac_addr[6] = { 0 };
if (!mac_addr || (memcmp(mac_addr, null_mac_addr, 6) == 0)) {
- k
More information about the Linuxppc-dev
mailing list