[PATCH] imx8: Correct the SCU API return value check

Fabio Estevam festevam at gmail.com
Tue Oct 8 16:56:21 CEST 2024


On Sat, Oct 5, 2024 at 9:01 PM Peng Fan (OSS) <peng.fan at oss.nxp.com> wrote:
>
> From: Peng Fan <peng.fan at nxp.com>
>
> The SCU API alrdeay has been converted to return Linux error code,
> using SCU error code is not correct here, although SC_ERR_NONE is value
> as 0.
>
> Signed-off-by: Peng Fan <peng.fan at nxp.com>

This causes the following build failure:

aarch64: + colibri-imx8x
304+WARNING 'mx8qx-ahab-container.img' not found, resulting binary is
not-functional
305+arch/arm/mach-imx/imx8/cpu.c: In function 'arch_auxiliary_core_up':
306+arch/arm/mach-imx/imx8/cpu.c:249:9: error: 'ret' undeclared (first
use in this function)
307+ 249 | ret = sc_pm_set_resource_power_mode(-1, core_rsrc, SC_PM_PW_MODE_ON);
308+ | ^~~
309+arch/arm/mach-imx/imx8/cpu.c:249:9: note: each undeclared
identifier is reported only once for each function it appears in
310+arch/arm/mach-imx/imx8/cpu.c:262:84: error: expected ';' before 'if'
311+ 262 | ret = sc_pm_clock_enable(-1, core_rsrc, SC_PM_CLK_PER, true, false)
312+ | ^
313+ | ;
314+ 263 | if (ret) {
315+ | ~~
316+arch/arm/mach-imx/imx8/cpu.c:260:37: error: unused variable 'pd'
[-Werror=unused-variable]
317+ 260 | struct power_domain pd;
318+ | ^~
319+cc1: all warnings being treated as errors
320+make[3]: *** [scripts/Makefile.build:257:
arch/arm/mach-imx/imx8/cpu.o] Error 1
321+make[2]: *** [scripts/Makefile.build:398: arch/arm/mach-imx/imx8] Error 2
322+make[1]: *** [Makefile:1907: arch/arm/mach-imx] Error 2
323+make: *** [Makefile:177: sub-make] Error 2

Please make sure to run the patches through CI.


More information about the U-Boot mailing list