soc/amd/common/block/acpi/ivrs: use size of instance instead of type
To determine the length parameter of memset, use sizeof with the instance as argument instead of the type. The behavior is the same, but it clarifies parameters in the memset call a bit. Signed-off-by: Felix Held <felix-coreboot@felixheld.de> Change-Id: I63674fbed7097a583cd77fa6e700652d6dcc5565 Reviewed-on: https://review.coreboot.org/c/coreboot/+/76078 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Fred Reitberger <reitbergerfred@gmail.com>
This commit is contained in:
parent
50cbb933a3
commit
8cbafe8723
1 changed files with 2 additions and 2 deletions
|
@ -203,7 +203,7 @@ static unsigned long acpi_fill_ivrs40(unsigned long current, acpi_ivrs_ivhd_t *i
|
|||
acpi_ivrs_ivhd40_t *ivhd_40 = (acpi_ivrs_ivhd40_t *)current;
|
||||
unsigned long current_backup;
|
||||
|
||||
memset(ivhd_40, 0, sizeof(acpi_ivrs_ivhd40_t));
|
||||
memset(ivhd_40, 0, sizeof(*ivhd_40));
|
||||
|
||||
/* Enable EFR */
|
||||
ivhd_40->type = IVHD_BLOCK_TYPE_FULL__ACPI_HID;
|
||||
|
@ -260,7 +260,7 @@ static unsigned long acpi_fill_ivrs11(unsigned long current, acpi_ivrs_ivhd_t *i
|
|||
* In order to utilize all features, firmware should expose type 11h
|
||||
* IVHD which supersedes the type 10h.
|
||||
*/
|
||||
memset(ivhd_11, 0, sizeof(acpi_ivrs_ivhd11_t));
|
||||
memset(ivhd_11, 0, sizeof(*ivhd_11));
|
||||
|
||||
/* Enable EFR */
|
||||
ivhd_11->type = IVHD_BLOCK_TYPE_FULL__FIXED;
|
||||
|
|
Loading…
Reference in a new issue