[coreboot-gerrit] Patch set updated for coreboot: chromeos: vboot_common: Avoid code duplication when grabbing the handoff info
Paul Kocialkowski (contact@paulk.fr)
gerrit at coreboot.org
Wed Sep 16 16:41:25 CET 2015
Paul Kocialkowski (contact at paulk.fr) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/11498
-gerrit
commit ddbc045690b1ec2a7fade5df0d6e435b32daf236
Author: Paul Kocialkowski <contact at paulk.fr>
Date: Thu Sep 3 11:44:56 2015 +0200
chromeos: vboot_common: Avoid code duplication when grabbing the handoff info
vboot_handoff_flag was duplicating the logic to grab the handoff info, that is
already made available with vboot_get_handoff_info.
This uses vboot_get_handoff_info in vboot_handoff_flag instead.
Change-Id: I28f1decce98f988f90c446a3a0dbe7409d714527
Signed-off-by: Paul Kocialkowski <contact at paulk.fr>
---
src/vendorcode/google/chromeos/vboot_common.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/src/vendorcode/google/chromeos/vboot_common.c b/src/vendorcode/google/chromeos/vboot_common.c
index 1c216d0..9ef2e0b 100644
--- a/src/vendorcode/google/chromeos/vboot_common.c
+++ b/src/vendorcode/google/chromeos/vboot_common.c
@@ -57,11 +57,13 @@ int vboot_get_handoff_info(void **addr, uint32_t *size)
static int vboot_handoff_flag(uint32_t flag)
{
- struct vboot_handoff *vbho;
+ struct vboot_handoff *vbho = NULL;
+ uint32_t size = 0;
+ int ret;
- vbho = cbmem_find(CBMEM_ID_VBOOT_HANDOFF);
+ ret = vboot_get_handoff_info((void **)&vbho, &size);
- if (vbho == NULL)
+ if (ret)
return 0;
return !!(vbho->init_params.out_flags & flag);
More information about the coreboot-gerrit
mailing list