From 45bbbbe2d5bcfe72754da275298f5de9120a4c31 Mon Sep 17 00:00:00 2001 From: Sven Barth Date: Fri, 14 Feb 2020 10:48:00 -0800 Subject: [PATCH] ACPICA: cast the result of the pointer difference to u32 Altnatively we could declare aml_length as acpi_size, but then one would need to cast at the assignment for method_obj->method.aml_length ACPICA commit 72805936603fcf84e98f1b89bf99b5101af27fb8 Link: https://github.com/acpica/acpica/commit/72805936 Signed-off-by: Sven Barth Signed-off-by: Bob Moore Signed-off-by: Erik Kaneda Signed-off-by: Rafael J. Wysocki --- drivers/acpi/acpica/nsxfname.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/acpi/acpica/nsxfname.c b/drivers/acpi/acpica/nsxfname.c index 984129dcaa0c..0e6aba81605b 100644 --- a/drivers/acpi/acpica/nsxfname.c +++ b/drivers/acpi/acpica/nsxfname.c @@ -516,7 +516,7 @@ acpi_status acpi_install_method(u8 *buffer) method_flags = *parser_state.aml++; aml_start = parser_state.aml; - aml_length = ACPI_PTR_DIFF(parser_state.pkg_end, aml_start); + aml_length = (u32)ACPI_PTR_DIFF(parser_state.pkg_end, aml_start); /* * Allocate resources up-front. We don't want to have to delete a new -- 2.25.1