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


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
U-Boot-Users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/u-boot-users

Reply via email to