]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
ACPICA: Fixed a problem with FromBCD and ToBCD with some compilers
authorBob Moore <robert.moore@intel.com>
Thu, 10 Apr 2008 15:06:40 +0000 (19:06 +0400)
committerLen Brown <len.brown@intel.com>
Tue, 22 Apr 2008 18:29:27 +0000 (14:29 -0400)
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>
drivers/acpi/utilities/utmath.c

index 0c56a0d20b29064fd375f50418feafc89fca1922..16dbf665927b2596602af021b68622ac75ad0ce1 100644 (file)
@@ -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);