[PATCH 2/2] lib: acpi: add a marco to fwts_acpi_reserved_zero_check

Alex Hung alex.hung at canonical.com
Wed Jan 27 20:17:13 UTC 2021


Reduce two args needed for the original function.

Signed-off-by: Alex Hung <alex.hung at canonical.com>
---
 src/acpi/asf/asf.c                  |  8 ++++----
 src/acpi/cpep/cpep.c                |  2 +-
 src/acpi/dbg2/dbg2.c                |  2 +-
 src/acpi/dbgp/dbgp.c                |  2 +-
 src/acpi/einj/einj.c                |  4 ++--
 src/acpi/erst/erst.c                |  2 +-
 src/acpi/facs/facs.c                |  2 +-
 src/acpi/fpdt/fpdt.c                |  4 ++--
 src/acpi/hest/hest.c                | 22 +++++++++++-----------
 src/acpi/hmat/hmat.c                | 26 +++++++++++++-------------
 src/acpi/iort/iort.c                |  5 ++---
 src/acpi/lpit/lpit.c                |  2 +-
 src/acpi/mpst/mpst.c                | 12 ++++++------
 src/acpi/msdm/msdm.c                |  4 ++--
 src/acpi/nfit/nfit.c                |  6 +++---
 src/acpi/pcct/pcct.c                |  2 +-
 src/acpi/pdtt/pdtt.c                |  2 +-
 src/acpi/pmtt/pmtt.c                | 12 ++++++------
 src/acpi/pptt/pptt.c                |  6 +++---
 src/acpi/rsdp/rsdp.c                |  2 +-
 src/acpi/spcr/spcr.c                |  6 +++---
 src/acpi/spmi/spmi.c                |  2 +-
 src/acpi/srat/srat.c                |  8 ++++----
 src/acpi/tcpa/tcpa.c                |  6 +++---
 src/acpi/tpm2/tpm2.c                |  2 +-
 src/lib/include/fwts_acpi_tables.h  |  5 ++++-
 src/lib/src/fwts_acpi_object_eval.c | 18 +++++++++---------
 src/lib/src/fwts_acpi_tables.c      |  4 ++--
 28 files changed, 90 insertions(+), 88 deletions(-)

diff --git a/src/acpi/asf/asf.c b/src/acpi/asf/asf.c
index 61369808..f660ca28 100644
--- a/src/acpi/asf/asf.c
+++ b/src/acpi/asf/asf.c
@@ -97,9 +97,9 @@ static void asf_check_info(
 	}
 
 	fwts_acpi_reserved_bits_check("ASF!", "ASF_INFO Feature Flags", info->flags, 1, 7, passed);
-	fwts_acpi_reserved_zero_check(fw, "ASF!", "ASF_INFO Reserved1", info->reserved1, sizeof(info->reserved1), passed);
-	fwts_acpi_reserved_zero_check(fw, "ASF!", "ASF_INFO Reserved2", info->reserved2, sizeof(info->reserved2), passed);
-	fwts_acpi_reserved_zero_check(fw, "ASF!", "ASF_INFO Reserved3", info->reserved3, sizeof(info->reserved3), passed);
+	fwts_acpi_reserved_zero_check("ASF!", "ASF_INFO Reserved1", info->reserved1, passed);
+	fwts_acpi_reserved_zero_check("ASF!", "ASF_INFO Reserved2", info->reserved2, passed);
+	fwts_acpi_reserved_zero_check("ASF!", "ASF_INFO Reserved3", info->reserved3, passed);
 
 	if (*passed)
 		fwts_passed(fw, "No issues found in ASF! ASF_INFO record.");
@@ -457,7 +457,7 @@ static int asf_test1(fwts_framework *fw)
 		fwts_log_info_verbatim(fw, "Length:                     0x%4.4" PRIx16, asf_hdr->length);
 #endif
 
-		fwts_acpi_reserved_zero_check(fw, "ASF!", "Information Record Reserved", asf_hdr->reserved, sizeof(asf_hdr->reserved), &passed);
+		fwts_acpi_reserved_zero_check("ASF!", "Information Record Reserved", asf_hdr->reserved, &passed);
 
 		if (asf_hdr->length > (uint32_t)length) {
 			passed = false;
diff --git a/src/acpi/cpep/cpep.c b/src/acpi/cpep/cpep.c
index 558f8ce2..3eaacf7d 100644
--- a/src/acpi/cpep/cpep.c
+++ b/src/acpi/cpep/cpep.c
@@ -51,7 +51,7 @@ static int cpep_test1(fwts_framework *fw)
 		   ((uint64_t) cpep->reserved[2] << 16) + ((uint64_t) cpep->reserved[3] << 24) +
 		   ((uint64_t) cpep->reserved[4] << 32) + ((uint64_t) cpep->reserved[5] << 40) +
 		   ((uint64_t) cpep->reserved[6] << 48) + ((uint64_t) cpep->reserved[7] << 56);
-	fwts_acpi_reserved_zero_check(fw, "CPEP", "Reserved", reserved, sizeof(reserved), &passed);
+	fwts_acpi_reserved_zero_check("CPEP", "Reserved", reserved, &passed);
 
 	n = (table->length - sizeof(fwts_acpi_table_cpep)) /
 		sizeof(fwts_acpi_cpep_processor_info);
diff --git a/src/acpi/dbg2/dbg2.c b/src/acpi/dbg2/dbg2.c
index 443cfd87..b36c60ac 100644
--- a/src/acpi/dbg2/dbg2.c
+++ b/src/acpi/dbg2/dbg2.c
@@ -279,7 +279,7 @@ static int dbg2_test1(fwts_framework *fw)
 				info->port_subtype);
 		}
 
-		fwts_acpi_reserved_zero_check(fw, "DBG2", "Info Structure Reserved", info->reserved, sizeof(info->reserved), &passed);
+		fwts_acpi_reserved_zero_check("DBG2", "Info Structure Reserved", info->reserved, &passed);
 
 		length_ok = true;
 		dbg2_check_offset(fw, table->length, offset + info->length,
diff --git a/src/acpi/dbgp/dbgp.c b/src/acpi/dbgp/dbgp.c
index 85025e90..15c992a0 100644
--- a/src/acpi/dbgp/dbgp.c
+++ b/src/acpi/dbgp/dbgp.c
@@ -82,7 +82,7 @@ static int dbgp_test1(fwts_framework *fw)
 			dbgp->interface_type);
 	}
 
-	fwts_acpi_reserved_zero_check(fw, "DBGP", "Reserved", reserved, sizeof(reserved), &passed);
+	fwts_acpi_reserved_zero_check("DBGP", "Reserved", reserved, &passed);
 
 	if (dbgp->base_address.register_bit_width == 0) {
 		passed = false;
diff --git a/src/acpi/einj/einj.c b/src/acpi/einj/einj.c
index 415d0cec..414de501 100644
--- a/src/acpi/einj/einj.c
+++ b/src/acpi/einj/einj.c
@@ -48,7 +48,7 @@ static int einj_test1(fwts_framework *fw)
 	fwts_log_info_simp_int(fw, "  Injection Entry Count: ", einj->count);
 
 	fwts_acpi_reserved_bits_check("EINJ", "Injection Flags", einj->flags, 0, 31, &passed);
-	fwts_acpi_reserved_zero_check(fw, "EINJ", "Reserved", reserved, sizeof(reserved), &passed);
+	fwts_acpi_reserved_zero_check("EINJ", "Reserved", reserved, &passed);
 
 	fwts_log_nl(fw);
 
@@ -99,7 +99,7 @@ static int einj_test1(fwts_framework *fw)
 			passed = false;
 		}
 
