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>
diff --git a/src/soc/amd/common/block/acpi/ivrs.c b/src/soc/amd/common/block/acpi/ivrs.c
index d5a409f..71b9c62 100644
--- a/src/soc/amd/common/block/acpi/ivrs.c
+++ b/src/soc/amd/common/block/acpi/ivrs.c
@@ -203,7 +203,7 @@
 	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 @@
 	 * 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;