public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: David Howells <dhowells@warthog.cambridge.redhat.com>
To: Andrew Morton <akpm@digeo.com>
Cc: Jeff Garzik <jgarzik@pobox.com>,
	dhowells@redhat.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] PAG support only
Date: Wed, 14 May 2003 10:44:51 +0100	[thread overview]
Message-ID: <18809.1052905491@warthog.warthog> (raw)
In-Reply-To: <20030513175240.6313ea92.akpm@digeo.com>


> David, please stick with Linus-style.  That means commas
> after spaces and never, ever, ever:
>
> 	if (foo) bar

So you'd rather have:

	long sys_setpag(pag_t pag)
	{
		if (pag > 0)
			return vfs_join_pag(pag);
		else if (pag == 0)
			return vfs_leave_pag();
		else if (pag == -1)
			return vfs_new_pag();
		else
			return -EINVAL;
	}

Than:

	long sys_setpag(pag_t pag)
	{
		if (pag > 0)		return vfs_join_pag(pag);
		else if (pag == 0)	return vfs_leave_pag();
		else if (pag == -1)	return vfs_new_pag();
		else			return -EINVAL;
	}

When the former is _far_ less readable at a glance? And also consumes nearly
twice as many screen lines [see CodingStyle: "Thus, as the supply of new-lines
on your screen is not a renewable resource (think 25-line terminal screens
here), you have more empty lines to put comments on."].

> and syscalls should return long, not int.

Fair enough, but in arch/i386/kernel/process.c:

	asmlinkage int sys_fork(struct pt_regs regs)
	asmlinkage int sys_clone(struct pt_regs regs)
	asmlinkage int sys_vfork(struct pt_regs regs)
	asmlinkage int sys_execve(struct pt_regs regs)
	etc...

Should these be fixed too (the i386 arch is referred to quite a lot)?

David


       reply	other threads:[~2003-05-14  9:32 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20030513175240.6313ea92.akpm@digeo.com>
2003-05-14  9:44 ` David Howells [this message]
2003-05-14 10:00   ` [PATCH] PAG support only Andrew Morton
2003-05-14 10:01   ` Miles Bader
2003-05-14 16:04 Chuck Ebbert
2003-05-14 16:20 ` William Lee Irwin III
  -- strict thread matches above, loose matches on Subject: below --
2003-05-13 16:33 David Howells
2003-05-13 16:48 ` Jeff Garzik
2003-05-13 20:37 ` Christoph Hellwig
2003-05-14  8:17   ` David Howells
2003-05-14  8:39     ` Christoph Hellwig
2003-05-14  4:57 ` Muli Ben-Yehuda
2003-05-14  9:54   ` David Howells
2003-05-14 12:35     ` Muli Ben-Yehuda
2003-05-14 13:17       ` David Howells

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=18809.1052905491@warthog.warthog \
    --to=dhowells@warthog.cambridge.redhat.com \
    --cc=akpm@digeo.com \
    --cc=dhowells@redhat.com \
    --cc=jgarzik@pobox.com \
    --cc=linux-kernel@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox