Frederic Barrat <fbar...@linux.vnet.ibm.com> writes: >> diff --git a/drivers/misc/cxl/cxllib.c b/drivers/misc/cxl/cxllib.c >> new file mode 100644 >> index 0000000..4f4c5ca >> --- /dev/null >> +++ b/drivers/misc/cxl/cxllib.c >> @@ -0,0 +1,246 @@ >> +/* >> + * Copyright 2017 IBM Corp. >> + * >> + * This program is free software; you can redistribute it and/or >> + * modify it under the terms of the GNU General Public License >> + * as published by the Free Software Foundation; either version >> + * 2 of the License, or (at your option) any later version. >> + */ >> + >> +#include <asm/pnv-pci.h> >> +#include <linux/hugetlb.h> >> +#include <linux/sched/mm.h> >> +#include <misc/cxllib.h> > > Maybe somebody can comment on this, but I believe the usual order is the > 'linux' headers first, then the 'asm'. Though I don't know if there's a > valid reason behind it, or just tradition...
AFAIK it's mainly tradition. In general if there's a linux/foo.h and an asm/foo.h you're usually supposed to include the linux version, and then that will include asm/foo.h appropriately. In some cases you might have an asm header that relies on something defined in the linux version, meaning including the asm one first doesn't build. Outside of arch it's slightly dubious to be including asm/ headers directly, because you require all arches to have that header. None of which really answers your question :) cheers