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:12:19 -0600 [thread overview]
Message-ID: <4B0ED313.9050607@windriver.com> (raw)
In-Reply-To: <20091126083503.GA13581@mail.gnudd.com>
Alessandro Rubini 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.
>
>
> lib_arm/board.c | 62 ++++++++++++++++++++++++++----------------------------
> 1 files changed, 30 insertions(+), 32 deletions(-)
>
Thanks.
I cleaned the comment up and pushed this to a testing branch
arm/testing-arm_init.
I like the idea of cleaning up the arm init functions.
The board startup is more readable with the weak functions.
I put this in a testing branch because it is a big change that
needs general runtime testing and comments from everyone. I am also
interested in adding other init changes.
When we reach a concenseus, we can move this into next.
Tom
prev parent reply other threads:[~2009-11-26 19:12 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
2009-11-27 10:37 ` Joakim Tjernlund
2009-11-26 19:12 ` Tom [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=4B0ED313.9050607@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.