diff options
Diffstat (limited to 'drivers/acpi/acpica/utmath.c')
-rw-r--r-- | drivers/acpi/acpica/utmath.c | 25 |
1 files changed, 10 insertions, 15 deletions
diff --git a/drivers/acpi/acpica/utmath.c b/drivers/acpi/acpica/utmath.c index 7cfa1d8164d0..35059a14eb72 100644 --- a/drivers/acpi/acpica/utmath.c +++ b/drivers/acpi/acpica/utmath.c | |||
@@ -70,9 +70,8 @@ ACPI_MODULE_NAME("utmath") | |||
70 | * | 70 | * |
71 | ******************************************************************************/ | 71 | ******************************************************************************/ |
72 | acpi_status | 72 | acpi_status |
73 | acpi_ut_short_divide(acpi_integer dividend, | 73 | acpi_ut_short_divide(u64 dividend, |
74 | u32 divisor, | 74 | u32 divisor, u64 *out_quotient, u32 *out_remainder) |
75 | acpi_integer * out_quotient, u32 * out_remainder) | ||
76 | { | 75 | { |
77 | union uint64_overlay dividend_ovl; | 76 | union uint64_overlay dividend_ovl; |
78 | union uint64_overlay quotient; | 77 | union uint64_overlay quotient; |
@@ -126,9 +125,8 @@ acpi_ut_short_divide(acpi_integer dividend, | |||
126 | ******************************************************************************/ | 125 | ******************************************************************************/ |
127 | 126 | ||
128 | acpi_status | 127 | acpi_status |
129 | acpi_ut_divide(acpi_integer in_dividend, | 128 | acpi_ut_divide(u64 in_dividend, |
130 | acpi_integer in_divisor, | 129 | u64 in_divisor, u64 *out_quotient, u64 *out_remainder) |
131 | acpi_integer * out_quotient, acpi_integer * out_remainder) | ||
132 | { | 130 | { |
133 | union uint64_overlay dividend; | 131 | union uint64_overlay dividend; |
134 | union uint64_overlay divisor; | 132 | union uint64_overlay divisor; |
@@ -199,9 +197,8 @@ acpi_ut_divide(acpi_integer in_dividend, | |||
199 | * The 64-bit remainder must be generated. | 197 | * The 64-bit remainder must be generated. |
200 | */ | 198 | */ |
201 | partial1 = quotient.part.lo * divisor.part.hi; | 199 | partial1 = quotient.part.lo * divisor.part.hi; |
202 | partial2.full = | 200 | partial2.full = (u64) quotient.part.lo * divisor.part.lo; |
203 | (acpi_integer) quotient.part.lo * divisor.part.lo; | 201 | partial3.full = (u64) partial2.part.hi + partial1; |
204 | partial3.full = (acpi_integer) partial2.part.hi + partial1; | ||
205 | 202 | ||
206 | remainder.part.hi = partial3.part.lo; | 203 | remainder.part.hi = partial3.part.lo; |
207 | remainder.part.lo = partial2.part.lo; | 204 | remainder.part.lo = partial2.part.lo; |
@@ -257,9 +254,8 @@ acpi_ut_divide(acpi_integer in_dividend, | |||
257 | * | 254 | * |
258 | ******************************************************************************/ | 255 | ******************************************************************************/ |
259 | acpi_status | 256 | acpi_status |
260 | acpi_ut_short_divide(acpi_integer in_dividend, | 257 | acpi_ut_short_divide(u64 in_dividend, |
261 | u32 divisor, | 258 | u32 divisor, u64 *out_quotient, u32 *out_remainder) |
262 | acpi_integer * out_quotient, u32 * out_remainder) | ||
263 | { | 259 | { |
264 | 260 | ||
265 | ACPI_FUNCTION_TRACE(ut_short_divide); | 261 | ACPI_FUNCTION_TRACE(ut_short_divide); |
@@ -284,9 +280,8 @@ acpi_ut_short_divide(acpi_integer in_dividend, | |||
284 | } | 280 | } |
285 | 281 | ||
286 | acpi_status | 282 | acpi_status |
287 | acpi_ut_divide(acpi_integer in_dividend, | 283 | acpi_ut_divide(u64 in_dividend, |
288 | acpi_integer in_divisor, | 284 | u64 in_divisor, u64 *out_quotient, u64 *out_remainder) |
289 | acpi_integer * out_quotient, acpi_integer * out_remainder) | ||
290 | { | 285 | { |
291 | ACPI_FUNCTION_TRACE(ut_divide); | 286 | ACPI_FUNCTION_TRACE(ut_divide); |
292 | 287 | ||