diff mbox series

[1/2] acpi: slit: remove the checking of the bi-directional equality

Message ID 20250617081116.104900-1-ivan.hu@canonical.com
State Accepted
Headers show
Series [1/2] acpi: slit: remove the checking of the bi-directional equality | expand

Commit Message

Ivan Hu June 17, 2025, 8:11 a.m. UTC
Buglink: https://bugs.launchpad.net/fwts/+bug/2114816

Checking [i,j] == [j,i] is not required in the ACPI spec

Signed-off-by: Ivan Hu <ivan.hu@canonical.com>
---
 src/acpi/slit/slit.c | 20 ++------------------
 1 file changed, 2 insertions(+), 18 deletions(-)
diff mbox series

Patch

diff --git a/src/acpi/slit/slit.c b/src/acpi/slit/slit.c
index 8b99ddf8..6f96d4c5 100644
--- a/src/acpi/slit/slit.c
+++ b/src/acpi/slit/slit.c
@@ -111,11 +111,9 @@  static int slit_test1(fwts_framework *fw)
 
 	for (i = 0; i < n; i++) {
 		for (j = 0; j < n; j++) {
-			uint8_t val1 = entry[INDEX(i, j)],
-				val2 = entry[INDEX(j, i)];
 
 			/* Check for distances less than 10 (reserved, no meaning) */
-			if (val1 < 10) {
+			if (entry[INDEX(i, j)] < 10) {
 				reserved++;
 				/* Report first 16 errors */
 				if (reserved < 16) {
@@ -124,21 +122,7 @@  static int slit_test1(fwts_framework *fw)
 						"SLIT Entry[%" PRIu64 "][%" PRIu64 "]"
 						" is 0x%" PRIx8 " which is a reserved value"
 						" and has no defined meaning",
-						i, j, val1);
-				}
-			}
-
-			if (val1 != val2) {
-				bad_entry++;
-				/* Report first 16 bad entries */
-				if (bad_entry < 16) {
-					fwts_failed(fw, LOG_LEVEL_HIGH,
-						"SLITEntryReserved",
-						"SLIT Entry[%" PRIu64 "][%" PRIu64 "]"
-						" is 0x%" PRIx8 " and not the same as "
-						"SLIT Entry[%" PRIu64 "][%" PRIu64 "]"
-						" which is 0x%" PRIx8,
-						i, j, val1, j, i, val2);
+						i, j, entry[INDEX(i, j)]);
 				}
 			}
 		}