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

Fabio Estevam festevam at gmail.com
Thu Oct 13 17:17:03 CEST 2011


On Wed, Oct 12, 2011 at 7:20 AM, Stefano Babic <sbabic at denx.de> wrote:
136/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.

After applying the patch I read:

/* "time" is measured in 1 / CONFIG_SYS_HZ seconds,
 * "tick" is internal timer period
 */

Could you please let me know what is the error?

>>
>> -/*
>> - * 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 ?

Ok.

>
>>  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.

Ok, I cam remove it.

Regards,

Fabio Estevam


More information about the U-Boot mailing list