-		fwts_acpi_reserved_zero_check(fw, "EINJ", "Reserved", entry->reserved, sizeof(entry->reserved), &passed);
+		fwts_acpi_reserved_zero_check("EINJ", "Reserved", entry->reserved, &passed);
 		fwts_acpi_space_id_check(fw, "EINJ", "Register Region", &passed, gas.address_space_id, 2,
 					 FWTS_GAS_ADDR_SPACE_ID_SYSTEM_MEMORY, FWTS_GAS_ADDR_SPACE_ID_SYSTEM_IO);
 
diff --git a/src/acpi/erst/erst.c b/src/acpi/erst/erst.c
index 3a03090c..9e6480c6 100644
--- a/src/acpi/erst/erst.c
+++ b/src/acpi/erst/erst.c
@@ -44,7 +44,7 @@ static int erst_test1(fwts_framework *fw)
 	fwts_log_info_simp_int(fw, "  Reserved:                 ", erst->reserved);
 	fwts_log_info_simp_int(fw, "  Instruction Entry Count:  ", erst->instruction_entry_count);
 
-	fwts_acpi_reserved_zero_check(fw, "ERST", "Reserved", erst->reserved, sizeof(erst->reserved), &passed);
+	fwts_acpi_reserved_zero_check("ERST", "Reserved", erst->reserved, &passed);
 
 	if (erst->serialization_header_size > table->length) {
 		passed = false;
diff --git a/src/acpi/facs/facs.c b/src/acpi/facs/facs.c
index ac8d79b2..3dbc92d6 100644
--- a/src/acpi/facs/facs.c
+++ b/src/acpi/facs/facs.c
@@ -114,7 +114,7 @@ static int facs_test1(fwts_framework *fw)
 			facs->length);
 	}
 
-	fwts_acpi_reserved_zero_check(fw, "FACS", "Reserved", reserved, sizeof(reserved), &passed);
+	fwts_acpi_reserved_zero_check("FACS", "Reserved", reserved, &passed);
 	fwts_acpi_reserved_bits_check("FACS", "Flags", facs->flags, 2, 31, &passed);
 	fwts_acpi_reserved_bits_check("FACS", "OSPM Flags", facs->ospm_flags, 1, 31, &passed);
 
diff --git a/src/acpi/fpdt/fpdt.c b/src/acpi/fpdt/fpdt.c
index 5a607963..074428d6 100644
--- a/src/acpi/fpdt/fpdt.c
+++ b/src/acpi/fpdt/fpdt.c
@@ -103,7 +103,7 @@ static int fpdt_test1(fwts_framework *fw)
 				fwts_log_info_simp_int(fw, "    Reserved:	", fbbpr->reserved);
 				fwts_log_info_simp_int(fw, "    FBPT Pointer:	", fbbpr->fbpt_addr);
 
