Avoid 64 bit mod operation, which won't work on 32 bit systems.
Simple subtraction can be used instead in this case.
Reported-By: Fengguang Wu <[email protected]>
Signed-off-by: Dan Streetman <[email protected]>
Signed-off-by: Herbert Xu <[email protected]>
/* this is where the current fifo is */
u64 section = round_down(total, fsize);
/* the current pos in the fifo */
- u64 pos = total % fsize;
+ u64 pos = total - section;
/* if the offset is past/at the pos, we need to
* go back to the last fifo section