From: Joe Perches <joe@perches.com>
To: Cong Wang <xiyou.wangcong@gmail.com>
Cc: linux-kernel@vger.kernel.org, netdev@vger.kernel.org
Subject: Re: [RFC PATCH - diffstat only] include/net: Remove extern from function prototypes
Date: Wed, 24 Jul 2013 18:41:20 -0700 [thread overview]
Message-ID: <1374716480.1924.18.camel@joe-AO722> (raw)
In-Reply-To: <kspuuk$k2v$1@ger.gmane.org>
On Thu, 2013-07-25 at 01:27 +0000, Cong Wang wrote:
> On Tue, 23 Jul 2013 at 17:58 GMT, Joe Perches <joe@perches.com> wrote:
You dropped the author from the cc list.
Always reply to the author.
> > Function prototypes don't need to be declared
> > extern in .h files. It's assumed by the compiler
> > and is as unnecessary as using auto is when
> > declaring automatic/local variables in a block.
> >
> Since we all know this, why bother it?
If everyone knew this, new ones wouldn't be added.
But a lot are.
Removing extern makes prototypes shorter and more readable.
More prototypes fit in a single line
More arguments fit on a multi-line prototypes.
> Having "extern" doesn't harm
> readability, instead it probably helps.
Sure, just like auto does. Why isn't that used?
> > I believe it makes grepping for extern useful as
> > all the matches are actual variables and structs.
> You need a semantic tool.
No, not really. I'm fairly comfortable with spatch.
spatch takes a long time to run for a lot of things.
next prev parent reply other threads:[~2013-07-25 1:41 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-23 17:58 [RFC PATCH - diffstat only] include/net: Remove extern from function prototypes Joe Perches
2013-07-25 1:27 ` Cong Wang
2013-07-25 1:41 ` Joe Perches [this message]
2013-07-25 1:47 ` Hannes Frederic Sowa
2013-07-25 2:59 ` [PATCH] checkpatch: Warn when using extern with function prototypes in .h files Joe Perches
2013-08-01 12:21 ` David Howells
2013-08-01 13:00 ` Arend van Spriel
2013-07-30 7:10 ` [RFC PATCH - diffstat only] include/net: Remove extern from function prototypes David Miller
2013-07-30 7:38 ` Stephen Rothwell
2013-07-30 7:49 ` David Miller
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=1374716480.1924.18.camel@joe-AO722 \
--to=joe@perches.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=xiyou.wangcong@gmail.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).