Skip to content

Commit

Permalink
remove useless muldiv64()
Browse files Browse the repository at this point in the history
muldiv64(a, 1, b) is like "a / b".

This patch is the result of coccinelle script
scripts/coccinelle/remove_muldiv64.cocci.

Signed-off-by: Laurent Vivier <lvivier@redhat.com>
Reviewed-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
  • Loading branch information
vivier authored and Michael Tokarev committed Jun 7, 2016
1 parent 3498686 commit cd1f16f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion hw/usb/hcd-ohci.c
Expand Up @@ -1474,7 +1474,7 @@ static uint32_t ohci_get_frame_remaining(OHCIState *ohci)
if (tks >= usb_frame_time)
return (ohci->frt << 31);

tks = muldiv64(tks, 1, usb_bit_time);
tks = tks / usb_bit_time;
fr = (uint16_t)(ohci->fi - tks);

return (ohci->frt << 31) | fr;
Expand Down

0 comments on commit cd1f16f

Please sign in to comment.