[U-Boot] [PATCH v6 08/10] fdtdec: sort include files

Jean-Jacques Hiblot jjhiblot at ti.com
Mon Oct 2 08:50:10 UTC 2017


Hi Simon,


On 25/09/2017 04:12, Simon Glass wrote:
> Hi Jean-Jacques,
>
> On 15 September 2017 at 04:57, Jean-Jacques Hiblot <jjhiblot at ti.com> wrote:
>> Sort include files in accordance to U-Boot coding style.
>>
>> Signed-off-by: Jean-Jacques Hiblot <jjhiblot at ti.com>
>> ---
>>   lib/fdtdec.c | 10 +++++-----
>>   1 file changed, 5 insertions(+), 5 deletions(-)
>>
>> diff --git a/lib/fdtdec.c b/lib/fdtdec.c
>> index 630e040..f26d2eb 100644
>> --- a/lib/fdtdec.c
>> +++ b/lib/fdtdec.c
>> @@ -4,16 +4,16 @@
>>    */
>>
>>   #ifndef USE_HOSTCC
>> -#include <boot_fit.h>
>>   #include <common.h>
>> +#include <boot_fit.h>
>>   #include <dm.h>
>> +#include <dm/of_extra.h>
> Actually that should go at the end where it is now.
>
> See:
>
> https://www.denx.de/wiki/U-Boot/CodingStyle
Well I wasn't sure if dm/* should go at the end. I thought that maybe 
asm/*, arch/* and linux/* were 'special' cases. This impression was 
reinforced because in the example asm/* goes before arch/*, which does 
not follow the alphabetical order.
So before I make the change in the patch, what would be the right place 
for dm/of_extra.h ? just before #include <linux/ctype.h> ?

Thanks,
Jean-Jacques

>
>>   #include <errno.h>
>> -#include <serial.h>
>> -#include <libfdt.h>
>> -#include <fdt_support.h>
>>   #include <fdtdec.h>
>> +#include <fdt_support.h>
>> +#include <libfdt.h>
>> +#include <serial.h>
>>   #include <asm/sections.h>
>> -#include <dm/of_extra.h>
>>   #include <linux/ctype.h>
>>
>>   DECLARE_GLOBAL_DATA_PTR;
>> --
>> 1.9.1
>>



More information about the U-Boot mailing list