[PATCH] ARM: uniphier: delete or replace <common.h> includes

Masahiro Yamada masahiroy at kernel.org
Fri May 8 04:30:12 CEST 2020

Hi Simon,

On Fri, May 8, 2020 at 10:37 AM Simon Glass <sjg at chromium.org> wrote:
> Hi Masahiro,
> On Thu, 7 May 2020 at 07:10, Masahiro Yamada
> <yamada.masahiro at socionext.com> wrote:
> >
> > <common.h> pulls in a lot of bloat. <common.h> is unneeded in most of
> > places.
> >
> > Signed-off-by: Masahiro Yamada <yamada.masahiro at socionext.com>
> > ---
> >
> >
> I'm wary of this. I think that every file should include common.h

I disagree.

"Please include <common.h> at the beginning of every file"
is a fragile rule.
You have no way to check it.

Our goal is to get rid of the
special treatment of <common.h>

> and
> the solution is to remove the bloat. I have been plugging away at
> that. There is a pending series that reduces it down further, to 14
> includes. Please help review!
> http://patchwork.ozlabs.org/project/uboot/list/?series=169491

I saw it.

Humans cannot check it.
If buildman does not raise a flag, it is fine.

> The problem is that when someone uses #ifdef CONFIG options the
> config.h has to be included. So your patch is a bit brittle. As soon
> as someone uses CONFIG it may break.

For the legacy CONFIG options, yes.
The options in Kconfig are all safe.

Common options were mostly moved to Kconfig.

We still have lots in scripts/config_whitelist.txt
but most of them are platform-specific craps.

> Anyway this is uniphier code so it's up to you.
> Regards,
> Simon

Best Regards
Masahiro Yamada

More information about the U-Boot mailing list