From: Masahiro Yamada Date: Mon, 20 Jan 2014 19:05:55 +0900 Subject: [U-Boot] [PATCH v2] board_r - fixup functions table after relocation In-Reply-To: <1390211139-8628-1-git-send-email-abrodkin@synopsys.com> References: <1390211139-8628-1-git-send-email-abrodkin@synopsys.com> Message-ID: <20140120190554.3273.AA925319@jp.panasonic.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hello Alexey, > diff --git a/common/board_r.c b/common/board_r.c > index 86ca1cb..3462590 100644 > --- a/common/board_r.c > +++ b/common/board_r.c > @@ -903,9 +903,16 @@ init_fnc_t init_sequence_r[] = { > > void board_init_r(gd_t *new_gd, ulong dest_addr) > { > + int i; This emits a warning if CONFIG_NEED_MANUAL_RELOC is not defined. For example, arndale board: board_r.c: In function 'board_init_r': board_r.c:906:6: warning: unused variable 'i' [-Wunused-variable] > #ifndef CONFIG_X86 > gd = new_gd; > #endif > + > +#ifdef CONFIG_NEEDS_MANUAL_RELOC > + for (i = 0; i < sizeof(init_sequence_r)/sizeof(void *); i++) > + init_sequence_r[i] += gd->reloc_off; > +#endif > + Please use ARRAY_SIZE as Simon suggested. Best Regards Masahiro Yamada