Blame SOURCES/0032-Support-WDAT-in-a-big-endian-world.patch

9897bb
From ff1449919ee7d395d301e3a56a4ba333604d0458 Mon Sep 17 00:00:00 2001
9897bb
From: Al Stone <ahs3@redhat.com>
9897bb
Date: Fri, 25 Sep 2020 18:13:20 -0600
9897bb
Subject: [PATCH 32/45] Support WDAT in a big-endian world
9897bb
9897bb
Signed-off-by: Al Stone <ahs3@redhat.com>
9897bb
---
9897bb
 source/common/dmtbdump3.c | 7 ++++---
9897bb
 1 file changed, 4 insertions(+), 3 deletions(-)
9897bb
9897bb
Index: acpica-unix2-20210604/source/common/dmtbdump3.c
9897bb
===================================================================
9897bb
--- acpica-unix2-20210604.orig/source/common/dmtbdump3.c
9897bb
+++ acpica-unix2-20210604/source/common/dmtbdump3.c
9897bb
@@ -675,11 +675,12 @@ AcpiDmDumpWdat (
9897bb
     ACPI_STATUS             Status;
9897bb
     UINT32                  Offset = sizeof (ACPI_TABLE_WDAT);
9897bb
     ACPI_WDAT_ENTRY         *Subtable;
9897bb
+    UINT32                  TableLength = AcpiUtReadUint32 (&Table->Length);
9897bb
 
9897bb
 
9897bb
     /* Main table */
9897bb
 
9897bb
-    Status = AcpiDmDumpTable (Table->Length, 0, Table, 0, AcpiDmTableInfoWdat);
9897bb
+    Status = AcpiDmDumpTable (TableLength, 0, Table, 0, AcpiDmTableInfoWdat);
9897bb
     if (ACPI_FAILURE (Status))
9897bb
     {
9897bb
         return;
9897bb
@@ -688,12 +689,12 @@ AcpiDmDumpWdat (
9897bb
     /* Subtables */
9897bb
 
9897bb
     Subtable = ACPI_ADD_PTR (ACPI_WDAT_ENTRY, Table, Offset);
9897bb
-    while (Offset < Table->Length)
9897bb
+    while (Offset < TableLength)
9897bb
     {
9897bb
         /* Common subtable header */
9897bb
 
9897bb
         AcpiOsPrintf ("\n");
9897bb
-        Status = AcpiDmDumpTable (Table->Length, Offset, Subtable,
9897bb
+        Status = AcpiDmDumpTable (TableLength, Offset, Subtable,
9897bb
             sizeof (ACPI_WDAT_ENTRY), AcpiDmTableInfoWdat0);
9897bb
         if (ACPI_FAILURE (Status))
9897bb
         {