All of lore.kernel.org
 help / color / mirror / Atom feed
From: Steven Cole <elenstev@mesatop.com>
To: Arnaldo Carvalho de Melo <acme@conectiva.com.br>
Cc: Linus Torvalds <torvalds@transmeta.com>,
	Russell King <rmk@arm.linux.org.uk>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] 2.5 Documentation/CodingStyle ANSI C function declarations.
Date: 30 May 2003 23:08:05 -0600	[thread overview]
Message-ID: <1054357685.2899.109.camel@spc> (raw)
In-Reply-To: <20030531031231.GE5783@conectiva.com.br>

On Fri, 2003-05-30 at 21:12, Arnaldo Carvalho de Melo wrote:
[snippage]
> > > and the ANSI-fication changes this to
> > > 
> > > 	int foo(
> > > 		long bar,	/* number of frobnicators */
> > > 		long baz	/* self-larting on or off */
> > > 	)
> > > 	{
> > > 		...
> > > 
> > > which while not according to the coding-standard is at least a reasonable 
> > > compromize between having proper C function definitions and keeping the 
> > > code _looking_ more like the original.
> > > 
> > > 		Linus
> > > 
> > > 
> > OK, here is a modified version of the patch to CodingStyle which
> > explicitly notes the reason for this secondary style.
> 
> In the cases where there are documentation for the paramenters isn't it better
> to just bite the bullet and use the kerneldoc style?
> 
> Documentation/kernel-doc-nano-HOWTO.txt
> 
> - Arnaldo
> 

Of course it would be better if code were documented in a consistent and
canonical style.  The Documentation/kernel-doc-nano-HOWTO.txt method
should probably have a one line mention in Chapter 5: Commenting, like
this:

--- linux/Documentation/CodingStyle.orig	2003-05-30 18:41:05.000000000 -0600
+++ linux/Documentation/CodingStyle	2003-05-30 22:47:55.000000000 -0600
@@ -164,7 +164,7 @@
 small comments to note or warn about something particularly clever (or
 ugly), but try to avoid excess.  Instead, put the comments at the head
 of the function, telling people what it does, and possibly WHY it does
-it. 
+it.  See Documentation/kernel-doc-nano-HOWTO.txt for details.
 
 
 		Chapter 6: You've made a mess of it


My purpose with the original patch was to canonify the unusual style
discussed above. 

The note about the old-style K&R prototypes being deprecated is probably
redundant and may be unnecessary, unless someone is copying and pasting
from some old System V code, and we all know that makes about as much
sense as Boeing secretly looking over the blueprints for the Douglas
DC-3.

Steven


  reply	other threads:[~2003-05-31  4:54 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-05-30 19:57 [PATCH] 2.5 Documentation/CodingStyle ANSI C function declarations Steven Cole
2003-05-30 20:14 ` Jörn Engel
2003-05-30 20:25   ` Steven Cole
2003-05-30 20:40     ` Jörn Engel
2003-05-30 20:48       ` Linus Torvalds
2003-05-30 21:20         ` Jörn Engel
2003-05-30 21:38           ` Linus Torvalds
2003-05-30 22:26             ` Jörn Engel
2003-05-30 22:39               ` Davide Libenzi
2003-05-30 22:23                 ` Alan Cox
2003-05-30 23:29                   ` Davide Libenzi
2003-05-30 22:49                 ` Linus Torvalds
2003-05-30 22:55                   ` viro
2003-05-30 22:58                     ` Jörn Engel
2003-05-30 23:08             ` Riley Williams
2003-05-30 21:06       ` Jörn Engel
2003-05-30 21:09 ` Russell King
2003-05-30 21:17   ` Linus Torvalds
2003-05-31  0:55     ` Steven Cole
2003-05-31  3:12       ` Arnaldo Carvalho de Melo
2003-05-31  5:08         ` Steven Cole [this message]
2003-05-31  5:24           ` Michael Frank
2003-05-31  6:27       ` Bernd Eckenfels
2003-05-31  7:17         ` Bernd Eckenfels
2003-06-02 10:53     ` Juan Quintela
2003-06-02 15:59       ` Linus Torvalds
2003-06-02 16:39         ` Steven Cole
2003-06-02 17:34           ` Arnaldo Carvalho de Melo
2003-06-02 17:55             ` Steven Cole
2003-06-02 17:56           ` Jörn Engel
2003-06-02 16:40         ` Arnaldo Carvalho de Melo

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=1054357685.2899.109.camel@spc \
    --to=elenstev@mesatop.com \
    --cc=acme@conectiva.com.br \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rmk@arm.linux.org.uk \
    --cc=torvalds@transmeta.com \
    /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.