-				fwts_acpi_reserved_zero_check(fw, "FPDT", "Reserved", fbbpr->reserved, sizeof(fbbpr->reserved), &passed);
+				fwts_acpi_reserved_zero_check("FPDT", "Reserved", fbbpr->reserved, &passed);
 
 				/*
 				 * For the moment, only dump the 64-bit processor-relative physical address
@@ -130,7 +130,7 @@ static int fpdt_test1(fwts_framework *fw)
 				fwts_log_info_simp_int(fw, "    Reserved:	", s3ptpr->reserved);
 				fwts_log_info_simp_int(fw, "    S3PT Pointer:	", s3ptpr->s3pt_addr);
 
-				fwts_acpi_reserved_zero_check(fw, "FPDT", "Reserved", s3ptpr->reserved, sizeof(s3ptpr->reserved), &passed);
+				fwts_acpi_reserved_zero_check("FPDT", "Reserved", s3ptpr->reserved, &passed);
 
 				/*
 				 * For the moment, only dump 64-bit processor-relative physical
diff --git a/src/acpi/hest/hest.c b/src/acpi/hest/hest.c
index 842a25c1..ae7343f4 100644
--- a/src/acpi/hest/hest.c
+++ b/src/acpi/hest/hest.c
@@ -85,7 +85,7 @@ static void hest_check_ia32_arch_machine_check_exception(
 	fwts_log_info_simp_int(fw, "  Reserved:                 ", reserved2);
 	fwts_log_nl(fw);
 
-	fwts_acpi_reserved_zero_check(fw, "HEST", "MCE Reserved1", exception->reserved1, sizeof(exception->reserved1), passed);
+	fwts_acpi_reserved_zero_check("HEST", "MCE Reserved1", exception->reserved1, passed);
 
 	if (exception->flags & ~0x5) {
 		fwts_failed(fw, LOG_LEVEL_MEDIUM,
@@ -103,7 +103,7 @@ static void hest_check_ia32_arch_machine_check_exception(
 		*passed = false;
 	}
 
-	fwts_acpi_reserved_zero_check(fw, "HEST", "MCE Reserved2", reserved2, sizeof(reserved2), passed);
+	fwts_acpi_reserved_zero_check("HEST", "MCE Reserved2", reserved2, passed);
 
 	for (i = 0; i < exception->number_of_hardware_banks; i++) {
 		fwts_acpi_table_hest_machine_check_bank *bank = &exception->bank[i];
@@ -214,7 +214,7 @@ static void hest_check_ia32_arch_corrected_machine_check(
 	fwts_log_info_simp_int(fw, "  Reserved:                 ", reserved2);
 	fwts_log_nl(fw);
 
-	fwts_acpi_reserved_zero_check(fw, "HEST", "Machine Check Reserved1", check->reserved1, sizeof(check->reserved1), passed);
+	fwts_acpi_reserved_zero_check("HEST", "Machine Check Reserved1", check->reserved1, passed);
 
 	if (check->flags & ~0x5) {
 		fwts_failed(fw, LOG_LEVEL_MEDIUM,
@@ -242,7 +242,7 @@ static void hest_check_ia32_arch_corrected_machine_check(
 			check->notification.type);
 	}
 
-	fwts_acpi_reserved_zero_check(fw, "HEST", "Machine Check Reserved2", reserved2, sizeof(reserved2), passed);
+	fwts_acpi_reserved_zero_check("HEST", "Machine Check Reserved2", reserved2, passed);
 
 	for (i = 0; i < check->number_of_hardware_banks; i++) {
 		fwts_acpi_table_hest_machine_check_bank *bank = &check->bank[i];
@@ -319,7 +319,7 @@ static void hest_check_acpi_table_hest_nmi_error(
 	fwts_log_info_simp_int(fw, "  Max Raw Data Length:      ", err->max_raw_data_length);
 	fwts_log_nl(fw);
 
-	fwts_acpi_reserved_zero_check(fw, "HEST", "NMI Reserved", err->reserved1, sizeof(err->reserved1), passed);
+	fwts_acpi_reserved_zero_check("HEST", "NMI Reserved", err->reserved1, passed);
 
 	if (err->number_of_records_to_preallocate < 1) {
 		*passed = false;
@@ -388,9 +388,9 @@ static void hest_check_pci_express_root_port_aer(
 	fwts_log_info_simp_int(fw, "  Root Error Command:       ", aer->root_error_command);
 	fwts_log_nl(fw);
 
-	fwts_acpi_reserved_zero_check(fw, "HEST", "PCI Express Root Port Reserved1", aer->reserved1, sizeof(aer->reserved1), passed);
+	fwts_acpi_reserved_zero_check("HEST", "PCI Express Root Port Reserved1", aer->reserved1, passed);
 	fwts_acpi_reserved_bits_check("HEST", "PCI Express Root Port Flags", aer->flags, 2, 7, passed);
-	fwts_acpi_reserved_zero_check(fw, "HEST", "PCI Express Root Port Reserved2", aer->reserved2, sizeof(aer->reserved2), passed);
+	fwts_acpi_reserved_zero_check("HEST", "PCI Express Root Port Reserved2", aer->reserved2, passed);
 
 	if (aer->number_of_records_to_preallocate < 1) {
 		*passed = false;
@@ -456,9 +456,9 @@ static void hest_check_pci_express_device_aer(
 	fwts_log_info_simp_int(fw, "  Advanced Capabilities:    ", aer->advanced_error_capabilities_and_control);
 	fwts_log_nl(fw);
 
-	fwts_acpi_reserved_zero_check(fw, "HEST", "PCI Express Device Reserved1", aer->reserved1, sizeof(aer->reserved1), passed);
+	fwts_acpi_reserved_zero_check("HEST", "PCI Express Device Reserved1", aer->reserved1, passed);
 	fwts_acpi_reserved_bits_check("HEST", "PCI Express Device Flags", aer->flags, 2, 7, passed);
-	fwts_acpi_reserved_zero_check(fw, "HEST", "PCI Express Device Reserved2", aer->reserved2, sizeof(aer->reserved2), passed);
+	fwts_acpi_reserved_zero_check("HEST", "PCI Express Device Reserved2", aer->reserved2, passed);
 
 	if (aer->number_of_records_to_preallocate < 1) {
 		*passed = false;
@@ -528,9 +528,9 @@ static void hest_heck_pci_express_bridge_aer(
 	fwts_log_info_simp_int(fw, "  2nd Advanced Capabilities:", aer->secondary_advanced_error_capabilities_and_control);
 	fwts_log_nl(fw);
 
-	fwts_acpi_reserved_zero_check(fw, "HEST", "PCI Express Bridge Reserved1", aer->reserved1, sizeof(aer->reserved1), passed);
+	fwts_acpi_reserved_zero_check("HEST", "PCI Express Bridge Reserved1", aer->reserved1, passed);
 	fwts_acpi_reserved_bits_check("HEST", "PCI Express Bridge Flags", aer->flags, 2, 7, passed);
-	fwts_acpi_reserved_zero_check(fw, "HEST", "PCI Express Bridge Reserved2", aer->reserved2, sizeof(aer->reserved2), passed);
+	fwts_acpi_reserved_zero_check("HEST", "PCI Express Bridge Reserved2", aer->reserved2, passed);
 
 	if (aer->number_of_records_to_preallocate < 1) {
 		*passed = false;
diff --git a/src/acpi/hmat/hmat.c b/src/acpi/hmat/hmat.c
index 71b14762..7de8b077 100644
--- a/src/acpi/hmat/hmat.c
+++ b/src/acpi/hmat/hmat.c
@@ -40,12 +40,12 @@ static void hmat_proximity_domain_test(fwts_framework *fw, const fwts_acpi_table
 	fwts_log_info_simp_int(fw, "    Reserved:                       ", entry->reserved3);
 	fwts_log_info_simp_int(fw, "    Reserved:                       ", entry->reserved4);
 
-	fwts_acpi_reserved_zero_check(fw, "HMAT", "Reserved", entry->header.reserved, sizeof(entry->header.reserved), passed);
+	fwts_acpi_reserved_zero_check("HMAT", "Reserved", entry->header.reserved, passed);
 	fwts_acpi_reserved_bits_check("HMAT", "Flags", entry->flags, 1, 15, passed);
-	fwts_acpi_reserved_zero_check(fw, "HMAT", "Reserved", entry->reserved1, sizeof(entry->reserved1), passed);
-	fwts_acpi_reserved_zero_check(fw, "HMAT", "Reserved", entry->reserved2, sizeof(entry->reserved2), passed);
-	fwts_acpi_reserved_zero_check(fw, "HMAT", "Reserved", entry->reserved3, sizeof(entry->reserved3), passed);
-	fwts_acpi_reserved_zero_check(fw, "HMAT", "Reserved", entry->reserved4, sizeof(entry->reserved4), passed);
+	fwts_acpi_reserved_zero_check("HMAT", "Reserved", entry->reserved1, passed);
+	fwts_acpi_reserved_zero_check("HMAT", "Reserved", entry->reserved2, passed);
+	fwts_acpi_reserved_zero_check("HMAT", "Reserved", entry->reserved3, passed);
+	fwts_acpi_reserved_zero_check("HMAT", "Reserved", entry->reserved4, passed);
 }
 
 static void hmat_locality_test(fwts_framework *fw, const fwts_acpi_table_hmat_locality *entry, bool *passed)
@@ -69,7 +69,7 @@ static void hmat_locality_test(fwts_framework *fw, const fwts_acpi_table_hmat_lo
 	fwts_log_info_simp_int(fw, "    Reserved:                       ", entry->reserved2);
 	fwts_log_info_simp_int(fw, "    Entry Base Unit:                ", entry->entry_base_unit);
 
-	fwts_acpi_reserved_zero_check(fw, "HMAT", "Reserved", entry->header.reserved, sizeof(entry->header.reserved), passed);
+	fwts_acpi_reserved_zero_check("HMAT", "Reserved", entry->header.reserved, passed);
 	fwts_acpi_reserved_bits_check("HMAT", "Flags", entry->flags, 6, 7, passed);
 
 	if (entry->data_type > 5) {
@@ -81,10 +81,10 @@ static void hmat_locality_test(fwts_framework *fw, const fwts_acpi_table_hmat_lo
 	}
 
 	if (fwts_get_acpi_version(fw) >= FWTS_ACPI_VERSION_64)
-		fwts_acpi_reserved_zero_check(fw, "HMAT", "Reserved", entry->reserved1, sizeof(entry->reserved1), passed);
+		fwts_acpi_reserved_zero_check("HMAT", "Reserved", entry->reserved1, passed);
 	else
-		fwts_acpi_reserved_zero_check(fw, "HMAT", "Reserved", reserved1, sizeof(reserved1), passed);
-	fwts_acpi_reserved_zero_check(fw, "HMAT", "Reserved", entry->reserved2, sizeof(entry->reserved2), passed);
+		fwts_acpi_reserved_zero_check("HMAT", "Reserved", reserved1, passed);
+	fwts_acpi_reserved_zero_check("HMAT", "Reserved", entry->reserved2, passed);
 
 	pd_size = (entry->num_initiator + entry->num_target) * 4 +
 	          (entry->num_initiator * entry->num_target * 2);
@@ -116,7 +116,7 @@ static void hmat_cache_test(fwts_framework *fw, const fwts_acpi_table_hmat_cache
 	fwts_log_info_simp_int(fw, "    Reserved:                       ", entry->reserved2);
 	fwts_log_info_simp_int(fw, "    Number of SMBIOS Handles:       ", entry->num_smbios);
 
-	fwts_acpi_reserved_zero_check(fw, "HMAT", "Reserved", entry->header.reserved, sizeof(entry->header.reserved), passed);
+	fwts_acpi_reserved_zero_check("HMAT", "Reserved", entry->header.reserved, passed);
 
 	if ((entry->cache_attr & 0xf) > 3 ||
 	   ((entry->cache_attr >> 4) & 0xf) > 3 ||
@@ -129,8 +129,8 @@ static void hmat_cache_test(fwts_framework *fw, const fwts_acpi_table_hmat_cache
 			"0x%8.8" PRIx32 " instead", entry->cache_attr);
 	}
 
-	fwts_acpi_reserved_zero_check(fw, "HMAT", "Reserved", entry->reserved1, sizeof(entry->reserved1), passed);
-	fwts_acpi_reserved_zero_check(fw, "HMAT", "Reserved", entry->reserved2, sizeof(entry->reserved2), passed);
+	fwts_acpi_reserved_zero_check("HMAT", "Reserved", entry->reserved1, passed);
+	fwts_acpi_reserved_zero_check("HMAT", "Reserved", entry->reserved2, passed);
 
 	if ((entry->header.length - sizeof(fwts_acpi_table_hmat_cache)) / 2 != entry->num_smbios) {
 		*passed = false;
@@ -152,7 +152,7 @@ static int hmat_test1(fwts_framework *fw)
 	fwts_log_info_simp_int(fw, "  Reserved:        ", hmat->reserved);
 
 
-	fwts_acpi_reserved_zero_check(fw, "HMAT", "Reserved", hmat->reserved, sizeof(hmat->reserved), &passed);
+	fwts_acpi_reserved_zero_check("HMAT", "Reserved", hmat->reserved, &passed);
 
 	entry = (fwts_acpi_table_hmat_header *) (table->data + sizeof(fwts_acpi_table_hmat));
 	offset = sizeof(fwts_acpi_table_hmat);
diff --git a/src/acpi/iort/iort.c b/src/acpi/iort/iort.c
index fc6203b1..3ee16abe 100644
--- a/src/acpi/iort/iort.c
+++ b/src/acpi/iort/iort.c
@@ -73,7 +73,7 @@ static void iort_node_check(
 	} else
 		fwts_acpi_fixed_value_check(fw, LOG_LEVEL_MEDIUM, "IORT", "IORT Node Revision", node->revision, 0, passed);
 
-	fwts_acpi_reserved_zero_check(fw, "IORT", "Node Reserved", node->reserved, sizeof(node->reserved), passed);
+	fwts_acpi_reserved_zero_check("IORT", "Node Reserved", node->reserved, passed);
 
 	if (no_id_mappings && node->id_mappings_count) {
 		*passed = false;
@@ -369,8 +369,7 @@ static void iort_memory_access_properties_check(
 	fwts_acpi_reserved_bits_check("IORT", field, properties->allocation_hints, 4, 7, passed);
 
 	snprintf(field, sizeof(field), "%s Reserved", name);
-	fwts_acpi_reserved_zero_check(fw, "IORT", field, properties->reserved,
-		sizeof(properties->reserved), passed);
+	fwts_acpi_reserved_zero_check("IORT", field, properties->reserved, passed);
 
 	snprintf(field, sizeof(field), "%s  Memory Access Flags", name);
 	fwts_acpi_reserved_bits_check("IORT", field, properties->memory_access_flags, 2, 7, passed);
diff --git a/src/acpi/lpit/lpit.c b/src/acpi/lpit/lpit.c
index 097dadb7..7e5996fd 100644
--- a/src/acpi/lpit/lpit.c
+++ b/src/acpi/lpit/lpit.c
@@ -80,7 +80,7 @@ static void lpit_check_type_0(
 	}
 	fwts_log_nl(fw);
 
-	fwts_acpi_reserved_zero_check(fw, "LPIT", "Native C-state based LPI structure reserved", lpi->reserved, sizeof(lpi->reserved), passed);
+	fwts_acpi_reserved_zero_check("LPIT", "Native C-state based LPI structure reserved", lpi->reserved, passed);
 	fwts_acpi_reserved_bits_check("LPIT", "LPI structure flags", lpi->flags, 2, 31, passed);
 
 	/* 2.2.1.2, if FFH, then it is a MSR, check GAS fields */
