lkml.org 
[lkml]   [2014]   [Nov]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] serial: 8250_core: use pre-decrement for iteration limit
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 257. This is not a problem, but it is
> > mildly surprising if you're debugging. Use pre-decrement instead.
>
> I'm somewhat inclined to changing the title to something like:
>
> serial: 8250_core: actually limit char reads to max_count

Sounds better, care to resend with that subject:?



\
 
 \ /
  Last update: 2014-11-06 19:41    [W:0.053 / U:0.256 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site