Message ID | 20200411085709.328059-1-xypron.glpk@gmx.de |
---|---|
State | Accepted |
Commit | 3460a6bba1dfeb48e6006a73c1aa9a6ba53a526b |
Headers | show |
Series | [1/1] board: fsl: lx2160a: unused variable gic_lpi_base | expand |
>-----Original Message----- >From: U-Boot <u-boot-bounces at lists.denx.de> On Behalf Of Heinrich >Schuchardt >Sent: Saturday, April 11, 2020 2:27 PM >To: Priyanka Jain <priyanka.jain at nxp.com> >Cc: u-boot at lists.denx.de; Ilias Apalodimas <ilias.apalodimas at linaro.org>; >Heinrich Schuchardt <xypron.glpk at gmx.de> >Subject: [PATCH 1/1] board: fsl: lx2160a: unused variable gic_lpi_base > >If the board is configured without CONFIG_GIC_V3_ITS, an error occurs: > >board/freescale/lx2160a/lx2160a.c: In function ?ft_board_setup?: >board/freescale/lx2160a/lx2160a.c:673:6: error: unused variable >?gic_lpi_base? [-Werror=unused-variable] > 673 | u64 gic_lpi_base; > | ^~~~~~~~~~~~ > >Let's define the variable as __maybe_unused. > >Signed-off-by: Heinrich Schuchardt <xypron.glpk at gmx.de> >--- Applied to fsl-qoriq. Awaiting upstream. Thanks Priyanka
diff --git a/board/freescale/lx2160a/lx2160a.c b/board/freescale/lx2160a/lx2160a.c index 4b20bb440f..23ea1b6f16 100644 --- a/board/freescale/lx2160a/lx2160a.c +++ b/board/freescale/lx2160a/lx2160a.c @@ -670,7 +670,7 @@ int ft_board_setup(void *blob, bd_t *bd) u64 mc_memory_base = 0; u64 mc_memory_size = 0; u16 total_memory_banks; - u64 gic_lpi_base; + u64 __maybe_unused gic_lpi_base; ft_cpu_setup(blob, bd);
If the board is configured without CONFIG_GIC_V3_ITS, an error occurs: board/freescale/lx2160a/lx2160a.c: In function ?ft_board_setup?: board/freescale/lx2160a/lx2160a.c:673:6: error: unused variable ?gic_lpi_base? [-Werror=unused-variable] 673 | u64 gic_lpi_base; | ^~~~~~~~~~~~ Let's define the variable as __maybe_unused. Signed-off-by: Heinrich Schuchardt <xypron.glpk at gmx.de> --- board/freescale/lx2160a/lx2160a.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.25.1