[PATCH] acpi: xsdt: fix build error on 32 bit systems

Colin King colin.king at canonical.com
Thu Aug 24 10:30:04 UTC 2017


From: Colin Ian King <colin.king at canonical.com>

Use PRIu64 rather than lx to print the address. Also minor change
to else formatting.

Fixes build error:
acpi/xsdt/xsdt.c: In function ‘xsdt_test1’:
acpi/xsdt/xsdt.c:84:4: error: format ‘%lx’ expects argument of type
‘long unsigned int’, but argument 7 has type ‘uint64_t’ [-Werror=format=]
    fwts_passed(fw, "XSDT is present, pointed at by XsdrAddress=0x%lx"
    ^

Fixes: fcc5f1e9fbc7 ("acpi: xsdt: add SBBR compliance tests)
Signed-off-by: Colin Ian King <colin.king at canonical.com>
---
 src/acpi/xsdt/xsdt.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/src/acpi/xsdt/xsdt.c b/src/acpi/xsdt/xsdt.c
index 2c515fda..97f5c5eb 100644
--- a/src/acpi/xsdt/xsdt.c
+++ b/src/acpi/xsdt/xsdt.c
@@ -81,11 +81,10 @@ static int xsdt_test1(fwts_framework *fw)
 	}
 	if (passed) {
 		if (fw->flags & FWTS_FLAG_TEST_SBBR) {
-			fwts_passed(fw, "XSDT is present, pointed at by XsdrAddress=0x%lx"
+			fwts_passed(fw, "XSDT is present, pointed at by XsdrAddress=0x%" PRIx64
 				" and contain valid pointers to %d other ACPI tables mandated by SBBR",
 				 xsdt->entries[0], (int)n);
-		}
-		else
+		} else
 			fwts_passed(fw, "No issues found in XSDT table.");
 	}
 
-- 
2.14.1




More information about the fwts-devel mailing list