[U-Boot] [PATCH 03/11] arm: tegra: mmc: clean-up include file order

Tom Warren TWarren at nvidia.com
Tue Aug 18 21:00:34 CEST 2015


> -----Original Message-----
> From: sjg at google.com [mailto:sjg at google.com] On Behalf Of Simon Glass
> Sent: Tuesday, August 18, 2015 5:44 AM
> To: Marcel Ziswiler
> Cc: U-Boot Mailing List; Tom Warren; Pantelis Antoniou; Tom Rini; Albert
> Aribaud; Stephen Warren
> Subject: Re: [PATCH 03/11] arm: tegra: mmc: clean-up include file order
> 
> Hi Marcel,
> 
> On 18 August 2015 at 02:11, Marcel Ziswiler <marcel at ziswiler.com> wrote:
> > On Mon, 2015-08-17 at 16:14 -0600, Simon Glass wrote:
> >
> >> The nice thing about sorting things in groups is that you can see at
> >> a glance what is missing. It doesn't make sense to have:
> >>
> >> <asm/aaa.h>
> >> <bbb.c>
> >> <asm/ccc.h>
> >>
> >> since the asm/ includes are quite a different category.
> >
> > But that's not at all what I proposed. What I was talking about looks
> > as follows:
> >
> > <common.h>
> > <asm/aaa.h>
> > <asm/ccc.h>
> > <bbb.c>
> > <linux/aaa.h>
> > "local.h"
> >
> > Which is exactly what I actually did in the patch we are talking about.
> >
> > OK, I agree that there seems to be one nitty-gritty detail concerning
> > the sort order of - aka dash vs. / aka slash going back to GNU sort
> > (which is what I used) not seeming to enforce the same but I actually
> > see that as a minor detail.
> 
> No I think you misunderstand. Another way of explaining this is sorting fruit
> and animals:
> 
> apple
> grapefruit
> orange
> elephant
> lion
> zebra
> 
> We don't want to mix up the fruit and animals, so each has its own position in
> the table.We can then easily see what animals are in the table.
> 
> This is not a case of running 'sort' on the includes. The 'asm' files are arch-
> specific includes and should go after all the 'generic'
> includes, like <bbb.c>, etc.
> 
> So to repeat, the ordering should be:
> 
> <common.h>       <- most general
> <others.h>
> <asm/...>
> <arch/arm/...>
> <linux/...>
> "local.h"               <- least general
> 
> Regards,
> Simon

After reading Simon's latest explanation, I tend to agree with him. Marcel - I'll wait until this is amicably resolved and then I'll apply whatever you come up with to the Tegra repo.

Tom
--
nvpublic


More information about the U-Boot mailing list