All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tom <Tom.Rix@windriver.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH V2] arm/board.c: avoid ifdef using weak	default functions
Date: Thu, 26 Nov 2009 13:18:22 -0600	[thread overview]
Message-ID: <4B0ED47E.7070608@windriver.com> (raw)
In-Reply-To: <OFEFF18889.F672B372-ONC125767A.0031E15D-C125767A.0032711D@transmode.se>

Joakim Tjernlund wrote:
>> From: Alessandro Rubini <rubini@unipv.it>
>>
>> While it's a matter of personal taste, I prefer to avoid ifdef when
>> possible.  For example, I don't like to add BOARD_LATE_INIT in the
>> config file just to add a board_late_init() function.
>> Also, I think the file is more readable without the ifdef stuff.
>> This uses two trivial weak functions to provide defaults for all
>> functions that were ifdeffed.
>>
>> This patch was initially rejected in favor of a initcall mechanism
>> but that approach is not a work in progress any ore.
>> ---
>>
>> One complaint I got about this is the runtime overhead. Actually,
>> normal_nop is two instructions (plus the call to it) and void_nop
>> is one instruction (plus the call), similar to the overhead in
>> led management for platforms with no leds.
> 
> I think (I have proposed this before) that you should get rid of
> the init_fnc_t *init_sequence[] array all together. It only
> adds relocation overhead(lots of it). Just make the array a function
> that calls the init functions directly.
>

Please resend the RFC patch.
This would also go the arm/testing-arm_init branch.

I am interested in flexibility and maintainability.
Not so much on size.

Tom
>     Jocke
> 
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot

  reply	other threads:[~2009-11-26 19:18 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-26  8:35 [U-Boot] [PATCH V2] arm/board.c: avoid ifdef using weak default functions Alessandro Rubini
2009-11-26  9:10 ` Joakim Tjernlund
2009-11-26 19:18   ` Tom [this message]
2009-11-27 10:37     ` Joakim Tjernlund
2009-11-26 19:12 ` Tom

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=4B0ED47E.7070608@windriver.com \
    --to=tom.rix@windriver.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 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.