From: Stephen Hemminger <stephen@networkplumber.org>
To: David Laight <David.Laight@ACULAB.COM>
Cc: 'Jonathan Corbet' <corbet@lwn.net>,
Corcodel Marian <asd@marian1000.go.ro>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"linux-doc@vger.kernel.org" <linux-doc@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"Realtek linux nic maintainers" <nic_swsd@realtek.com>
Subject: Re: [PATCH] New Chapter on CodingStyle .
Date: Tue, 15 Aug 2017 09:20:30 -0700 [thread overview]
Message-ID: <20170815092030.7ec82ace@xeon-e3> (raw)
In-Reply-To: <063D6719AE5E284EB5DD2968C1650D6DD0055A0C@AcuExch.aculab.com>
On Tue, 15 Aug 2017 10:42:39 +0000
David Laight <David.Laight@ACULAB.COM> wrote:
> From: Jonathan Corbet
> > Sent: 12 August 2017 15:55
> ...
> > > + Chapter 20: Put values on initialisers without exception
> > > +
> > > +When declaring variables on functions must put values:
> >
> > Thanks for sending a patch for the kernel's documentation.
> > Unfortunately, I can't accept this patch for a couple of reasons:
> ...
> > - The coding style document is there to describe the community's
> > standards for kernel code. It is *not* a mechanism for imposing new
> > standards. If you really think that the kernel community should adopt
> > this rule, you will need to argue for it on the mailing lists. I will
> > say, though, that I do not expect that this effort would be successful.
>
> I'd even go as far as suggesting almost the opposite.
> Declarations should only have initialisers if the value is constant.
Yup. This new rule sound like something taught to people in coding schools.
But initializing everything defeats the compiler detection of uninitialized variables
which is more useful for catching errors.
next prev parent reply other threads:[~2017-08-15 16:20 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1502536998-5482-1-git-send-email-asd@marian1000.go.ro>
2017-08-12 14:54 ` [PATCH] New Chapter on CodingStyle Jonathan Corbet
2017-08-15 10:42 ` David Laight
2017-08-15 16:20 ` Stephen Hemminger [this message]
2017-08-15 16:55 ` David Laight
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=20170815092030.7ec82ace@xeon-e3 \
--to=stephen@networkplumber.org \
--cc=David.Laight@ACULAB.COM \
--cc=asd@marian1000.go.ro \
--cc=corbet@lwn.net \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=nic_swsd@realtek.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).