[U-Boot] [PATCH v3 1/2] MX25: tx25: Avoid the usage of extern in C file

Marek Vasut marek.vasut at gmail.com
Mon Sep 5 17:40:57 CEST 2011


On Monday, September 05, 2011 05:38:26 PM Fabio Estevam wrote:
> On Mon, Sep 5, 2011 at 12:05 PM, Marek Vasut <marek.vasut at gmail.com> wrote:
> > On Monday, September 05, 2011 03:15:44 PM Fabio Estevam wrote:
> >> On Mon, Sep 5, 2011 at 10:05 AM, Marek Vasut <marek.vasut at gmail.com>
> >> wrote: ...
> >> 
> >> >> extern void mx25_fec_init_pins(void);
> >> >> extern void imx_get_mac_from_fuse(unsigned char *mac);
> >> >> extern void mx25_uart1_init_pins(void);
> >> > 
> >> > Ok, this might be a stupid one, but ...
> >> > 
> >> > why use externs in header files ?
> >> 
> >> This will make checkpatch happy :-)
> > 
> > I'm not quite sure I understand ... ?
> 
> ./scripts/checkpatch.pl -F u-boot/board/karo/tx25/tx25.c
> ....
> WARNING: externs should be avoided in .c files
> #144: FILE: home/fabio/denx/u-boot/board/karo/tx25/tx25.c:144:
> +	extern void mx25_uart1_init_pins(void);

But you're using extern in _header_ (.h) file ... so ... why ?


More information about the U-Boot mailing list