ARM: uniphier: clean-up ft_board_setup()
authorMasahiro Yamada <yamada.masahiro@socionext.com>
Thu, 19 Jul 2018 07:28:24 +0000 (16:28 +0900)
committerMasahiro Yamada <yamada.masahiro@socionext.com>
Tue, 24 Jul 2018 23:47:53 +0000 (08:47 +0900)
The 'bd' is passed in ft_board_setup() as the second argument.
Replace 'gd->bd' with 'bd'.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
arch/arm/mach-uniphier/dram_init.c

index 2eb4836256e23a6256d7fb75311e8b31b363cff3..8aa3f81cfc2342a2865c549469750e93bb3fc4c9 100644 (file)
@@ -279,11 +279,11 @@ int ft_board_setup(void *fdt, bd_t *bd)
        if (uniphier_get_soc_id() != UNIPHIER_LD20_ID)
                return 0;
 
-       for (i = 0; i < ARRAY_SIZE(gd->bd->bi_dram); i++) {
-               if (!gd->bd->bi_dram[i].size)
+       for (i = 0; i < ARRAY_SIZE(bd->bi_dram); i++) {
+               if (!bd->bi_dram[i].size)
                        continue;
 
-               rsv_addr = gd->bd->bi_dram[i].start + gd->bd->bi_dram[i].size;
+               rsv_addr = bd->bi_dram[i].start + bd->bi_dram[i].size;
                rsv_addr -= rsv_size;
 
                ret = fdt_add_mem_rsv(fdt, rsv_addr, rsv_size);