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

Simon Glass sjg at chromium.org
Mon Dec 28 05:29:00 CET 2015


Hi Masahiro,

On 22 December 2015 at 20:52, Masahiro Yamada
<yamada.masahiro at socionext.com> wrote:
> Hi Simon,
>
>
>
>>> 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.
>>
>
> OK, but I want to know the reason.
> Do you remember why Mike Frysinger suggested so?
>
> I guess Linux sorts headers from global to local.
>
> #include <linux/*.h>    global in the project
> #include <asm/*.h>      arch-specific
> #include "foo.h"        local in the directory
>
>
> Likewise, the following makes sense for U-Boot
>
> #include <common.h>
> #include <*.h>              global in the project (U-boot orignal)
> #include <linux/*.h>        global in the project (come from Linux)
> #include <asm/*.h>          arch-specific
> #include <asm/arch/*.h>     SoC-specific
> #include "foo.h"            local in the directory
>
> if I am not missing something...

The only difference here seems to be the position of the linux
headers. I don't think it is a big deal to change it if you like. The
only think I don't like so much is that it seems easier to put 'linux'
after 'asm', since it matches the alphabetical order and may avoid
confusion. But it's not important to me - mostly we just need to be
consistent. If you want to do this, perhaps get an ack from Tom and
then update the wiki?

>
>
> --
> Best Regards
> Masahiro Yamada

Regards,
Simon


More information about the U-Boot mailing list