mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2025-01-15 17:56:46 +07:00
c0e1ac275f
commit e7c22eeaff8565d9a8374f320238c251ca31480b upstream.
As snd_ff.rx_bytes[] is unsigned int, and NSEC_PER_SEC is 1000000000L,
the second multiplication in
ff->rx_bytes[port] * 8 * NSEC_PER_SEC / 31250
always overflows on 32-bit platforms, truncating the result. Fix this
by precalculating "NSEC_PER_SEC / 31250", which is an integer constant.
Note that this assumes ff->rx_bytes[port] <= 16777.
Fixes:
|
||
---|---|---|
.. | ||
amdtp-ff.c | ||
ff-hwdep.c | ||
ff-midi.c | ||
ff-pcm.c | ||
ff-proc.c | ||
ff-protocol-former.c | ||
ff-protocol-latter.c | ||
ff-stream.c | ||
ff-transaction.c | ||
ff.c | ||
ff.h | ||
Makefile |