[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20190127.104112.895755013017380628.davem@davemloft.net>
Date: Sun, 27 Jan 2019 10:41:12 -0800 (PST)
From: David Miller <davem@...emloft.net>
To: atsushi.nemoto@...d.co.jp
Cc: thor.thayer@...ux.intel.com, netdev@...r.kernel.org,
dalon.westergreen@...ux.intel.com, tomonori.sakita@...d.co.jp
Subject: Re: [PATCH v2] net: altera_tse: fix msgdma_tx_completion on
non-zero fill_level case
From: Atsushi Nemoto <atsushi.nemoto@...d.co.jp>
Date: Fri, 25 Jan 2019 11:02:22 +0900
> From: Tomonori Sakita <tomonori.sakita@...d.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.sakita@...d.co.jp>
> Signed-off-by: Atsushi Nemoto <atsushi.nemoto@...d.co.jp>
> Reviewed-by: Dalon L Westergreen <dalon.westergreen@...ux.intel.com>
> ---
> Changes in v2:
> Use max_t instead of just removing the "- 1".
Applied.
Powered by blists - more mailing lists