All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@conectiva.com.br>
To: Steven Cole <elenstev@mesatop.com>
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: Sat, 31 May 2003 00:12:31 -0300	[thread overview]
Message-ID: <20030531031231.GE5783@conectiva.com.br> (raw)
In-Reply-To: <1054342517.2901.78.camel@spc>

Em Fri, May 30, 2003 at 06:55:18PM -0600, Steven Cole escreveu:
> On Fri, 2003-05-30 at 15:17, Linus Torvalds wrote:
> > On Fri, 30 May 2003, Russell King wrote:
> > >
> > > On Fri, May 30, 2003 at 01:57:13PM -0600, Steven Cole wrote:
> > > > +int foo(
> > > > +	long bar,
> > > > +	long day,
> > > > +	struct magic *xyzzy
> > > > +)
> > > 
> > > Is this really part of the kernel coding style?
> > 
> > No, but it's better than what it used to be.
> > 
> > Also, while I don't think we should try to maintain 1:1 behaviour with 
> > the _worst_ offenses of zlib, I do think we should maintain comments etc, 
> > and a lot of the zlib function declarations used to look like
> > 
> > 	int foo(bar, baz)
> > 	long bar;		/* number of frobnicators */
> > 	long baz;		/* self-larting on or off */
> > 	{
> > 		....
> > 
> > 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

  reply	other threads:[~2003-05-31  2:58 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 [this message]
2003-05-31  5:08         ` Steven Cole
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=20030531031231.GE5783@conectiva.com.br \
    --to=acme@conectiva.com.br \
    --cc=elenstev@mesatop.com \
    --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.