Skip to content

Commit

Permalink
ACPICA: Fixed a problem with FromBCD and ToBCD with some compilers
Browse files Browse the repository at this point in the history
On some compilers, the ShortDivide function worked incorrectly,
causing problems with the BCD functions with large input
values. (Truncation from 64-bit to 32-bit occurred.) Internal
http://www.acpica.org/bugzilla/show_bug.cgi?id=435

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de>
Signed-off-by: Len Brown <len.brown@intel.com>
  • Loading branch information
Bob Moore authored and Len Brown committed Apr 22, 2008
1 parent b160987 commit 1f549a2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/acpi/utilities/utmath.c
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ acpi_ut_short_divide(acpi_integer in_dividend,
*out_quotient = in_dividend / divisor;
}
if (out_remainder) {
*out_remainder = (u32) in_dividend % divisor;
*out_remainder = (u32) (in_dividend % divisor);
}

return_ACPI_STATUS(AE_OK);
Expand Down

0 comments on commit 1f549a2

Please sign in to comment.