From: "Robert P. J. Day" <rpjday@mindspring.com>
To: Randy Dunlap <randy.dunlap@oracle.com>
Cc: lkml <linux-kernel@vger.kernel.org>, akpm <akpm@osdl.org>,
jesper.juhl@gmail.com
Subject: Re: [PATCH/RFC] CodingStyle updates
Date: Thu, 14 Dec 2006 19:44:50 -0500 (EST) [thread overview]
Message-ID: <Pine.LNX.4.64.0612141939500.27613@localhost.localdomain> (raw)
In-Reply-To: <20061214162605.b4b6f9f8.randy.dunlap@oracle.com>
On Thu, 14 Dec 2006, Randy Dunlap wrote:
> On Thu, 14 Dec 2006 19:07:27 -0500 (EST) Robert P. J. Day wrote:
>
> > On Thu, 14 Dec 2006, Randy Dunlap wrote:
> >
> > > David Weinehall wrote:
> > > > On Thu, Dec 07, 2006 at 12:48:38AM -0800, Randy Dunlap wrote:
> > > >
> > > > [snip]
> > > >
> > > > > +but no space after unary operators:
> > > > > + sizeof ++ -- & * + - ~ ! defined
> > > >
> > > > Uhm, that doesn't compute... If you don't put a space after sizeof,
> > > > the program won't compile.
> > > >
> > > > int c;
> > > > printf("%d", sizeofc);
> > >
> > > Uh, we prefer not to see "sizeof c". IOW, we prefer to have the
> > > parentheses use all the time. Maybe I need to say that better?
> >
> > here's a *really* rough first pass, i'm sure the end result would need
> > some hand tweaking:
>
> You can certainly send such (generated) patches to Andrew or other
> subsystem maintainers if you'd like, but I'm more interested in not
> adding more crud to the tree in the future.
>
> IOW, sure, we prefer sizeof(foo) to sizeof foo, but the latter isn't
> killing us. If someone is there making other changes, it would be
> OK to change that also.
the advantage to standardizing what's there is that it makes it easier
to make subsequent changes. as a perfect example, because there are
several variations to the use of "sizeof", trying to catch every
combination that might be replaceable by the use of ARRAY_SIZE() is
just that much harder since you'd have to (as i had to) use regular
expressions to check for every variant -- parentheses or no
parentheses? space after the word or not? internal spaces within the
parentheses?
all that variation makes global changes for more useful stuff a real
pain.
rday
next prev parent reply other threads:[~2006-12-15 0:49 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-12-07 8:48 Randy Dunlap
2006-12-07 8:54 ` Jesper Juhl
2006-12-07 11:11 ` Jan Engelhardt
2006-12-07 16:01 ` Chris Friesen
2006-12-07 18:27 ` Jan Engelhardt
2006-12-07 21:36 ` Randy Dunlap
2006-12-07 21:36 ` Randy Dunlap
2006-12-07 22:54 ` Alistair John Strachan
2006-12-07 23:00 ` Randy Dunlap
2006-12-07 23:06 ` David Miller
2006-12-07 23:15 ` Randy Dunlap
2006-12-07 23:23 ` Jan Engelhardt
2006-12-14 22:38 ` David Weinehall
2006-12-14 22:42 ` Randy Dunlap
2006-12-15 0:07 ` Robert P. J. Day
2006-12-15 0:26 ` Randy Dunlap
2006-12-15 0:44 ` Robert P. J. Day [this message]
2006-12-14 23:33 ` Scott Preece
2006-12-14 23:43 ` Randy Dunlap
2006-12-14 23:54 ` Scott Preece
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=Pine.LNX.4.64.0612141939500.27613@localhost.localdomain \
--to=rpjday@mindspring.com \
--cc=akpm@osdl.org \
--cc=jesper.juhl@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=randy.dunlap@oracle.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
all inboxes | Powered by JetHome®