diff options
author | Felix Held <felix-coreboot@felixheld.de> | 2024-01-05 19:16:48 +0100 |
---|---|---|
committer | Felix Held <felix-coreboot@felixheld.de> | 2024-01-10 14:40:25 +0000 |
commit | 21710ea3cdff6de647a1f507f1e50bf382c2cf14 (patch) | |
tree | 4425c59682c3e36a164e42ea23d084484bc996c2 /src/cpu/x86 | |
parent | c4e14c2929c9b510c05ac7e54a9d0c441056f5e5 (diff) |
cpu/x86/smi_trigger: use enum cb_err as apm_control return type
Even though the return value from apm_control isn't checked at any of
its call sites, using the cb_err enum instead of an integer as return
type makes it clearer what the returned value means.
Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: I07ced74cae915df52a9d439835b84237d51fdd11
Reviewed-on: https://review.coreboot.org/c/coreboot/+/79835
Reviewed-by: Jérémy Compostella <jeremy.compostella@intel.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Eric Lai <ericllai@google.com>
Reviewed-by: Matt DeVillier <matt.devillier@amd.corp-partner.google.com>
Diffstat (limited to 'src/cpu/x86')
-rw-r--r-- | src/cpu/x86/smi_trigger.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/cpu/x86/smi_trigger.c b/src/cpu/x86/smi_trigger.c index 9781642c74..5c63b9e92a 100644 --- a/src/cpu/x86/smi_trigger.c +++ b/src/cpu/x86/smi_trigger.c @@ -29,11 +29,11 @@ static void apmc_log(const char *fn, u8 cmd) } } -int apm_control(u8 cmd) +enum cb_err apm_control(u8 cmd) { /* Never proceed inside SMI handler or without one. */ if (ENV_SMM || !CONFIG(HAVE_SMI_HANDLER)) - return -1; + return CB_ERR; apmc_log(__func__, cmd); @@ -41,7 +41,7 @@ int apm_control(u8 cmd) outb(cmd, pm_acpi_smi_cmd_port()); printk(BIOS_DEBUG, "APMC done.\n"); - return 0; + return CB_SUCCESS; } u8 apm_get_apmc(void) |