All of lore.kernel.org
 help / color / mirror / Atom feed
From: York Sun <yorksun@freescale.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 2/3] image: move all function comments to header file
Date: Fri, 15 Aug 2014 15:25:03 -0700	[thread overview]
Message-ID: <53EE88BF.4050308@freescale.com> (raw)
In-Reply-To: <53EE8661.6080407@wwwdotorg.org>

On 08/15/2014 03:14 PM, Stephen Warren wrote:
> On 08/15/2014 04:11 PM, Bryan Wu wrote:
>> On Fri, Aug 15, 2014 at 3:10 PM, York Sun <yorksun@freescale.com> wrote:
>>> On 08/15/2014 03:07 PM, Bryan Wu wrote:
>>>> On Fri, Aug 15, 2014 at 3:01 PM, Jeroen Hofstee <dasuboot@myspectrum.nl> wrote:
>>>>> Hello Bryan,
>>>>>
>>>>>
>>>>> On 15-08-14 22:55, Bryan Wu wrote:
>>>>>>
>>>>>> Several functions comments are C file with function definition, they
>>>>>> should be moved to header file with function declaration.
>>>>>>
>>>>>> Also update genimg_get_kernel_addr() comments for CONFIG_FIT case.
>>>>>>
>>>>>> Signed-off-by: Bryan Wu <pengw@nvidia.com>
>>>>>>
>>>>>
>>>>> Why _should_ this be done. In general I would not do it
>>>>> to keep comment and implementation close to each other.
>>>>> (In the hope they actually match). Doxygen and likely the
>>>>> kernel doc thing can pick this up. The only reason I can
>>>>> think of this being useful is for proprietary code with a public
>>>>> api, but this is not applicable for u-boot.
>>>>>
>>>>
>>>> I was asked to do that by Simon and right now in image.c and image.h
>>>> it's quite mix.
>>>> Some of them are in C code with implementation others are in header
>>>> file with declaration.
>>>>
>>>> I was confused by this in u-boot, although in kernel we put comments
>>>> in C code with implementation.
>>>>
>>>
>>> I prefer to see comments near the implementations.
>>>
>>
>> Then we need another patch to move those comments from header file to C file.
> 
> Well, I wouldn't do anything just yet. Simon and York need to sort out 
> an agreement first, so we don't just keep writing patches that move 
> stuff back and forth.
> 
I don't have strong opinion for this case. I would prefer to have the comments
near the implementation. I understand current code may have mixed style here and
there. Unless it is a clean up effort, I wouldn't add such patch to a set with
function change or bug fix.

York

  reply	other threads:[~2014-08-15 22:25 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-15 20:55 [U-Boot] [PATCH v2 1/3] image: fix bootm failure for FIT image Bryan Wu
2014-08-15 20:55 ` [U-Boot] [PATCH 2/3] image: move all function comments to header file Bryan Wu
2014-08-15 22:01   ` Jeroen Hofstee
2014-08-15 22:07     ` Bryan Wu
2014-08-15 22:10       ` York Sun
2014-08-15 22:11         ` Bryan Wu
2014-08-15 22:14           ` Stephen Warren
2014-08-15 22:25             ` York Sun [this message]
2014-08-15 22:56               ` Bryan Wu
2014-08-18 18:18                 ` Simon Glass
2014-08-23 12:42   ` [U-Boot] [U-Boot, " Tom Rini
2014-08-23 17:48     ` Tom Rini
2014-09-19 23:17       ` Simon Glass
2014-09-20  5:34         ` Masahiro YAMADA
2014-09-20  7:39           ` Albert ARIBAUD
2014-09-22  6:41           ` Simon Glass
2014-08-15 20:55 ` [U-Boot] [PATCH 3/3] bootm: make sure pass NULL when argc < 1 Bryan Wu
2014-08-22 20:36 ` [U-Boot] [PATCH v2 1/3] image: fix bootm failure for FIT image Simon Glass

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=53EE88BF.4050308@freescale.com \
    --to=yorksun@freescale.com \
    --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.