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

Simon Glass sjg at chromium.org
Wed May 20 16:20:30 CEST 2020


On Tue, 19 May 2020 at 21:32, 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>
> ---
>
>  arch/arm/mach-uniphier/arm32/cache-uniphier.c         | 1 -
>  arch/arm/mach-uniphier/arm32/psci.c                   | 1 -
>  arch/arm/mach-uniphier/arm32/timer.c                  | 2 +-
>  arch/arm/mach-uniphier/arm64/mem_map.c                | 1 -
>  arch/arm/mach-uniphier/base-address.c                 | 2 +-
>  arch/arm/mach-uniphier/board_late_init.c              | 1 -
>  arch/arm/mach-uniphier/boards.c                       | 2 +-
>  arch/arm/mach-uniphier/boot-device/boot-device-ld11.c | 1 -
>  arch/arm/mach-uniphier/boot-device/boot-device-ld4.c  | 1 -
>  arch/arm/mach-uniphier/boot-device/boot-device-pro5.c | 1 -
>  arch/arm/mach-uniphier/boot-device/boot-device-pxs2.c | 1 -
>  arch/arm/mach-uniphier/boot-device/boot-device-pxs3.c | 1 -
>  arch/arm/mach-uniphier/boot-device/boot-device.c      | 2 +-
>  arch/arm/mach-uniphier/clk/clk-dram-ld4.c             | 1 -
>  arch/arm/mach-uniphier/clk/clk-dram-pxs2.c            | 1 -
>  arch/arm/mach-uniphier/clk/clk-early-ld4.c            | 1 -
>  arch/arm/mach-uniphier/clk/clk-ld11.c                 | 1 -
>  arch/arm/mach-uniphier/clk/dpll-ld4.c                 | 1 -
>  arch/arm/mach-uniphier/clk/dpll-pro4.c                | 1 -
>  arch/arm/mach-uniphier/debug-uart/debug-uart.c        | 1 -
>  arch/arm/mach-uniphier/dram/cmd_ddrmphy.c             | 1 -
>  arch/arm/mach-uniphier/dram/cmd_ddrphy.c              | 1 -
>  arch/arm/mach-uniphier/dram/umc-ld4.c                 | 1 -
>  arch/arm/mach-uniphier/dram/umc-pro4.c                | 1 -
>  arch/arm/mach-uniphier/dram/umc-sld8.c                | 1 -
>  arch/arm/mach-uniphier/dram_init.c                    | 2 +-
>  arch/arm/mach-uniphier/fdt-fixup.c                    | 2 +-
>  arch/arm/mach-uniphier/memconf.c                      | 1 -
>  arch/arm/mach-uniphier/micro-support-card.c           | 3 ++-
>  arch/arm/mach-uniphier/mmc-boot-mode.c                | 1 -
>  arch/arm/mach-uniphier/mmc-first-dev.c                | 1 -
>  arch/arm/mach-uniphier/pinctrl-glue.c                 | 1 -
>  arch/arm/mach-uniphier/reset.c                        | 1 -
>  arch/arm/mach-uniphier/sbc/sbc-ld11.c                 | 1 -
>  arch/arm/mach-uniphier/sbc/sbc.c                      | 1 -
>  arch/arm/mach-uniphier/spl_board_init.c               | 1 -
>  36 files changed, 8 insertions(+), 36 deletions(-)
>

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

Actually common.h is a lot better than it was.

Three years ago it was just over 1000 lines. lz4_wapper.c produced
5630 of pre-processed C. Now it is about 4000 and the list of
dependencies is 72 lines instead of 91.

Yes common.h is still a problem, but I think we need to look at other
headers also. For example, global_data.h includes fdtdec.h for one
type, which includes lots of things. There are quite a few other
headers that pull in too much stuff.

Do you know of a good way to measure this stuff automatically?

Regards,
Simon


More information about the U-Boot mailing list