[U-Boot] [RFC PATCH 01/11] serial: Add support for Qualcomm serial port

Simon Glass sjg at chromium.org
Tue Dec 22 21:23:58 CET 2015


Hi Masahiro,

On 20 December 2015 at 23:50, Masahiro Yamada
<yamada.masahiro at socionext.com> wrote:
> 2015-12-16 3:58 GMT+09:00 Simon Glass <sjg at chromium.org>:
>
>>> +++ b/drivers/serial/serial_msm.c
>>> @@ -0,0 +1,204 @@
>>> +/*
>>> + * Qualcomm UART driver
>>> + *
>>> + * (C) Copyright 2015 Mateusz Kulikowski <mateusz.kulikowski at gmail.com>
>>> + *
>>> + * UART will work in Data Mover mode.
>>> + * Based on Linux driver.
>>> + *
>>> + * SPDX-License-Identifier:    GPL-2.0+
>>> + */
>>> +
>>> +#include <asm/io.h>
>>> +#include <common.h>
>>> +#include <dm.h>
>>> +#include <clk.h>
>>> +#include <errno.h>
>>> +#include <linux/compiler.h>
>>> +#include <serial.h>
>>> +#include <watchdog.h>
>>
>> Ordering:
>>
>> common.h
>> clk.h
>> dm.h
>> errno.h
>> serial.h
>> watchdog.h
>> asm/
>> linux/
>>
>>
>
> No.
>
> Put <linux/*.h> above <asm/*.h>, at least.
> (the same order in Linux)
>
>
>
> BTW, the "Include file order" in
> http://www.denx.de/wiki/U-Boot/CodingStyle
>
> Is this your opinion? Or community's opinion.
>
> Did anybody review it?

This came from Mike Frysinger some years ago on the mailing list and I
have followed it since. I took it to be a U-Boot standard and added it
to the Wiki at some point. Linux perhaps has linux/ above asm/ for its
own reasons (e.g. because it is Linux and needs its headers first) but
I don't think that is a good idea for U-Boot. It is unnecessary and
makes the sort order more confusing.

Regards,
Simon


More information about the U-Boot mailing list