linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Dave Kleikamp <shaggy@linux.vnet.ibm.com>
Cc: Andy Whitcroft <apw@shadowen.org>,
	cmm@us.ibm.com, linux-kernel@vger.kernel.org,
	linux-ext4@vger.kernel.org
Subject: Re: [EXT4 set 2][PATCH 2/5] cleanups: Add extent sanity checks
Date: Thu, 12 Jul 2007 09:19:32 -0700	[thread overview]
Message-ID: <20070712091932.68733b2b.akpm@linux-foundation.org> (raw)
In-Reply-To: <1184248671.10312.7.camel@kleikamp.austin.ibm.com>

On Thu, 12 Jul 2007 08:57:51 -0500 Dave Kleikamp <shaggy@linux.vnet.ibm.com> wrote:

> On Thu, 2007-07-12 at 12:38 +0100, Andy Whitcroft wrote:
> > Andrew Morton wrote:
> > >> +			if (ext4_ext_check_header(inode, ext_block_hdr(bh),
> > >> +							depth - i - 1)) {
> > >> +				err = -EIO;
> > >> +				break;
> > >> +			}
> > >> +			path[i+1].p_bh = bh;
> > > 
> > > Really that should have been "i + 1".  checkpatch misses this.  It seems to
> > > be missing more stuff that it used to lately.
> > 
> > This one is difficult.  The rules up to now have been consistent spacing
> > is required on both sides of mathematics operators.  I personally like
> > spaces always, but we do tend to use them without spaces too where the
> > binding is effectivly part of the value -- the classic case is something
> > like:
> > 
> > 	pfn << MAX_ORDER-1
> > 
> > In allowing that sort of thing, we implictly allow the one you note
> > above.  We have tried to be overly annoying on these things, and so the
> > check is consistancy, spaces both or neither.  We could be stricter.
> 
> I personally think stricter is better.  An occasionally false-positive
> isn't going to hurt anyone.  (Well, maybe the checkpatch.pl maintainers
> will get nagged.)  It at least will cause the developer to look at the
> line of code in question and make a conscious decision to leave it as it
> is.  I'm assuming that upstream maintainers use checkpatch.pl with some
> constraint, and don't throw every patch that produces a warning back at
> the submitter.
> 

I'm in two minds.  Missing-the-spaces is pretty damn common and is sometimes
a reasonable way of saving quite a lot of horizontal space.  I spose we could
take it out again if it's causing problems.

  reply	other threads:[~2007-07-12 16:20 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-01  7:36 [EXT4 set 2][PATCH 2/5] cleanups: Add extent sanity checks Mingming Cao
2007-07-10 23:30 ` Andrew Morton
2007-07-12 11:38   ` Andy Whitcroft
2007-07-12 13:57     ` Dave Kleikamp
2007-07-12 16:19       ` Andrew Morton [this message]
2007-07-16  8:22   ` Mingming Cao

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=20070712091932.68733b2b.akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=apw@shadowen.org \
    --cc=cmm@us.ibm.com \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=shaggy@linux.vnet.ibm.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).