public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Jerry Van Baren <gerald.vanbaren@ge.com>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] [PATCH] Add mechanisms for CPU and board-specific Ethernet initialization
Date: Wed, 11 Jun 2008 07:30:43 -0400	[thread overview]
Message-ID: <484FB763.2060700@ge.com> (raw)
In-Reply-To: <20080611025031.3f203baa@siona.local>

Haavard Skinnemoen wrote:
> On Tue, 10 Jun 2008 01:29:27 -0700
> Ben Warren <biggerbadderben@gmail.com> wrote:
> 
>> This patch is the first step in cleaning up net/eth.c, by moving Ethernet
>> initialization to CPU or board-specific code.  Initial implementation is
>> only on the Freescale TSEC controller, but others will be added soon.
>>
>> Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
> 
> Sweet!
> 
>> ---
>>
>> When we discussed this a few months ago, I was planning on defining the 
>> cpu_eth_init() and board_eth_init() functions as weak with no aliases, but in
>> my testing this did not result in them being NULL, hence the default function.
> 
> Works just as well, doesn't it?
> 
>> diff --git a/net/eth.c b/net/eth.c
>> index c4f24c6..e75dc43 100644
>> --- a/net/eth.c
>> +++ b/net/eth.c
>> @@ -28,6 +28,12 @@
>>  
>>  #if defined(CONFIG_CMD_NET) && defined(CONFIG_NET_MULTI)
>>  
>> +/* CPU and board-specific Ethernet initializations.  Aliased function
>> + * signals caller to move on */
>> +static int __def_eth_init(bd_t *bis) {return -1;}
> 
> Just a cosmetic thing: I really think this should look like a normal
> function, i.e. not cuddling everything up on one line. I've seen such
> things being mistaken for macros before.
> 
> Haavard

/*
  * ...and the comment style should be like this.  Coding standards,
  * y'know.
  */

Best regards,
gvb

      reply	other threads:[~2008-06-11 11:30 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-10  8:29 [U-Boot-Users] [PATCH] Add mechanisms for CPU and board-specific Ethernet initialization Ben Warren
2008-06-10  9:12 ` Stefan Roese
2008-06-10 13:53   ` Ben Warren
2008-06-10 15:16     ` Shinya Kuribayashi
2008-06-10 15:25       ` Stefan Roese
2008-06-10 15:49         ` Shinya Kuribayashi
2008-06-10 16:16           ` Ben Warren
2008-06-24 22:32             ` Jean-Christophe PLAGNIOL-VILLARD
2008-06-24 23:05               ` Ben Warren
2008-06-25  9:30               ` Haavard Skinnemoen
2008-06-25  9:34                 ` Stefan Roese
2008-06-11  0:50 ` Haavard Skinnemoen
2008-06-11 11:30   ` Jerry Van Baren [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=484FB763.2060700@ge.com \
    --to=gerald.vanbaren@ge.com \
    --cc=u-boot@lists.denx.de \
    /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