From: Atsushi Nemoto <atsushi.nem...@sord.co.jp> Date: Fri, 25 Jan 2019 11:02:22 +0900
> From: Tomonori Sakita <tomonori.sak...@sord.co.jp> > > 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 <tomonori.sak...@sord.co.jp> > Signed-off-by: Atsushi Nemoto <atsushi.nem...@sord.co.jp> > Reviewed-by: Dalon L Westergreen <dalon.westergr...@linux.intel.com> > --- > Changes in v2: > Use max_t instead of just removing the "- 1". Applied.