diff --git a/src/acpi/mpst/mpst.c b/src/acpi/mpst/mpst.c
index 4bd8f14c..3f366b54 100644
--- a/src/acpi/mpst/mpst.c
+++ b/src/acpi/mpst/mpst.c
@@ -45,13 +45,13 @@ static int mpst_test1(fwts_framework *fw)
 	fwts_log_info_simp_int(fw, "  Communication Channel ID:        ", mpst->channel_id);
 	fwts_log_info_simp_int(fw, "  Reserved:                        ", reserved);
 
-	fwts_acpi_reserved_zero_check(fw, "MPST", "Reserved", reserved, sizeof(reserved), &passed);
+	fwts_acpi_reserved_zero_check("MPST", "Reserved", reserved, &passed);
 
 	node_list = (fwts_acpi_table_mpst_power_node_list *) (table->data + sizeof(fwts_acpi_table_mpst));
 	fwts_log_info_simp_int(fw, "  Memory Power Node Count:         ", node_list->count);
 	fwts_log_info_simp_int(fw, "  Reserved:                        ", node_list->reserved);
 
-	fwts_acpi_reserved_zero_check(fw, "MPST", "Reserved", node_list->reserved, sizeof(node_list->reserved), &passed);
+	fwts_acpi_reserved_zero_check("MPST", "Reserved", node_list->reserved, &passed);
 
 	node_offset = sizeof(fwts_acpi_table_mpst) + (sizeof(fwts_acpi_table_mpst_power_node_list));
 	if (mpst->header.length < node_offset + sizeof(fwts_acpi_table_mpst_power_node) * node_list->count) {
@@ -76,7 +76,7 @@ static int mpst_test1(fwts_framework *fw)
 		fwts_log_info_simp_int(fw, "    Number of Physical Components: ", power_node->num_components);
 
 		fwts_acpi_reserved_bits_check("MPST", "Power Node Flags", power_node->flags, 3, 7, &passed);
-		fwts_acpi_reserved_zero_check(fw, "MPST", "Reserved", power_node->reserved, sizeof(power_node->reserved), &passed);
+		fwts_acpi_reserved_zero_check("MPST", "Reserved", power_node->reserved, &passed);
 
 		node_length = sizeof(fwts_acpi_table_mpst_power_node) +
 			      sizeof(fwts_acpi_table_mpst_power_state) * power_node->num_states +
@@ -123,7 +123,7 @@ static int mpst_test1(fwts_framework *fw)
 	fwts_log_info_simp_int(fw, "  Memory Characteristics Count:    ", char_list->count);
 	fwts_log_info_simp_int(fw, "  Reserved:                        ", char_list->reserved);
 
-	fwts_acpi_reserved_zero_check(fw, "MPST", "Reserved", char_list->reserved, sizeof(char_list->reserved), &passed);
+	fwts_acpi_reserved_zero_check("MPST", "Reserved", char_list->reserved, &passed);
 
 	node_offset += sizeof(fwts_acpi_table_mpst_power_char_list);
 	if (mpst->header.length < node_offset + sizeof(fwts_acpi_table_mpst_power_char) * char_list->count) {
@@ -162,8 +162,8 @@ static int mpst_test1(fwts_framework *fw)
 		}
 
 		fwts_acpi_reserved_bits_check("MPST", "Power Characteristics Flags", power_char->flags, 3, 7, &passed);
-		fwts_acpi_reserved_zero_check(fw, "MPST", "Reserved1", power_char->reserved1, sizeof(power_char->reserved1), &passed);
-		fwts_acpi_reserved_zero_check(fw, "MPST", "Reserved2", power_char->reserved2, sizeof(power_char->reserved2), &passed);
+		fwts_acpi_reserved_zero_check("MPST", "Reserved1", power_char->reserved1, &passed);
+		fwts_acpi_reserved_zero_check("MPST", "Reserved2", power_char->reserved2, &passed);
 
 		node_offset +=  sizeof(fwts_acpi_table_mpst_power_char);
 	}
