Attention is currently required from: Anil Kumar K, Paul Menzel, Andrey Petrov, Patrick Rudolph. Tim Wawrzynczak has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/59638 )
Change subject: [WIP] drivers/intel/fsp2_0: Add support for FSP_NON_VOLATILE_STORAGE_HOB2 ......................................................................
Patch Set 17:
(1 comment)
File src/drivers/intel/fsp2_0/hand_off_block.c:
https://review.coreboot.org/c/coreboot/+/59638/comment/0d9d5817_71d1839b PS17, Line 316: if (CONFIG(PLATFORM_USES_FSP2_3)) { : union { : const struct fsp_nvs_hob2_data_region_header *hob; : const void *hob_descr; : } hob_walker; : hob_walker.hob = (const struct fsp_nvs_hob2_data_region_header *) : fsp_find_extension_hob_by_guid(fsp_nv_storage_guid_2, size); : if (hob_walker.hob != NULL) { : *size = hob_walker.hob->nvs_data_length; : return hob_walker.hob_descr; : } : } else { : return fsp_find_extension_hob_by_guid(fsp_nv_storage_guid, size); : } I might return early just to avoid an extra indent, e.g.:
``` if (!CONFIG(PLATFORM_USES_FSP2_3)) return fsp_find_extension_hob_by_guid(fsp_nv_storage_guid, size);
union { const struct fsp_nvs_hob2_data_region_header *hob; const void *hob_descr; } hob_walker; hob_walker.hob = (const struct fsp_nvs_hob2_data_region_header *) fsp_find_extension_hob_by_guid(fsp_nv_storage_guid_2, size);
if (hob_walker.hob != NULL) { *size = hob_walker.hob->nvs_data_length; return hob_walker.hob_descr; }
return NULL; ```