[U-Boot] [PATCH] imx: fix coding style

Stefano Babic sbabic at denx.de
Wed Oct 12 12:20:15 CEST 2011


On 10/10/2011 09:34 PM, Fabio Estevam wrote:
> Fix checkpatch warning and errors in several i.MX related files.
> 

Hi Fabio,

> diff --git a/arch/arm/cpu/arm1136/mx31/timer.c b/arch/arm/cpu/arm1136/mx31/timer.c
> index 717a2b7..d3a461e 100644
> --- a/arch/arm/cpu/arm1136/mx31/timer.c
> +++ b/arch/arm/cpu/arm1136/mx31/timer.c
> @@ -43,7 +43,10 @@
>  
>  DECLARE_GLOBAL_DATA_PTR;
>  
> -/* "time" is measured in 1 / CONFIG_SYS_HZ seconds, "tick" is internal timer period */
> +/* "time" is measured in 1 / CONFIG_SYS_HZ seconds,
> + * "tick" is internal timer period
> + */

This style for multiline comments is wrong. Please fix it.

>  
> -/*
> - * Initializes on-chip ethernet controllers.
> - * to override, implement board_eth_init()
> - */
> -#if defined(CONFIG_FEC_MXC)
> -extern int fecmxc_initialize(bd_t *bis);
> -#endif

Right - the prototype should be in an header file. However, this is not
a codestyle issue, it is something more. Can you add in the commit
message that you fix this topic too ?


>  int cpu_eth_init(bd_t *bis)
>  {
>  	int rc = -ENODEV;
> diff --git a/arch/arm/include/asm/arch-mx5/sys_proto.h b/arch/arm/include/asm/arch-mx5/sys_proto.h
> index ce63675..789558e 100644
> --- a/arch/arm/include/asm/arch-mx5/sys_proto.h
> +++ b/arch/arm/include/asm/arch-mx5/sys_proto.h
> @@ -28,4 +28,14 @@ u32 get_cpu_rev(void);
>  #define is_soc_rev(rev)	((get_cpu_rev() & 0xFF) - rev)
>  void sdelay(unsigned long);
>  void set_chipselect_size(int const);
> +
> +/*
> + * Initializes on-chip ethernet controllers.
> + * to override, implement board_eth_init()
> + */
> +#if defined(CONFIG_FEC_MXC)
> +int fecmxc_initialize(bd_t *bis);

Do we really need the #if in the header file ? I think we can get rid of it.

Best regards,
Stefano Babic

-- 
=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80  Email: office at denx.de
=====================================================================


More information about the U-Boot mailing list