All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefano Babic <sbabic@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] imx: fix coding style
Date: Wed, 12 Oct 2011 12:20:15 +0200	[thread overview]
Message-ID: <4E9569DF.7000308@denx.de> (raw)
In-Reply-To: <1318275292-2713-1-git-send-email-fabio.estevam@freescale.com>

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

  reply	other threads:[~2011-10-12 10:20 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-10 19:34 [U-Boot] [PATCH] imx: fix coding style Fabio Estevam
2011-10-12 10:20 ` Stefano Babic [this message]
2011-10-13 15:17   ` Fabio Estevam
2011-10-13 15:23     ` Stefan Roese

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4E9569DF.7000308@denx.de \
    --to=sbabic@denx.de \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.