[U-Boot-Users] [RFC][PATCH 1/1] Add board_eth_init() function
Vlad Lungu
vlad at comsys.ro
Sat Mar 22 16:55:23 CET 2008
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
More information about the U-Boot
mailing list