From mboxrd@z Thu Jan 1 00:00:00 1970 From: Vlad Lungu Date: Sat, 22 Mar 2008 17:55:23 +0200 Subject: [U-Boot-Users] [RFC][PATCH 1/1] Add board_eth_init() function In-Reply-To: <47E49320.1080504@ruby.dti.ne.jp> References: <47E472FD.7010907@gmail.com> <47E49320.1080504@ruby.dti.ne.jp> Message-ID: <47E52BEB.90600@comsys.ro> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Shinya Kuribayashi wrote: >> +int board_eth_init(bd_t *bis) __attribute((weak, >> alias("__board_eth_init"))); >> + >> #ifdef CFG_GT_6426x >> extern int gt6426x_eth_initialize(bd_t *bis); >> #endif >> > > [This comment is not for Ben, but for everyone.] > > Do we need such alias to empty function? Only __attribute((weak)) is > enough for me. If we have some default behavior which isn't empty, I > can see the weak & alias. Thought? > > Weak functions with no alias are NULL. You can test the value of board_eth_init before calling or you can provide an alias so there are no surprises. If you don't do one or the other... exceptions happen. Personally, I prefer to have an alias. Vlad