Re: [PATCH] serial: 8250_core: use pre-decrement for iteration limit

2014-11-06 Thread Greg Kroah-Hartman
On Tue, Oct 14, 2014 at 01:52:34PM +0200, Frans Klaver wrote: > On Mon, Oct 13, 2014 at 05:09:11PM +0200, Frans Klaver wrote: > > In serial8250_rx_chars(), max_count is set to 256. Due to the > > post-decrement operator used in the while() condition, the maximum > > number of iterations actually 25

Re: [PATCH] serial: 8250_core: use pre-decrement for iteration limit

2014-10-14 Thread Frans Klaver
On Mon, Oct 13, 2014 at 05:09:11PM +0200, Frans Klaver wrote: > In serial8250_rx_chars(), max_count is set to 256. Due to the > post-decrement operator used in the while() condition, the maximum > number of iterations actually 257. This is not a problem, but it is > mildly surprising if you're debu

[PATCH] serial: 8250_core: use pre-decrement for iteration limit

2014-10-13 Thread Frans Klaver
In serial8250_rx_chars(), max_count is set to 256. Due to the post-decrement operator used in the while() condition, the maximum number of iterations actually 257. This is not a problem, but it is mildly surprising if you're debugging. Use pre-decrement instead. Signed-off-by: Frans Klaver --- d