aboutsummaryrefslogtreecommitdiff
path: root/hw/audio
diff options
context:
space:
mode:
authorLaurent Vivier <lvivier@redhat.com>2016-05-09 15:24:58 +0200
committerMichael Tokarev <mjt@tls.msk.ru>2016-06-07 18:02:49 +0300
commitc00dc6750f6e825df27aa20fce713a55a4032cc6 (patch)
tree5bc37f2cc12cfd8cd0484edf344bd67d755d4c71 /hw/audio
parentcd1f16f94727f82ea77fcd82c4dad63bb9172a6f (diff)
replace muldiv64(a, b, c) by (uint64_t)a * b / c
When "a" and "b" are 32bit values, we don't have to cast them to 128bit, 64bit is enough. This patch is the result of coccinelle script scripts/coccinelle/simplify_muldiv64.cocci Signed-off-by: Laurent Vivier <lvivier@redhat.com> For xtensa PIC: Acked-by: Max Filippov <jcmvbkbc@gmail.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Diffstat (limited to 'hw/audio')
-rw-r--r--hw/audio/gus.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/audio/gus.c b/hw/audio/gus.c
index 9dd6947bee..6c02646773 100644
--- a/hw/audio/gus.c
+++ b/hw/audio/gus.c
@@ -144,7 +144,7 @@ static void GUS_callback (void *opaque, int free)
s->left = samples;
reset:
- gus_irqgen (&s->emu, muldiv64 (net, 1000000, s->freq));
+ gus_irqgen (&s->emu, (uint64_t)net * 1000000 / s->freq);
}
int GUS_irqrequest (GUSEmuState *emu, int hwirq, int n)