All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Frans Klaver <frans.klaver@xsens.com>
Cc: Jiri Slaby <jslaby@suse.cz>,
	linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] serial: 8250_core: use pre-decrement for iteration limit
Date: Thu, 6 Nov 2014 10:32:14 -0800	[thread overview]
Message-ID: <20141106183214.GA24232@kroah.com> (raw)
In-Reply-To: <20141014115234.GB15616@ci00147.xsens-tech.local>

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:?


  reply	other threads:[~2014-11-06 18:32 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-13 15:09 [PATCH] serial: 8250_core: use pre-decrement for iteration limit Frans Klaver
2014-10-13 15:09 ` Frans Klaver
2014-10-14 11:52 ` Frans Klaver
2014-10-14 11:52   ` Frans Klaver
2014-11-06 18:32   ` Greg Kroah-Hartman [this message]
2014-11-06 20:10 ` [PATCH v2] serial: 8250_core: actually limit char reads to max_count Frans Klaver
2014-11-06 20:10   ` Frans Klaver

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20141106183214.GA24232@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=frans.klaver@xsens.com \
    --cc=jslaby@suse.cz \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.