diff --git a/src/acpi/msdm/msdm.c b/src/acpi/msdm/msdm.c
index 32cc64a2..d8dfc124 100644
--- a/src/acpi/msdm/msdm.c
+++ b/src/acpi/msdm/msdm.c
@@ -50,8 +50,8 @@ static int msdm_test1(fwts_framework *fw)
 	fwts_log_info_simp_int(fw, "  Data Reserved:            ", msdm->data_reserved);
 	fwts_log_info_simp_int(fw, "  Data Length:              ", msdm->data_length);
 
-	fwts_acpi_reserved_zero_check(fw, "MSDM", "Reserved", msdm->reserved, sizeof(msdm->reserved), &passed);
-	fwts_acpi_reserved_zero_check(fw, "MSDM", "Data Reserved", msdm->data_reserved, sizeof(msdm->data_reserved), &passed);
+	fwts_acpi_reserved_zero_check("MSDM", "Reserved", msdm->reserved, &passed);
+	fwts_acpi_reserved_zero_check("MSDM", "Data Reserved", msdm->data_reserved, &passed);
 
 	/* Now check table is big enough for the data payload */
 	if (table->length < sizeof(fwts_acpi_table_msdm) + msdm->data_length) {
diff --git a/src/acpi/nfit/nfit.c b/src/acpi/nfit/nfit.c
index 5c2c75fe..a819fa3e 100644
--- a/src/acpi/nfit/nfit.c
+++ b/src/acpi/nfit/nfit.c
@@ -126,7 +126,7 @@ static int nfit_test1(fwts_framework *fw)
 	fwts_log_info_simp_int(fw, "  Reserved:                 ", nfit->reserved);
 	fwts_log_nl(fw);
 
-	fwts_acpi_reserved_zero_check(fw, "NFIT", "Reserved", nfit->reserved, sizeof(nfit->reserved), &passed);
+	fwts_acpi_reserved_zero_check("NFIT", "Reserved", nfit->reserved, &passed);
 
 	offset = sizeof(fwts_acpi_table_nfit);
 	entry = (fwts_acpi_table_nfit_struct_header *)(nfit_table->data + offset);
@@ -491,7 +491,7 @@ static int nfit_test1(fwts_framework *fw)
 			fwts_log_info_simp_int(fw, "    Capabilities:                           ", nfit_struct->cap);
 			fwts_log_info_simp_int(fw, "    Reserved2:                              ", nfit_struct->reserved2);
 
-			fwts_acpi_reserved_zero_check(fw, "NFIT", "Reserved1", reserved1, sizeof(reserved1), &passed);
+			fwts_acpi_reserved_zero_check("NFIT", "Reserved1", reserved1, &passed);
 			fwts_acpi_reserved_bits_check("NFIT", "Capabilities", nfit_struct->cap, 3, 31, &passed);
 
 			if ((nfit_struct->cap & 0x1) && !(nfit_struct->cap & 0x2)) {
@@ -514,7 +514,7 @@ static int nfit_test1(fwts_framework *fw)
 				entry->type);
 		}
 
-		fwts_acpi_reserved_zero_check(fw, "NFIT", "Reserved", reserved_passed, sizeof(reserved_passed), &passed);
+		fwts_acpi_reserved_zero_check("NFIT", "Reserved", reserved_passed, &passed);
 		fwts_log_nl(fw);
 		offset += entry->length;
 		entry = (fwts_acpi_table_nfit_struct_header *)(nfit_table->data + offset);
diff --git a/src/acpi/pcct/pcct.c b/src/acpi/pcct/pcct.c
index acc3fc2f..c5c09a7a 100644
--- a/src/acpi/pcct/pcct.c
+++ b/src/acpi/pcct/pcct.c
@@ -222,7 +222,7 @@ static int pcct_test1(fwts_framework *fw)
 	fwts_log_nl(fw);
 
 	fwts_acpi_reserved_bits_check("PCCT", "Flags", pcct->flags, 1, 31, &passed);
-	fwts_acpi_reserved_zero_check(fw, "PCCT", "Reserved", pcct->reserved, sizeof(pcct->reserved), &passed);
+	fwts_acpi_reserved_zero_check("PCCT", "Reserved", pcct->reserved, &passed);
 
 	offset = sizeof(fwts_acpi_table_pcct);
 	pcct_sub = (fwts_acpi_table_pcct_subspace_header *) (table->data + offset);
diff --git a/src/acpi/pdtt/pdtt.c b/src/acpi/pdtt/pdtt.c
index 5a0a0699..dd2b31b0 100644
--- a/src/acpi/pdtt/pdtt.c
+++ b/src/acpi/pdtt/pdtt.c
@@ -42,7 +42,7 @@ static int pdtt_test1(fwts_framework *fw)
 	fwts_log_info_verbatim(fw, "  Reserved[3]:             0x%6.6" PRIx32, reserved);
 	fwts_log_info_simp_int(fw, "  Trigger ID Array Offset: ", pdtt->array_offset);
 
-	fwts_acpi_reserved_zero_check(fw, "PDTT", "Reserved", reserved, sizeof(reserved), &passed);
+	fwts_acpi_reserved_zero_check("PDTT", "Reserved", reserved, &passed);
 
 	offset = pdtt->array_offset;
 	entry = (fwts_acpi_table_pdtt_channel *) (table->data + offset);
diff --git a/src/acpi/pmtt/pmtt.c b/src/acpi/pmtt/pmtt.c
index c4dbf878..27ec58b8 100644
--- a/src/acpi/pmtt/pmtt.c
+++ b/src/acpi/pmtt/pmtt.c
@@ -35,7 +35,7 @@ static void pmtt_subtable_header_test(fwts_framework *fw, fwts_acpi_table_pmtt_h
 	fwts_log_info_simp_int(fw, "    Flags:                          ", entry->flags);
 	fwts_log_info_simp_int(fw, "    Reserved:                       ", entry->reserved2);
 
-	fwts_acpi_reserved_zero_check(fw, "PMTT", "Reserved1", entry->reserved1, sizeof(entry->reserved1), passed);
+	fwts_acpi_reserved_zero_check("PMTT", "Reserved1", entry->reserved1, passed);
 	fwts_acpi_reserved_bits_check("PMTT", "Flags", entry->flags, 4, 15, passed);
 
 	if ((entry->flags & 0x0C) == 0x0C) {
@@ -45,7 +45,7 @@ static void pmtt_subtable_header_test(fwts_framework *fw, fwts_acpi_table_pmtt_h
 			"PMTT Flags's Bits[3..2] must not be 11b");
 	}
 
-	fwts_acpi_reserved_zero_check(fw, "PMTT", "Reserved2", entry->reserved2, sizeof(entry->reserved2), passed);
+	fwts_acpi_reserved_zero_check("PMTT", "Reserved2", entry->reserved2, passed);
 }
 
 static void pmtt_physical_component_test(fwts_framework *fw, fwts_acpi_table_pmtt_physical_component *entry, bool *passed)
