All of lore.kernel.org
 help / color / mirror / Atom feed
From: Juan Quintela <quintela@mandrakesoft.com>
To: Linus Torvalds <torvalds@transmeta.com>
Cc: Russell King <rmk@arm.linux.org.uk>,
	Steven Cole <elenstev@mesatop.com>,
	<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] 2.5 Documentation/CodingStyle ANSI C function declarations.
Date: 02 Jun 2003 12:53:30 +0200	[thread overview]
Message-ID: <m2smqs7nth.fsf@neno.mitica> (raw)
In-Reply-To: <Pine.LNX.4.44.0305301414210.2671-100000@home.transmeta.com>

>>>>> "linus" == Linus Torvalds <torvalds@transmeta.com> writes:

linus> 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?

linus> No, but it's better than what it used to be.

linus> Also, while I don't think we should try to maintain 1:1 behaviour with 
linus> the _worst_ offenses of zlib, I do think we should maintain comments etc, 
linus> and a lot of the zlib function declarations used to look like

linus> int foo(bar, baz)
linus> long bar;		/* number of frobnicators */
linus> long baz;		/* self-larting on or off */
linus> {
linus> ....

linus> and the ANSI-fication changes this to

linus> int foo(
linus> long bar,	/* number of frobnicators */
linus> long baz	/* self-larting on or off */
linus> )
linus> {
linus> ...

linus> which while not according to the coding-standard is at least a reasonable 
linus> compromize between having proper C function definitions and keeping the 
linus> code _looking_ more like the original.

Once there:


/**
 * foo - <put something there>
 * @bar: number of frobnicators
 * @baz: self-larting on or off
 * @userdata: pointer to arbitrary userdata to be registered
 *
 * Description: Please, fix me
 */
int foo(long bar, long baz)
{
...

Looks like a better alternative to me.

YMMV, Juan.

-- 
In theory, practice and theory are the same, but in practice they 
are different -- Larry McVoy

  parent reply	other threads:[~2003-06-02 10:40 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
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 [this message]
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=m2smqs7nth.fsf@neno.mitica \
    --to=quintela@mandrakesoft.com \
    --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.