From: Ben Warren <biggerbadderben@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH NET 2/2] Net: clarify board/cpu_eth_init calls
Date: Wed, 01 Sep 2010 12:13:37 -0700 [thread overview]
Message-ID: <4C7EA5E1.1040105@gmail.com> (raw)
In-Reply-To: <201009011304.53715.vapier@gentoo.org>
Hi Mike,
On 9/1/2010 10:04 AM, Mike Frysinger wrote:
> On Wednesday, September 01, 2010 02:05:04 Ben Warren wrote:
>> + if (board_eth_init != __def_eth_init) {
>> + } else if (cpu_eth_init != __def_eth_init) {
> i'm not sure these changes are useful. the resolution of the symbols happens
> at link time, so it isnt like gcc will be able to optimize away the default.
>
> if anything, it'd make more sense to declare the functions as external/weak,
> and then check that the pointer is not NULL. that'd save on the overhead of
> having uncalled stub functions that merely return 0 in the final linked image.
> -mike
This did work as I hoped on my PPC eval board, but maybe not globally.
I remember that initially, with the functions defined as weak but with
no body, check for NULL didn't work. I've never tried declaring them as
external, though.
thanks,
Ben
next prev parent reply other threads:[~2010-09-01 19:13 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-01 6:05 [U-Boot] [PATCH NET 1/2] Net: Remove redundant CONFIG_NET_MULTI directives Ben Warren
2010-09-01 6:05 ` [U-Boot] [PATCH NET 2/2] Net: clarify board/cpu_eth_init calls Ben Warren
2010-09-01 17:04 ` Mike Frysinger
2010-09-01 19:13 ` Ben Warren [this message]
2010-11-14 23:01 ` Wolfgang Denk
2010-09-13 4:07 ` [U-Boot] [PATCH NET 1/2] Net: Remove redundant CONFIG_NET_MULTI directives Ben Warren
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=4C7EA5E1.1040105@gmail.com \
--to=biggerbadderben@gmail.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.