]> git.baikalelectronics.ru Git - arm-tf.git/commit
fix(rk3399): explicitly define the sys_sleep_flag_sram type
authorScott Parlane <scott@parlanenz.com>
Mon, 5 Sep 2022 22:59:57 +0000 (10:59 +1200)
committerScott Parlane <scott@parlanenz.com>
Tue, 11 Oct 2022 21:31:03 +0000 (10:31 +1300)
commit7a5e90a89d91d6662d3e468893e07c91b3a165ee
treefad5bf3b236bbae4c7738a114b3405bdd5224efa
parent402d2316c8a959dc011b5775970a6677edb20b17
fix(rk3399): explicitly define the sys_sleep_flag_sram type

Recent GCC versions now do array-bounds checking which fails for
sys_sleep_flag_sram because the struct is larger than the 8-bytes
size that (void *) is

This variable is only used in one place as the struct,
so it can be defined with the struct type.

Resolves:
plat/rockchip/px30/drivers/pmu/pmu.c: In function 'rockchip_soc_sys_pwr_dm_suspend':
plat/rockchip/px30/drivers/pmu/pmu.c:977:23: error: array subscript 'struct psram_data_t[0]' is partly outside array bounds of 'void[8]' [-Werror=array-bounds]
  977 |         psram_boot_cfg->pm_flag &= ~PM_WARM_BOOT_BIT;

Change-Id: Ifbe42d11d0c7875f6cb23dc0b7ffb3f3f90c55a8
Signed-off-by: Scott Parlane <scott@parlanenz.com>
plat/rockchip/common/pmusram/cpus_on_fixed_addr.h