Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1f549a24 authored by Bob Moore's avatar Bob Moore Committed by Len Brown
Browse files

ACPICA: Fixed a problem with FromBCD and ToBCD with some compilers

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: default avatarBob Moore <robert.moore@intel.com>
Signed-off-by: default avatarAlexey Starikovskiy <astarikovskiy@suse.de>
Signed-off-by: default avatarLen Brown <len.brown@intel.com>
parent b160987d
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -276,7 +276,7 @@ acpi_ut_short_divide(acpi_integer in_dividend,
		*out_quotient = in_dividend / divisor;
		*out_quotient = in_dividend / divisor;
	}
	}
	if (out_remainder) {
	if (out_remainder) {
		*out_remainder = (u32) in_dividend % divisor;
		*out_remainder = (u32) (in_dividend % divisor);
	}
	}


	return_ACPI_STATUS(AE_OK);
	return_ACPI_STATUS(AE_OK);