Re: [PATCH] Cleanup include/net/tcp.h include-files and coding-style

From: Christoph Paasch
Date: Sun Jan 09 2011 - 16:32:32 EST


Hello,

On Sunday, January 09, 2011 wrote Randy Dunlap:
> On Sun, 9 Jan 2011 21:55:34 +0100 Christoph Paasch wrote:
> If there is something in net/tcp.h that uses data or functions from
> <linux/list.h>, then <linux/list.h> should be #included in net/tcp.h,
> whether some other file pulls it in indirectly or not.
>
> etc. etc. etc.
Why?

IMHO I think that it increases compile-time.
Ok, here in that case it only increases it slightly (probably it isn't even
measurable). But, if *all* the files would be more strict in including, I'm
sure that it would make a difference.
The less files you include, the faster the compilation will be.

In net/tcp.h there were even 4 unnecessary included files.

And, then we would also need to include:
net/net_namespace.h (for struct net)

Also, I think that it makes the code more readable and also easier to
maintain. The more files we include, the bigger the chance is that we will end
up with plenty of files unnecessarily included, and thus the compile-time will
explode.

Regards,
Christoph

--
Christoph Paasch
PhD Student

IP Networking Lab --- http://inl.info.ucl.ac.be
MultiPath TCP in the Linux Kernel --- http://inl.info.ucl.ac.be/mptcp
Université Catholique de Louvain

www.rollerbulls.be
--
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/