[U-Boot] [PATCH NET 2/2] Net: clarify board/cpu_eth_init calls

Mike Frysinger vapier at gentoo.org
Wed Sep 1 19:04:52 CEST 2010


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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20100901/5982e609/attachment.pgp 


More information about the U-Boot mailing list