Re: [PATCH 2/2] kbuild: detect missing header include guard

From: Sam Ravnborg
Date: Sat Aug 10 2019 - 02:39:23 EST


Hi Masahiro

On Mon, Jul 29, 2019 at 02:34:45AM +0900, Masahiro Yamada wrote:
> Our convention is to surround the whole of the header content with an
> include guard. This avoids the same header being parsed over again in
> case it is included multiple times.
>
> The include guard is missing in several places, or broken due to the
> mismatch between #ifndef and #define.
>
> The recently added header-test-y syntax allows the comprehensive sanity
> checks of headers. This commit adds another check; if include guard is
> missing, the header will fail to build due to redefinition of something.
>
> Some headers must be excluded from the test-coverage for now. I will
> let them in after they are fixed.

Smart and simple - nice.

>
> Signed-off-by: Masahiro Yamada <yamada.masahiro@xxxxxxxxxxxxx>
Reviewed-by: Sam Ravnborg <sam@xxxxxxxxxxxx>

Sam