From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mike Frysinger Date: Wed, 1 Sep 2010 13:04:52 -0400 Subject: [U-Boot] [PATCH NET 2/2] Net: clarify board/cpu_eth_init calls In-Reply-To: <1283321104-953-2-git-send-email-biggerbadderben@gmail.com> References: <1283321104-953-1-git-send-email-biggerbadderben@gmail.com> <1283321104-953-2-git-send-email-biggerbadderben@gmail.com> Message-ID: <201009011304.53715.vapier@gentoo.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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