From e0fc2d1907b1c8a062c44a435be77a12ffeed84b Mon Sep 17 00:00:00 2001 From: "Abdul Halim, Muhammad Hadi Asyrafi" Date: Fri, 20 Nov 2020 11:06:00 +0800 Subject: [PATCH] fix(intel): use macro as return value SMC function should strictly return INTEL_SIP_SMC_STATUS macro. Directly returning value of variable status might cause confusion in calling software. Signed-off-by: Abdul Halim, Muhammad Hadi Asyrafi Change-Id: Iea17f4feaa5c917e8b995471f3019dba6ea8dcd3 Signed-off-by: Jit Loon Lim --- plat/intel/soc/common/socfpga_sip_svc.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/plat/intel/soc/common/socfpga_sip_svc.c b/plat/intel/soc/common/socfpga_sip_svc.c index de47e05f7..77b91b284 100644 --- a/plat/intel/soc/common/socfpga_sip_svc.c +++ b/plat/intel/soc/common/socfpga_sip_svc.c @@ -211,8 +211,9 @@ static int intel_fpga_config_start(uint32_t type) status = mailbox_send_cmd(MBOX_JOB_ID, MBOX_RECONFIG, &argument, size, CMD_CASUAL, response, &resp_len); - if (status < 0) - return status; + if (status < 0) { + return INTEL_SIP_SMC_STATUS_ERROR; + } max_blocks = response[0]; bytes_per_block = response[1]; @@ -237,7 +238,7 @@ static int intel_fpga_config_start(uint32_t type) socfpga_bridges_disable(); } - return 0; + return INTEL_SIP_SMC_STATUS_OK; } static bool is_fpga_config_buffer_full(void)