Attention is currently required from: Lee Leahy. Patrick Rudolph has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/63017 )
Change subject: drivers/fsp1_1: Fix more strict-aliasing rules errors ......................................................................
drivers/fsp1_1: Fix more strict-aliasing rules errors
Change-Id: If774ae6338dbb1ee2778d8c93cbb1868c61b1874 Signed-off-by: Patrick Rudolph patrick.rudolph@9elements.com --- M src/drivers/intel/fsp1_1/hob.c 1 file changed, 9 insertions(+), 9 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/17/63017/1
diff --git a/src/drivers/intel/fsp1_1/hob.c b/src/drivers/intel/fsp1_1/hob.c index 076dd5f..54056a8 100644 --- a/src/drivers/intel/fsp1_1/hob.c +++ b/src/drivers/intel/fsp1_1/hob.c @@ -26,20 +26,20 @@ /* Returns the next instance of a HOB type from the starting HOB. */ void *get_next_hob(uint16_t type, const void *hob_start) { - EFI_PEI_HOB_POINTERS hob; + EFI_HOB_GENERIC_HEADER *hdr;
if (!hob_start) return NULL;
- hob.Raw = (UINT8 *)hob_start; + hdr = (EFI_HOB_GENERIC_HEADER *)hob_start;
/* Parse the HOB list until end of list or matching type is found. */ - while (!END_OF_HOB_LIST(hob.Raw)) { - if (hob.Header->HobType == type) - return hob.Raw; - if (GET_HOB_LENGTH(hob.Raw) < sizeof(*hob.Header)) + while (!END_OF_HOB_LIST(hdr)) { + if (hdr->HobType == type) + return (void *)hdr; + if (GET_HOB_LENGTH(hdr) < sizeof(*hdr)) break; - hob.Raw = GET_NEXT_HOB(hob.Raw); + hdr = GET_NEXT_HOB(hdr); } return NULL; } @@ -60,7 +60,7 @@ != NULL) { if (compare_guid(guid, &hob.Guid->Name)) break; - hob.Raw = GET_NEXT_HOB(hob.Raw); + hob.Raw = GET_NEXT_HOB(hob.Header); } return hob.Raw; } @@ -85,7 +85,7 @@ hob.Raw)) != NULL) { if (compare_guid(guid, &hob.ResourceDescriptor->Owner)) break; - hob.Raw = GET_NEXT_HOB(hob.Raw); + hob.Raw = GET_NEXT_HOB(hob.Header); } return hob.Raw; }