From eab0823e0e58c4a4ca09410a1aa22689b0de85d8 Mon Sep 17 00:00:00 2001 From: Damien Lespiau Date: Fri, 10 May 2013 13:41:32 +0100 Subject: [PATCH] ddi_compute_wrpll: Do not use a double constant Otherwise the expression will be promoted to a floating point multiplication Signed-off-by: Damien Lespiau --- tests/ddi_compute_wrpll.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/ddi_compute_wrpll.c b/tests/ddi_compute_wrpll.c index 39f4ffcb..9d31ebc2 100644 --- a/tests/ddi_compute_wrpll.c +++ b/tests/ddi_compute_wrpll.c @@ -131,8 +131,8 @@ static void wrpll_update_rnp(uint64_t freq2k, unsigned budget, diff = ABS_DIFF((freq2k * p * r2), (LC_FREQ_2K * n2)); diff_best = ABS_DIFF((freq2k * best->p * best->r2), (LC_FREQ_2K * best->n2)); - c = 1e6 * diff; - d = 1e6 * diff_best; + c = 1000000 * diff; + d = 1000000 * diff_best; if (a < c && b < d) { /* If both are above the budget, pick the closer */