Felix Held has submitted this change. ( https://review.coreboot.org/c/coreboot/+/82210?usp=email )
Change subject: soc/intel/xeon_sp/spr: Refine return value checks ......................................................................
soc/intel/xeon_sp/spr: Refine return value checks
mp_init_with_smm returns cb_err type, where 0 means success and negative values represent error (see cb_err.h).
However, failure checks in form of "ret < 0" is not straightforward. Use "ret != CB_SUCCESS" instead.
Change-Id: I7e57f2da0361f3109051e9a35b1cce81d559b261 Signed-off-by: Shuo Liu shuo.liu@intel.com Reviewed-on: https://review.coreboot.org/c/coreboot/+/82210 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Felix Held felix-coreboot@felixheld.de Reviewed-by: Angel Pons th3fanbus@gmail.com Reviewed-by: Lean Sheng Tan sheng.tan@9elements.com --- M src/soc/intel/xeon_sp/spr/cpu.c 1 file changed, 1 insertion(+), 1 deletion(-)
Approvals: Felix Held: Looks good to me, approved build bot (Jenkins): Verified Angel Pons: Looks good to me, approved Lean Sheng Tan: Looks good to me, approved
diff --git a/src/soc/intel/xeon_sp/spr/cpu.c b/src/soc/intel/xeon_sp/spr/cpu.c index ffd30b8..ad099ab 100644 --- a/src/soc/intel/xeon_sp/spr/cpu.c +++ b/src/soc/intel/xeon_sp/spr/cpu.c @@ -271,6 +271,6 @@ intel_microcode_load_unlocked(microcode_patch);
enum cb_err ret = mp_init_with_smm(bus, &mp_ops); - if (ret < 0) + if (ret != CB_SUCCESS) printk(BIOS_ERR, "MP initialization failure %d.\n", ret); }