From: "Maciej W. Rozycki" <macro@linux-mips.org>
To: Johannes Weiner <hannes@saeurebad.de>
Cc: Roel Kluin <12o3l@tiscali.nl>, lkml <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] dz: test after postfix decrement fails in dz_console_putchar()
Date: Wed, 9 Apr 2008 15:35:17 +0100 (BST) [thread overview]
Message-ID: <alpine.SOC.1.00.0804091524290.6438@piorun> (raw)
In-Reply-To: <87ve2rqh6u.fsf@saeurebad.de>
On Wed, 9 Apr 2008, Johannes Weiner wrote:
> The intention was probably that this gets executed if the break in the
> loop (trdy == dport->port.line) is reached. Without your fix, this
> branch is also taken if the while-loop terminates with loops == -1
> because of the postfix dec.
You are right about the intention -- you cannot send a character to the
transmitter unless the intended line has been reported as selected for
transmission by the serial controller. Otherwise it will go to the wrong
line -- this is a serial multiplexer that selects transmission lines by
itself.
It used to be the other kind of a "while" loop. This is a cut & paste
bug -- I noticed the problem with the terminating condition of the loop
and correctly moved it to the end, but forgot to adjust the
decrementation.
> Your fix is correct but your changelog entry is wrong.
s/fails/incorrectly succeeds/
Maciej
prev parent reply other threads:[~2008-04-09 14:35 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-09 10:00 Roel Kluin
2008-04-09 13:37 ` Maciej W. Rozycki
2008-04-09 13:41 ` Johannes Weiner
2008-04-09 14:35 ` Maciej W. Rozycki [this message]
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=alpine.SOC.1.00.0804091524290.6438@piorun \
--to=macro@linux-mips.org \
--cc=12o3l@tiscali.nl \
--cc=hannes@saeurebad.de \
--cc=linux-kernel@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®