From: Jaswinder Singh Rajput <jaswinder@kernel.org>
To: Alexey Dobriyan <adobriyan@gmail.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>, Ingo Molnar <mingo@elte.hu>,
x86 maintainers <x86@kernel.org>,
LKML <linux-kernel@vger.kernel.org>,
Hugh Dickins <hugh@veritas.com>, Joerg Roedel <joro@8bytes.org>
Subject: Re: [git-pull -tip] x86: include inverse Xmas tree patches
Date: Sat, 28 Mar 2009 21:41:50 +0530 [thread overview]
Message-ID: <1238256710.2526.9.camel@ht.satnam> (raw)
In-Reply-To: <20090328155837.GA3503@x200.localdomain>
On Sat, 2009-03-28 at 18:58 +0300, Alexey Dobriyan wrote:
> On Sat, Mar 28, 2009 at 03:55:49PM +0000, Alan Cox wrote:
> > > kenel.org/pub/scm/linux/kernel/git/jaswinder/linux-2.6-Xmas.git x86/core
> > > >
> > > > Jaswinder Singh Rajput (49):
> > > > x86: process_32.c include inverse Xmas tree effect
> > >
> > > What the heck is this?
> >
> > Does inverse christmas tree effect not translate well. It could perhaps
> > have been more clearly explained.
> >
> > Getting the includes under control is a good thing and saves everyone
> > time.
>
> Moving #includes up and down is not getting them under control.
Here is Ingo's response about this effect:
On Sun, 2009-03-15 at 05:54 +0100, Ingo Molnar wrote:
> * Li Zefan <lizf@cn.fujitsu.com> wrote:
>
> > > #include <linux/debugfs.h>
> > > #include <linux/uaccess.h>
> > > -#include <linux/stat.h>
> > > +#include <linux/module.h>
> > > #include <linux/init.h>
> > > +#include <linux/stat.h>
> > > #include <linux/io.h>
> > > #include <linux/mm.h>
> > > -#include <linux/module.h>
> > >
> >
> > Just curious about the rule to sort those includes, and why they need
> > to be rearranged.
>
> Such includes (the 'reverse christmas tree'):
>
> #include <linux/interrupt.h>
> #include <linux/mmiotrace.h>
> #include <linux/bootmem.h>
> #include <linux/compiler.h>
> #include <linux/highmem.h>
> #include <linux/kprobes.h>
> #include <linux/uaccess.h>
> #include <linux/vmalloc.h>
> #include <linux/vt_kern.h>
> #include <linux/signal.h>
> #include <linux/kernel.h>
> #include <linux/ptrace.h>
> #include <linux/string.h>
> #include <linux/module.h>
> #include <linux/kdebug.h>
> #include <linux/errno.h>
> #include <linux/magic.h>
> #include <linux/sched.h>
> #include <linux/types.h>
> #include <linux/init.h>
> #include <linux/mman.h>
> #include <linux/tty.h>
> #include <linux/smp.h>
> #include <linux/mm.h>
>
> #include <asm/kmemcheck.h>
> #include <asm/tlbflush.h>
> #include <asm/pgalloc.h>
> #include <asm/segment.h>
> #include <asm/system.h>
> #include <asm/proto.h>
> #include <asm/traps.h>
> #include <asm/desc.h>
>
> are used by x86 architecture code (and some other subsystems) to
> reduce the likelyhood of patch conflicts in commonly modified
> kernel files.
>
> Without such ordering developers typically append to the
> existing list of include files when introducing a new header -
> creating an almost certain patch conflict. Via the above
> ordering, new headers get distributed roughly evenly amongst the
> full range - and thus the chance of patch conflicts is much
> smaller.
>
> This way it also looks a bit more structured and bit less messy.
> It looks unprofessional and sloppy if a .c file starts with a
> big block of thrown-together include files.
>
> Ingo
next prev parent reply other threads:[~2009-03-28 16:13 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-28 14:48 Jaswinder Singh Rajput
2009-03-28 15:07 ` Joerg Roedel
2009-03-28 16:48 ` Jaswinder Singh Rajput
2009-03-28 17:16 ` Jaswinder Singh Rajput
2009-03-28 15:07 ` Alexey Dobriyan
2009-03-28 15:55 ` Alan Cox
2009-03-28 15:58 ` Alexey Dobriyan
2009-03-28 16:11 ` Jaswinder Singh Rajput [this message]
2009-03-28 16:28 ` Alan Cox
2009-03-28 19:03 ` Sam Ravnborg
2009-03-28 22:25 ` H. Peter Anvin
2009-03-28 22:37 ` Al Viro
2009-03-28 23:31 ` Thomas Gleixner
2009-03-28 23:34 ` Ingo Molnar
2009-03-28 23:39 ` Thomas Gleixner
2009-03-29 0:00 ` Ingo Molnar
2009-03-29 0:24 ` Al Viro
2009-03-29 10:25 ` Alexey Dobriyan
2009-03-29 0:28 ` Thomas Gleixner
2009-03-29 1:58 ` Ingo Molnar
2009-03-29 7:57 ` Jaswinder Singh Rajput
2009-03-28 15:17 ` Hugh Dickins
2009-03-28 23:40 ` Ingo Molnar
2009-03-29 6:38 ` Jaswinder Singh Rajput
2009-03-29 11:46 ` Thomas Gleixner
2009-03-29 14:38 ` Jaswinder Singh Rajput
2009-03-28 23:35 ` Ingo Molnar
2009-03-29 5:54 ` Jaswinder Singh Rajput
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=1238256710.2526.9.camel@ht.satnam \
--to=jaswinder@kernel.org \
--cc=adobriyan@gmail.com \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=hugh@veritas.com \
--cc=joro@8bytes.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=x86@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®