[U-Boot-Users] [PATCH 1/1] Re-Submit: Add support for ATMEL AT91SAM9G20EK board.
Ben Warren
biggerbadderben at gmail.com
Wed Jul 30 16:20:36 CEST 2008
On Wed, Jul 30, 2008 at 12:44 AM, Haavard Skinnemoen
<haavard.skinnemoen at atmel.com> wrote:
> "Ben Warren" <biggerbadderben at gmail.com> wrote:
>> >> >> extern int macb_eth_initialize(int id, void *regs, unsigned int phy_addr);
>> >
>> > We're getting more and more of these. Does anyone know an appropriate
>> > header to put it in?
>> >
>> At one point I had a netdev.h file, but removed it because it only
>> contained this type of definition. Maybe it's time to resurrect.
>
> Yeah, perhaps that would be nice. I get the feeling this isn't the only
> instance of this kind of thing:
>
> ~/work/u-boot/upstream$ find -name '*.c' | xargs grep '^extern' | wc -l
> 1042
>
Yikes. I don't mean to be an ass, but did you know that modern grep
has a '-R' (recurse) switch?
e.g. $ grep -R --include *.c '^extern' * | wc -l
> All of those instances are potentially dangerous. The
> macb_eth_initialize() thing has certainly blown up in my face before...
>
> Btw, shouldn't board_eth_init() and cpu_eth_init() be declared in some
> header file as well? It might catch the wrong function definitions
> you've pointed out quite a few times already.
>
Yeah, the fact that I've corrected several wrong return types in one
day makes me think it's time.
thanks,
Ben
More information about the U-Boot
mailing list