aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLv Zheng <lv.zheng@intel.com>2015-04-12 23:48:24 -0400
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2015-04-14 08:51:50 -0400
commite0423edff19a99ed12bedfe4f3605e94efa2c669 (patch)
tree63ef59638a48f8918cf7af7a1b2637873664592a
parentf254e3c57b9d952e987502aefa0804c177dd2503 (diff)
ACPICA: Unix: Cleanup to use ACPI_TO_INTEGER() to calc page offset.
ACPICA commit 9e2d8180f4d5e61949b17513bae8aff6412f62dd The offset calculation needn't convert a pointer to a special integer type. So this patch uses ACPI_TO_INTEGER() instead. This patch only affects acpidump tool. Link: https://github.com/acpica/acpica/commit/9e2d8180 Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
-rw-r--r--tools/power/acpi/os_specific/service_layers/osunixmap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/power/acpi/os_specific/service_layers/osunixmap.c b/tools/power/acpi/os_specific/service_layers/osunixmap.c
index 3853a7350440..0b1fa290245a 100644
--- a/tools/power/acpi/os_specific/service_layers/osunixmap.c
+++ b/tools/power/acpi/os_specific/service_layers/osunixmap.c
@@ -146,6 +146,6 @@ void acpi_os_unmap_memory(void *where, acpi_size length)
146 acpi_size page_size; 146 acpi_size page_size;
147 147
148 page_size = acpi_os_get_page_size(); 148 page_size = acpi_os_get_page_size();
149 offset = (acpi_physical_address) where % page_size; 149 offset = ACPI_TO_INTEGER(where) % page_size;
150 munmap((u8 *)where - offset, (length + offset)); 150 munmap((u8 *)where - offset, (length + offset));
151} 151}