All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Chinner <dgc@sgi.com>
To: David Howells <dhowells@redhat.com>
Cc: David Chinner <dgc@sgi.com>,
	"Josef 'Jeff' Sipek" <jeffpc@josefsipek.net>,
	linux-kernel@vger.kernel.org, xfs-masters@oss.sgi.com,
	akpm@osdl.org
Subject: Re: [PATCH 5 of 11] XFS: Use SEEK_{SET, CUR, END} instead of hardcoded values
Date: Tue, 19 Sep 2006 14:01:32 +1000	[thread overview]
Message-ID: <20060919040132.GI3034@melbourne.sgi.com> (raw)
In-Reply-To: <2442.1158575435@warthog.cambridge.redhat.com>

On Mon, Sep 18, 2006 at 11:30:35AM +0100, David Howells wrote:
> David Chinner <dgc@sgi.com> wrote:
> 
> > The hard coded values  used in xfs_change_file_space() are documented as part
> > of the API to the userspace functions that use this interface in xfsctl(3).
> 
> Hmmm... that's a good point.  I think you're right on this account, and so the
> comments in:
> 
> 		case 0: /*SEEK_SET*/
> 			break;
> 		case 1: /*SEEK_CUR*/
> 			bf->l_start += offset;
> 			break;
> 		case 2: /*SEEK_END*/
> 			bf->l_start += ip->i_d.di_size;
> 			break;
> 
> should be stripped off as they are not exactly correct.

Sure, they're not _exactly_ the same as seek semantics, but the
comment is informative enough to tell you what the magic numbers
are supposed to mean as you read the code.

If you really want to strip these out these comments, can you please
replace them with a new comment that documents the magic number
behaviour?

Cheers,

Dave.
-- 
Dave Chinner
Principal Engineer
SGI Australian Software Group

  reply	other threads:[~2006-09-19  4:01 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-09-17  1:09 [PATCH 0 of 11] Use SEEK_{SET,CUR,END} instead of hardcoded values Josef 'Jeff' Sipek
2006-09-17  1:09 ` [PATCH 1 of 11] MBCS: Use SEEK_{SET, CUR, END} " Josef 'Jeff' Sipek
2006-09-17  1:09 ` [PATCH 2 of 11] EICON ISDN: Removed unused definitions for OS_SEEK_* Josef 'Jeff' Sipek
2006-09-17  8:48   ` Armin Schindler
2006-09-17  1:09 ` [PATCH 3 of 11] MTD: Use SEEK_{SET, CUR, END} instead of hardcoded values Josef 'Jeff' Sipek
2006-09-17 16:06   ` David Woodhouse
2006-09-17  1:09 ` [PATCH 4 of 11] CIFS: Use SEEK_END instead of hardcoded value Josef 'Jeff' Sipek
2006-09-17  1:09 ` [PATCH 5 of 11] XFS: Use SEEK_{SET, CUR, END} instead of hardcoded values Josef 'Jeff' Sipek
2006-09-18  3:34   ` David Chinner
2006-09-18 10:30     ` David Howells
2006-09-19  4:01       ` David Chinner [this message]
2006-09-17  1:09 ` [PATCH 6 of 11] NFS: Use SEEK_END instead of hardcoded value Josef 'Jeff' Sipek
2006-09-17  1:09 ` [PATCH 7 of 11] VFS: Use SEEK_{SET, CUR, END} instead of hardcoded values Josef 'Jeff' Sipek
2006-09-17  1:09 ` [PATCH 8 of 11] sound core: " Josef 'Jeff' Sipek
2006-09-17  1:09 ` [PATCH 9 of 11] opl4: " Josef 'Jeff' Sipek
2006-09-17  1:09 ` [PATCH 10 of 11] gus: " Josef 'Jeff' Sipek
2006-09-17  1:09 ` [PATCH 11 of 11] mixart: " Josef 'Jeff' Sipek
2006-09-17  3:46 ` [PATCH 0 of 11] Use SEEK_{SET,CUR,END} " Nick Piggin
2006-09-17  6:38   ` Josef Sipek
2006-09-18 10:32 ` 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=20060919040132.GI3034@melbourne.sgi.com \
    --to=dgc@sgi.com \
    --cc=akpm@osdl.org \
    --cc=dhowells@redhat.com \
    --cc=jeffpc@josefsipek.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=xfs-masters@oss.sgi.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.