Skip to content

Commit

Permalink
Unix: Cleanup to use ACPI_TO_INTEGER() to calc page offset.
Browse files Browse the repository at this point in the history
The offset calculation doesn't need to convert a pointer to a special
integer type. So this patch uses ACPI_TO_INTEGER() instead.

Signed-off-by: Lv Zheng <lv.zheng@intel.com>
  • Loading branch information
Lv Zheng committed Jan 27, 2015
1 parent 7d9fd64 commit 9e2d818
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion source/os_specific/service_layers/osunixmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,6 @@ AcpiOsUnmapMemory (


PageSize = AcpiOsGetPageSize ();
Offset = (ACPI_PHYSICAL_ADDRESS) Where % PageSize;
Offset = ACPI_TO_INTEGER (Where) % PageSize;
munmap ((UINT8 *) Where - Offset, (Length + Offset));
}

0 comments on commit 9e2d818

Please sign in to comment.