From: Randy Dunlap <rdunlap@xenotime.net>
To: christoph.paasch@uclouvain.be
Cc: Alexey Dobriyan <adobriyan@gmail.com>,
Ben Hutchings <bhutchings@solarflare.com>,
davem@davemloft.net, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Cleanup include/net/tcp.h include-files and coding-style
Date: Mon, 10 Jan 2011 08:30:24 -0800 [thread overview]
Message-ID: <20110110083024.ab3bad25.rdunlap@xenotime.net> (raw)
In-Reply-To: <201101101724.46023.christoph.paasch@uclouvain.be>
On Mon, 10 Jan 2011 17:24:45 +0100 Christoph Paasch wrote:
>
> On Monday, January 10, 2011 wrote Randy Dunlap:
> > Documentation/SubmitChecklist, #1:
> >
> > 1: If you use a facility then #include the file that defines/declares
> > that facility. Don't depend on other header files pulling in ones
> > that you use.
> Ok, great. That was the answer I was looking for.
>
> So, there is a clear rule that defines the #include-policy.
>
> Now, should the missing #include's be added, or not?
>
> Alexey Dobriyan is against it, as he says in one of his previous mails.
> And, I'm nearly sure that the rule is not respected in plenty of other files
> of the Linux Kernel.
If a build fails on any $architecture due to a missing header file, then
the header file should be added.
If you just want to fix source files that are missing header files, then
the patches should be accepted, even if they are not "needed" in some
strong sense of that word.
Adding the header files adds documentation that some interface from that
header file is being used and it prevents failures that would happen
if an indirect #include were removed, so it's a good practice, but sure,
there are plenty of places that miss this. It was added as Rule #1
(explicity as Rule __#1__) due to so many build errors due to this
that were occurring in linux-next trees.
---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***
next prev parent reply other threads:[~2011-01-10 16:30 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-09 20:55 Christoph Paasch
2011-01-09 21:06 ` Randy Dunlap
2011-01-09 21:32 ` Christoph Paasch
2011-01-09 21:55 ` Ben Hutchings
2011-01-09 22:33 ` Christoph Paasch
2011-01-09 23:06 ` Ben Hutchings
2011-01-10 9:03 ` Christoph Paasch
2011-01-10 11:11 ` Alexey Dobriyan
2011-01-10 11:44 ` Christoph Paasch
2011-01-10 12:12 ` Alexey Dobriyan
2011-01-10 15:50 ` Randy Dunlap
2011-01-10 16:24 ` Christoph Paasch
2011-01-10 16:30 ` Randy Dunlap [this message]
2011-01-10 17:02 ` Alexey Dobriyan
2011-01-09 22:30 ` Alexey Dobriyan
2011-01-09 22:39 ` Christoph Paasch
2011-01-09 23:06 ` Christoph Paasch
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=20110110083024.ab3bad25.rdunlap@xenotime.net \
--to=rdunlap@xenotime.net \
--cc=adobriyan@gmail.com \
--cc=bhutchings@solarflare.com \
--cc=christoph.paasch@uclouvain.be \
--cc=davem@davemloft.net \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
/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®