[PATCH] global: Restrict use of '#include <linux/kconfig.h>'

Simon Glass sjg at chromium.org
Sat Dec 16 19:45:55 CET 2023


On Thu, 14 Dec 2023 at 05:16, Tom Rini <trini at konsulko.com> wrote:
>
> In general terms, we -include include/linux/kconfig.h and so normal
> U-Boot code does not need to also #include it. However, for code which
> is shared with userspace we may need to add it so that either our full
> config is available or so that macros such as CONFIG_IS_ENABLED() can be
> evaluated. In this case make sure that we guard these includes with a
> test for USE_HOSTCC so that it clear as to why we're doing this.
>
> Signed-off-by: Tom Rini <trini at konsulko.com>
> ---
> Cc: Simon Glass <sjg at chromium.org>
> ---
>  arch/arm/include/asm/arch-fsl-layerscape/config.h | 1 -
>  arch/arm/mach-rockchip/tpl.c                      | 1 -
>  arch/arm/mach-sunxi/dram_sun50i_h6.c              | 1 -
>  arch/arm/mach-sunxi/dram_sun50i_h616.c            | 1 -
>  arch/arm/mach-sunxi/dram_sunxi_dw.c               | 1 -
>  boot/image-fit.c                                  | 2 +-
>  boot/image.c                                      | 2 +-
>  drivers/timer/dw-apb-timer.c                      | 1 -
>  env/embedded.c                                    | 2 ++
>  include/bootstage.h                               | 2 ++
>  include/configs/at91-sama5_common.h               | 2 --
>  include/configs/tqma6.h                           | 1 -
>  include/env_internal.h                            | 1 -
>  include/u-boot/ecdsa.h                            | 1 -
>  lib/rsa/rsa-verify.c                              | 2 +-
>  test/dm/scmi.c                                    | 1 -
>  tools/mkeficapsule.c                              | 1 -
>  17 files changed, 7 insertions(+), 16 deletions(-)
>

Reviewed-by: Simon Glass <sjg at chromium.org>


More information about the U-Boot mailing list