[PATCH v7 01/10] CONFIG_NR_DRAM_BANKS: Remove unreferenced code as its always defined

Bin Meng bmeng.cn at gmail.com
Thu Aug 20 11:21:12 CEST 2020


On Thu, Aug 20, 2020 at 12:45 PM Stefan Roese <sr at denx.de> wrote:
>
> Since commit 86cf1c82850f ("configs: Migrate CONFIG_NR_DRAM_BANKS") &
> commit 999a772d9f24 ("Kconfig: Migrate CONFIG_NR_DRAM_BANKS"),
> CONFIG_NR_DRAM_BANKS is always defined with a value (4 is default).
> It makes no sense to still carry code that is guarded with
> "#ifndef CONFIG_NR_DRAM_BANKS" (and similar). This patch removes
> all these unreferenced code paths.
>
> Signed-off-by: Stefan Roese <sr at denx.de>
> Reviewed-by: Pali Rohár <pali at kernel.org>
> Reviewed-by: Andy Shevchenko <andriy.shevchenko at linux.intel.com>
>
> ---
>
> (no changes since v5)
>
> Changes in v5:
> - Add Reviewed-by tag from Pali & Andy
> - Move "bd" assignment as suggested by Andy
>
> Changes in v4:
> - Only remove dead code with CONFIG_NR_DRAM_BANKS always defined
>
>  arch/x86/cpu/broadwell/cpu_from_spl.c |  2 --
>  board/xilinx/zynqmp/zynqmp.c          |  2 --
>  cmd/bdinfo.c                          |  2 --
>  common/board_f.c                      |  7 +-----
>  common/image.c                        |  3 +--
>  common/init/handoff.c                 | 33 +++++++++++----------------
>  drivers/pci/pci-uclass.c              | 18 ++-------------
>  include/asm-generic/u-boot.h          |  2 --
>  include/handoff.h                     |  2 --
>  lib/fdtdec.c                          |  5 ----
>  lib/lmb.c                             |  9 ++------
>  11 files changed, 19 insertions(+), 66 deletions(-)
>

Reviewed-by: Bin Meng <bmeng.cn at gmail.com>


More information about the U-Boot mailing list