Commit 696f41ec authored by Sandrine Bailleux's avatar Sandrine Bailleux
Browse files

Fix compilation warning in Trusty SPD



In release builds, the Trusty SPD fails to build because of an unused
variable. Note that this warning message doesn't show in debug builds
because INFO() messages are not compiled out like in release mode.

This patch fixes this issue by removing this variable and using its
value in place directly in the INFO() macro call.

Change-Id: I1f552421181a09412315eef4eaca586012022018
Signed-off-by: default avatarSandrine Bailleux <sandrine.bailleux@arm.com>
parent 5c0df525
...@@ -270,24 +270,22 @@ static int32_t trusty_init(void) ...@@ -270,24 +270,22 @@ static int32_t trusty_init(void)
static void trusty_cpu_suspend(void) static void trusty_cpu_suspend(void)
{ {
struct args ret; struct args ret;
unsigned int linear_id = plat_my_core_pos();
ret = trusty_context_switch(NON_SECURE, SMC_FC_CPU_SUSPEND, 0, 0, 0); ret = trusty_context_switch(NON_SECURE, SMC_FC_CPU_SUSPEND, 0, 0, 0);
if (ret.r0 != 0) { if (ret.r0 != 0) {
INFO("%s: cpu %d, SMC_FC_CPU_SUSPEND returned unexpected value, %ld\n", INFO("%s: cpu %d, SMC_FC_CPU_SUSPEND returned unexpected value, %ld\n",
__func__, linear_id, ret.r0); __func__, plat_my_core_pos(), ret.r0);
} }
} }
static void trusty_cpu_resume(void) static void trusty_cpu_resume(void)
{ {
struct args ret; struct args ret;
unsigned int linear_id = plat_my_core_pos();
ret = trusty_context_switch(NON_SECURE, SMC_FC_CPU_RESUME, 0, 0, 0); ret = trusty_context_switch(NON_SECURE, SMC_FC_CPU_RESUME, 0, 0, 0);
if (ret.r0 != 0) { if (ret.r0 != 0) {
INFO("%s: cpu %d, SMC_FC_CPU_RESUME returned unexpected value, %ld\n", INFO("%s: cpu %d, SMC_FC_CPU_RESUME returned unexpected value, %ld\n",
__func__, linear_id, ret.r0); __func__, plat_my_core_pos(), ret.r0);
} }
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment