From: Atsushi Nemoto <[email protected]> Date: Fri, 25 Jan 2019 11:02:22 +0900
> From: Tomonori Sakita <[email protected]> > > If fill_level was not zero and status was not BUSY, > result of "tx_prod - tx_cons - inuse" might be zero. > Subtracting 1 unconditionally results invalid negative return value > on this case. > Make sure not to return an negative value. > > Signed-off-by: Tomonori Sakita <[email protected]> > Signed-off-by: Atsushi Nemoto <[email protected]> > Reviewed-by: Dalon L Westergreen <[email protected]> > --- > Changes in v2: > Use max_t instead of just removing the "- 1". Applied.
