On 07/13/2017 06:31 AM, Marc-André Lureau wrote:
-        s->samples = (PCSPK_BUF_LEN * PIT_FREQ / m * m / (PIT_FREQ >> 1) + 1) 
>> 1;
+        s->samples = (QEMU_ALIGN_DOWN(PCSPK_BUF_LEN * PIT_FREQ, m) / (PIT_FREQ >> 1) 
+ 1) >> 1;

Wow.  Um.  Two divisions?

Irritatingly, "m" appears to be the only non-constant.

This a true and correct conversion, so

Reviewed-by: Richard Henderson <r...@twiddle.net>


r~

Reply via email to