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 07:50:32 -0800 [thread overview]
Message-ID: <20110110075032.e38955ef.rdunlap@xenotime.net> (raw)
In-Reply-To: <201101101244.24932.christoph.paasch@uclouvain.be>
On Mon, 10 Jan 2011 12:44:24 +0100 Christoph Paasch wrote:
>
> On Monday, January 10, 2011 wrote Alexey Dobriyan:
> > >> linux/percpu_counter.h (needed for percpu_counter_sum_positive)
> > >
> > > Yes.
> >
> > Currently code compiles fine, so necessary headers are in place,
> > so simply adding new headers doesn't help anything.
>
> I totally agree with you.
> However we need a consistent coding style.
>
> Or we just include the minimum necessary headers (as originally proposed by
> me).
> Or we include every header whose structs/functions are referenced.
>
> In my opinion the current "mixed" state is not ok, because some includes are
> there because there *are* references (even if these includes could be omitted,
> e.g., linux/list.h).
> Other includes (like linux/percpu_counter.h) are not there, because they are
> indirectly included by another header and thus the code compiles. Even if
> there are references.
> And there are no rules/guidelines to identify the headers that should be
> included and those that should not.
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.
---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***
next prev parent reply other threads:[~2011-01-10 15:50 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-09 20:55 [PATCH] Cleanup include/net/tcp.h include-files and coding-style 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 [this message]
2011-01-10 16:24 ` Christoph Paasch
2011-01-10 16:30 ` Randy Dunlap
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=20110110075032.e38955ef.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;
as well as URLs for NNTP newsgroup(s).