]> git.kernelconcepts.de Git - karo-tx-uboot.git/commit
common/board_f: implement type casting for gd structure
authorAlexey Brodkin <Alexey.Brodkin@synopsys.com>
Wed, 25 Feb 2015 14:59:02 +0000 (17:59 +0300)
committerLothar Waßmann <LW@KARO-electronics.de>
Tue, 1 Sep 2015 12:24:12 +0000 (14:24 +0200)
commit9325d5d01aa8df55f955065a24a6526b06a90d61
tree9f1c6d0060bcccea99bd1291d6831c86f5fdb9f2
parentb5a51678e57156d7da26ecb46aa6fe24388b81e2
common/board_f: implement type casting for gd structure

In case of global data structure defined as "register volatile" compiler
throws an warning about incorrect type used:
 --->8---
 common/board_f.c: In function "board_init_f_r":
 common/board_f.c:1073:2: warning: passing argument 1 of "&board_init_r
 +(sizetype)gd->reloc_off" discards "volatile" qualifier from pointer
 target type [enabled by default]
  (board_init_r + gd->reloc_off)(gd, gd->relocaddr);
  ^
 common/board_f.c:1073:2: note: expected "struct gd_t *" but argument is
 of type "volatile struct gd_t *"
 --->8---

An obvious fix is manual casting to "gd_t *".

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: Tom Rini <trini@ti.com>
Acked-by: Simon Glass <sjg@chromium.org>
common/board_f.c