@@ -56,7 +56,7 @@ static void pmtt_physical_component_test(fwts_framework *fw, fwts_acpi_table_pmt
 	fwts_log_info_simp_int(fw, "    Size of DIMM:                   ", entry->memory_size);
 	fwts_log_info_simp_int(fw, "    SMBIOS Handle:                  ", entry->bios_handle);
 
-	fwts_acpi_reserved_zero_check(fw, "PMTT", "Reserved", entry->reserved, sizeof(entry->reserved), passed);
+	fwts_acpi_reserved_zero_check("PMTT", "Reserved", entry->reserved, passed);
 
 	if ((entry->bios_handle & 0xFFFF0000) != 0 && entry->bios_handle != 0xFFFFFFFF) {
 		*passed = false;
@@ -83,7 +83,7 @@ static void pmtt_controller_test(fwts_framework *fw, fwts_acpi_table_pmtt_contro
 	fwts_log_info_simp_int(fw, "    Reserved:                       ", entry->reserved);
 	fwts_log_info_simp_int(fw, "    Number of Proximity Domains:    ", entry->domain_count);
 
-	fwts_acpi_reserved_zero_check(fw, "PMTT", "Reserved", entry->reserved, sizeof(entry->reserved), passed);
+	fwts_acpi_reserved_zero_check("PMTT", "Reserved", entry->reserved, passed);
 
 	offset = sizeof(fwts_acpi_table_pmtt_controller);
 	if (entry->header.length < offset + sizeof(fwts_acpi_table_pmtt_domain) * entry->domain_count) {
@@ -135,7 +135,7 @@ static void pmtt_socket_test(fwts_framework *fw, fwts_acpi_table_pmtt_socket *en
 	fwts_log_info_simp_int(fw, "    Socket Identifier:              ", entry->socket_id);
 	fwts_log_info_simp_int(fw, "    Reserved:                       ", entry->reserved);
 
-	fwts_acpi_reserved_zero_check(fw, "PMTT", "Reserved", entry->reserved, sizeof(entry->reserved), passed);
+	fwts_acpi_reserved_zero_check("PMTT", "Reserved", entry->reserved, passed);
 
 	offset = sizeof(fwts_acpi_table_pmtt_socket);
 	header = (fwts_acpi_table_pmtt_header *) (((char *) entry) + offset);
@@ -172,7 +172,7 @@ static int pmtt_test1(fwts_framework *fw)
 	fwts_log_info_verbatim(fw, "PMTT Table:");
 	fwts_log_info_simp_int(fw, "  Reserved:                         ", pmtt->reserved);
 
-	fwts_acpi_reserved_zero_check(fw, "PMTT", "Reserved", pmtt->reserved, sizeof(pmtt->reserved), &passed);
+	fwts_acpi_reserved_zero_check("PMTT", "Reserved", pmtt->reserved, &passed);
 
 	entry = (fwts_acpi_table_pmtt_header *) (table->data + sizeof(fwts_acpi_table_pmtt));
 	offset = sizeof(fwts_acpi_table_pmtt);
diff --git a/src/acpi/pptt/pptt.c b/src/acpi/pptt/pptt.c
index 52e892be..f450eb33 100644
--- a/src/acpi/pptt/pptt.c
+++ b/src/acpi/pptt/pptt.c
@@ -51,7 +51,7 @@ static void pptt_processor_test(fwts_framework *fw, const fwts_acpi_table_pptt_p
 			entry->number_priv_resources);
 	}
 
-	fwts_acpi_reserved_zero_check(fw, "PPTT", "Reserved", entry->reserved, sizeof(entry->reserved), passed);
+	fwts_acpi_reserved_zero_check("PPTT", "Reserved", entry->reserved, passed);
 
 	if (rev == 1)
 		fwts_acpi_reserved_bits_check("PPTT", "Flags", entry->flags, 2, 31, passed);
@@ -75,7 +75,7 @@ static void pptt_cache_test(fwts_framework *fw, const fwts_acpi_table_pptt_cache
 	fwts_log_info_simp_int(fw, "    Attributes:                     ", entry->attributes);
 	fwts_log_info_simp_int(fw, "    Line size:                      ", entry->line_size);
 
-	fwts_acpi_reserved_zero_check(fw, "PPTT", "Reserved", entry->reserved, sizeof(entry->reserved), passed);
+	fwts_acpi_reserved_zero_check("PPTT", "Reserved", entry->reserved, passed);
 	fwts_acpi_reserved_bits_check("PPTT", "Flags", entry->flags, 7, 31, passed);
 	fwts_acpi_reserved_bits_check("PPTT", "Attributes", entry->attributes, 5, 7, passed);
 }
@@ -98,7 +98,7 @@ static void pptt_id_test(fwts_framework *fw, const fwts_acpi_table_pptt_id *entr
 	fwts_log_info_simp_int(fw, "    MINOR_REV:                      ", entry->minor_rev);
 	fwts_log_info_simp_int(fw, "    SPIN_REV:                       ", entry->spin_rev);
 
-	fwts_acpi_reserved_zero_check(fw, "PPTT", "Reserved", entry->reserved, sizeof(entry->reserved), passed);
+	fwts_acpi_reserved_zero_check("PPTT", "Reserved", entry->reserved, passed);
 }
 
 static int pptt_test1(fwts_framework *fw)
diff --git a/src/acpi/rsdp/rsdp.c b/src/acpi/rsdp/rsdp.c
index 1c07f8e4..2ccba240 100644
--- a/src/acpi/rsdp/rsdp.c
+++ b/src/acpi/rsdp/rsdp.c
@@ -207,7 +207,7 @@ static int rsdp_test1(fwts_framework *fw)
 		value += *ptr++;
 
 	passed = true;
-	fwts_acpi_reserved_zero_check(fw, "RSDP", "Reserved", value, sizeof(value), &passed);
+	fwts_acpi_reserved_zero_check("RSDP", "Reserved", value, &passed);
 	if (passed)
 		fwts_passed(fw, "RSDP: the reserved field is zero.");
 
diff --git a/src/acpi/spcr/spcr.c b/src/acpi/spcr/spcr.c
index db882d01..2dbb9533 100644
--- a/src/acpi/spcr/spcr.c
+++ b/src/acpi/spcr/spcr.c
@@ -143,7 +143,7 @@ static int spcr_test1(fwts_framework *fw)
 	}
 
 	reserved1 = spcr->reserved1[0] + (spcr->reserved1[1] << 8) + (spcr->reserved1[2] << 16);
-	fwts_acpi_reserved_zero_check(fw, "SPCR", "Reserved1", reserved1, sizeof(reserved1), &passed);
+	fwts_acpi_reserved_zero_check("SPCR", "Reserved1", reserved1, &passed);
 
 	if (spcr->interrupt_type == 0) {
 		passed = false;
@@ -233,7 +233,7 @@ static int spcr_test1(fwts_framework *fw)
 			" is a reserved terminal type", spcr->terminal_type);
 	}
 
-	fwts_acpi_reserved_zero_check(fw, "SPCR", "Reserved2", spcr->reserved2, sizeof(spcr->reserved2), &passed);
+	fwts_acpi_reserved_zero_check("SPCR", "Reserved2", spcr->reserved2, &passed);
 
 	/* According to the spec, these values indicate NOT a PCI device */
 	if ((spcr->pci_device_id == 0xffff) &&
@@ -272,7 +272,7 @@ static int spcr_test1(fwts_framework *fw)
 	}
 
 	fwts_acpi_reserved_bits_check("SPCR", "PCI Flags", spcr->pci_flags, 1, 31, &passed);
-	fwts_acpi_reserved_zero_check(fw, "SPCR", "Reserved3", spcr->reserved3, sizeof(spcr->reserved3), &passed);
+	fwts_acpi_reserved_zero_check("SPCR", "Reserved3", spcr->reserved3, &passed);
 
 	if (passed)
 		fwts_passed(fw, "No issues found in SPCR table.");
diff --git a/src/acpi/spmi/spmi.c b/src/acpi/spmi/spmi.c
index 227903e4..8215cf2f 100644
--- a/src/acpi/spmi/spmi.c
+++ b/src/acpi/spmi/spmi.c
@@ -110,7 +110,7 @@ static int spmi_test1(fwts_framework *fw)
 			spmi->gpe);
 	}
 
