[U-Boot-Users] [PATCH 1/1] Re-Submit: Add support for ATMEL AT91SAM9G20EK board.

Haavard Skinnemoen haavard.skinnemoen at atmel.com
Wed Jul 30 09:44:09 CEST 2008


"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

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.

Haavard




More information about the U-Boot mailing list