-	fwts_acpi_reserved_zero_check(fw, "SPMI", "Reserved2", spmi->reserved2, sizeof(spmi->reserved2), &passed);
+	fwts_acpi_reserved_zero_check("SPMI", "Reserved2", spmi->reserved2, &passed);
 	fwts_acpi_reserved_bits_check("SPMI", "PCI device flag", spmi->pci_device_flag, 1, 7, &passed);
 
 	if (((spmi->interrupt_type & 2) == 0) &&
diff --git a/src/acpi/srat/srat.c b/src/acpi/srat/srat.c
index b157e1d9..a8556d2f 100644
--- a/src/acpi/srat/srat.c
+++ b/src/acpi/srat/srat.c
@@ -266,7 +266,7 @@ static void srat_check_its_affinity(
 	fwts_log_info_simp_int(fw, "  ITS ID                    ", affinity->its_id);
 	fwts_log_nl(fw);
 
-	fwts_acpi_reserved_zero_check(fw, "SRAT", "ITS Affinity Reserved", affinity->reserved, sizeof(affinity->reserved), passed);
+	fwts_acpi_reserved_zero_check("SRAT", "ITS Affinity Reserved", affinity->reserved, passed);
 
 done:
 	*length -= sizeof(fwts_acpi_table_its_affinity);
@@ -319,7 +319,7 @@ static void srat_check_initiator_affinity(
 	fwts_log_info_simp_int(fw, "  Reserved:                 ", affinity->reserved2);
 	fwts_log_nl(fw);
 
-	fwts_acpi_reserved_zero_check(fw, "SRAT", "Initiator Affinity Reserved", affinity->reserved1, sizeof(affinity->reserved1), passed);
+	fwts_acpi_reserved_zero_check("SRAT", "Initiator Affinity Reserved", affinity->reserved1, passed);
 	fwts_acpi_reserved_bits_check("SRAT", "Initiator Affinity Device Handle Type", affinity->device_handle_type, 1, 7, passed);
 	if (affinity->device_handle_type == 0)
 		h_reserved = affinity->device_handle[12];
@@ -328,9 +328,9 @@ static void srat_check_initiator_affinity(
 		for (i = 4; i < 16; i++)
 			h_reserved += affinity->device_handle[i];
 	}
-	fwts_acpi_reserved_zero_check(fw, "SRAT", "Initiator Affinity Device Handle Reserve", h_reserved, sizeof(uint32_t), passed);
+	fwts_acpi_reserved_zero_check("SRAT", "Initiator Affinity Device Handle Reserve", h_reserved, passed);
 	fwts_acpi_reserved_bits_check("SRAT", "Initiator Affinity Flags", affinity->flags, 2, 31, passed);
-	fwts_acpi_reserved_zero_check(fw, "SRAT", "Initiator Affinity Reserved", affinity->reserved2, sizeof(affinity->reserved2), passed);
+	fwts_acpi_reserved_zero_check("SRAT", "Initiator Affinity Reserved", affinity->reserved2, passed);
 
 done:
 	*length -= sizeof(fwts_acpi_table_initiator_affinity);
diff --git a/src/acpi/tcpa/tcpa.c b/src/acpi/tcpa/tcpa.c
index adf3440e..ff03a763 100644
--- a/src/acpi/tcpa/tcpa.c
+++ b/src/acpi/tcpa/tcpa.c
@@ -80,9 +80,9 @@ static int tcpa_server_test(fwts_framework *fw, fwts_acpi_table_tcpa *tcpa)
 	fwts_log_info_simp_int(fw, "  PCI Device:                      ", tcpa->server.pci_dev_number);
 	fwts_log_info_simp_int(fw, "  PCI Function:                    ", tcpa->server.pci_func_number);
 
-	fwts_acpi_reserved_zero_check(fw, "TCPA", "Reserved", tcpa->server.reserved, sizeof(tcpa->server.reserved), &passed);
-	fwts_acpi_reserved_zero_check(fw, "TCPA", "Reserved2", reserved2, sizeof(reserved2), &passed);
-	fwts_acpi_reserved_zero_check(fw, "TCPA", "Reserved3", tcpa->server.reserved3, sizeof(tcpa->server.reserved3), &passed);
+	fwts_acpi_reserved_zero_check("TCPA", "Reserved", tcpa->server.reserved, &passed);
+	fwts_acpi_reserved_zero_check("TCPA", "Reserved2", reserved2, &passed);
+	fwts_acpi_reserved_zero_check("TCPA", "Reserved3", tcpa->server.reserved3, &passed);
 
 	if (tcpa->server.device_flag & 1) {
 		if (!(tcpa->server.interrupt_flag & 2)) {
diff --git a/src/acpi/tpm2/tpm2.c b/src/acpi/tpm2/tpm2.c
index d9924797..0f54b9b2 100644
--- a/src/acpi/tpm2/tpm2.c
+++ b/src/acpi/tpm2/tpm2.c
@@ -49,7 +49,7 @@ static int tpm2_test1(fwts_framework *fw)
 			tpm2->platform_class);
 	}
 
-	fwts_acpi_reserved_zero_check(fw, "TPM2", "Reserved", tpm2->reserved, sizeof(tpm2->reserved), &passed);
+	fwts_acpi_reserved_zero_check("TPM2", "Reserved", tpm2->reserved, &passed);
 
 	if (tpm2->start_method < 1 || tpm2->start_method >= 12) {
 		passed = false;
diff --git a/src/lib/include/fwts_acpi_tables.h b/src/lib/include/fwts_acpi_tables.h
index 46fa53bc..56414730 100644
--- a/src/lib/include/fwts_acpi_tables.h
+++ b/src/lib/include/fwts_acpi_tables.h
@@ -32,6 +32,9 @@
 #define fwts_acpi_reserved_bits_check(table, field, value, min, max, passed) \
 	fwts_acpi_reserved_bits_check_(fw, table, field, value, sizeof(value), min, max, passed)
 
+#define fwts_acpi_reserved_zero_check(table, field, value, passed) \
+	fwts_acpi_reserved_zero_check_(fw, table, field, value, sizeof(value), passed)
+
 typedef enum {
 	FWTS_ACPI_TABLE_FROM_FIRMWARE,	/* directly from firmware */
 	FWTS_ACPI_TABLE_FROM_FILE,	/* loaded from file, e.g. from acpidump */
@@ -67,7 +70,7 @@ bool fwts_acpi_obj_find(fwts_framework *fw, const char *obj_name);
 
 fwts_bool fwts_acpi_is_reduced_hardware(fwts_framework *fw);
 
-void fwts_acpi_reserved_zero_check(fwts_framework *fw, const char *table, const char *field, uint64_t value, uint8_t size, bool *passed);
+void fwts_acpi_reserved_zero_check_(fwts_framework *fw, const char *table, const char *field, uint64_t value, uint8_t size, bool *passed);
 void fwts_acpi_reserved_zero_array_check(fwts_framework *fw, const char *table, const char *field, uint8_t* data, uint8_t length, bool *passed);
 void fwts_acpi_reserved_bits_check_(fwts_framework *fw, const char *table, const char *field, uint64_t value, uint8_t size, uint8_t min, uint8_t max, bool *passed);
 void fwts_acpi_reserved_type_check(fwts_framework *fw, const char *table, uint8_t value, uint8_t min, uint8_t reserved, bool *passed);
diff --git a/src/lib/src/fwts_acpi_object_eval.c b/src/lib/src/fwts_acpi_object_eval.c
index cffa7d0a..020ff3c5 100644
--- a/src/lib/src/fwts_acpi_object_eval.c
+++ b/src/lib/src/fwts_acpi_object_eval.c
@@ -1955,8 +1955,8 @@ void fwts_method_test_CRS_large_resource_items(
 		if (!*passed)	/* Too short, abort */
 			break;
 		fwts_acpi_reserved_bits_check("_CRS", "Flags[low]", data[4], 1, 7, passed);
-		fwts_acpi_reserved_zero_check(fw, "_CRS", "Flags[high]", data[5], sizeof(data[5]), passed);
-		fwts_acpi_reserved_zero_check(fw, "_CRS", "Resource Source Index", data[11], sizeof(data[11]), passed);
+		fwts_acpi_reserved_zero_check("_CRS", "Flags[high]", data[5], passed);
+		fwts_acpi_reserved_zero_check("_CRS", "Flags[high]", data[5], passed);
 		break;
 	case 0xe: /* 6.4.3.8.2 Serial Bus Connection Descriptors */
 		fwts_method_test_CRS_large_size(fw, name, objname, data, length, 11, 65535, passed);
@@ -1968,7 +1968,7 @@ void fwts_method_test_CRS_large_resource_items(
 			break;
 
 		fwts_acpi_reserved_bits_check("_CRS", "Flags[low]", data[4], 2, 7, passed);
-		fwts_acpi_reserved_zero_check(fw, "_CRS", "Flags[high]", data[5], sizeof(data[5]), passed);
+		fwts_acpi_reserved_zero_check("_CRS", "Flags[high]", data[5], passed);
 
 		if (data[6] > 0xd && data[6] < 0x80) {
 			*passed = false;
@@ -1983,7 +1983,7 @@ void fwts_method_test_CRS_large_resource_items(
 				"section 6.4.3.10 of the ACPI spec.");
 		}
 
-		fwts_acpi_reserved_zero_check(fw, "_CRS", "Resource Source Index", data[13], sizeof(data[13]), passed);
+		fwts_acpi_reserved_zero_check("_CRS", "Flags[high]", data[5], passed);
 		break;
 	case 0x10: /* 6.4.3.11 Pin Group Descriptors */
 		fwts_method_test_CRS_large_size(fw, name, objname, data, length, 13, 65535, passed);
@@ -1991,7 +1991,7 @@ void fwts_method_test_CRS_large_resource_items(
 			break;
 
 		fwts_acpi_reserved_bits_check("_CRS", "Flags[low]", data[4], 1, 7, passed);
-		fwts_acpi_reserved_zero_check(fw, "_CRS", "Flags[high]", data[5], sizeof(data[5]), passed);
+		fwts_acpi_reserved_zero_check("_CRS", "Flags[high]", data[5], passed);
 
 		break;
 	case 0x11: /* 6.4.3.12 Pin Group Function Descriptors */
@@ -2000,8 +2000,8 @@ void fwts_method_test_CRS_large_resource_items(
 			break;
 
 		fwts_acpi_reserved_bits_check("_CRS", "Flags[low]", data[4], 2, 7, passed);
-		fwts_acpi_reserved_zero_check(fw, "_CRS", "Flags[high]", data[5], sizeof(data[5]), passed);
-		fwts_acpi_reserved_zero_check(fw, "_CRS", "Resource Source Index", data[8], sizeof(data[8]), passed);
+		fwts_acpi_reserved_zero_check("_CRS", "Flags[high]", data[5], passed);
+		fwts_acpi_reserved_zero_check("_CRS", "Resource Source Index", data[8], passed);
 		break;
 	case 0x12: /* 6.4.3.13 Pin Group Configuration Descriptor */
 		fwts_method_test_CRS_large_size(fw, name, objname, data, length, 19, 65535, passed);
@@ -2009,7 +2009,7 @@ void fwts_method_test_CRS_large_resource_items(
 			break;
 
 		fwts_acpi_reserved_bits_check("_CRS", "Flags[low]", data[4], 2, 7, passed);
-		fwts_acpi_reserved_zero_check(fw, "_CRS", "Flags[high]", data[5], sizeof(data[5]), passed);
+		fwts_acpi_reserved_zero_check("_CRS", "Flags[high]", data[5], passed);
 
 		if (data[6] > 0xd && data[6] < 0x80) {
 			*passed = false;
@@ -2024,7 +2024,7 @@ void fwts_method_test_CRS_large_resource_items(
 				"section 6.4.3.10 of the ACPI spec.");
 		}
 
-		fwts_acpi_reserved_zero_check(fw, "_CRS", "Resource Source Index", data[11], sizeof(data[11]), passed);
+		fwts_acpi_reserved_zero_check("_CRS", "Flags[high]", data[5], passed);
 		break;
 	default:
 		snprintf(tmp, sizeof(tmp), "Method%sUnkownLargeResourceItem", objname);
diff --git a/src/lib/src/fwts_acpi_tables.c b/src/lib/src/fwts_acpi_tables.c
index 11789bba..d522dfbc 100644
--- a/src/lib/src/fwts_acpi_tables.c
+++ b/src/lib/src/fwts_acpi_tables.c
@@ -1434,10 +1434,10 @@ bool fwts_acpi_obj_find(fwts_framework *fw, const char *obj_name)
 }
 
 /*
- *  fwts_acpi_reserved_zero_check()
+ *  fwts_acpi_reserved_zero_check_()
  *  verify whether the reserved field is zero
  */
-void fwts_acpi_reserved_zero_check(
+void fwts_acpi_reserved_zero_check_(
 	fwts_framework *fw,
 	const char *table,
 	const char *field,
-- 
2.25.1




More information about the fwts-devel mailing list