public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Graeme Russ <graeme.russ@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2] x86: Fix some bugs in the i8402 driver when no controller is present
Date: Wed, 30 Nov 2011 22:04:36 +1100	[thread overview]
Message-ID: <4ED60DC4.7080409@gmail.com> (raw)
In-Reply-To: <1321337892-12367-1-git-send-email-gabeblack@chromium.org>

Hi Gabe,

On 15/11/11 17:18, Gabe Black wrote:
> If no controller is present, the i8402 driver should return immediately and
> not attempt to operate on the missing hardware.
> 
> In kbd_input_empty, the status register is checked every millisecond to see
> whether the input buffer is empty, up to a timeout which is tracked by
> decrimenting a counter each time the check is performed. The decrement is
> performed with a postfix -- operator, and the value of the counter is
> checked in place. That means that when the counter reaches zero and the
> loop terminates, it will actually be decrimented one more time and become
> -1. That value is returned as the return value of the function. That would
> give the right answer if it wasn't for that extra decrement because a
> timeout would indicate that the buffer never became empty.
> 
> This change fixes both of those bugs.
> 
> Signed-off-by: Gabe Black <gabeblack@chromium.org>
> ---
> Changes in v2:
> - Change summary tag style.
> - Rebase onto checkpatch cleaned file.
> 
>  drivers/input/i8042.c |   12 +++++++++++-
>  1 files changed, 11 insertions(+), 1 deletions(-)

Applied to u-boot-x86/master

Thanks,

Graeme

      reply	other threads:[~2011-11-30 11:04 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-08  9:48 [U-Boot] [PATCH] [x86] Fix some bugs in the i8402 driver when no controller is present Gabe Black
2011-11-12 10:26 ` Graeme Russ
2011-11-13  2:52   ` Gabe Black
2011-11-13  9:17     ` Graeme Russ
2011-11-13  9:18       ` Graeme Russ
2011-11-15  6:18   ` [U-Boot] [PATCH v2] x86: " Gabe Black
2011-11-30 11:04     ` Graeme Russ [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=4ED60DC4.7080409@gmail.com \
    --to=graeme.russ@gmail.com \
    --cc=u-boot@lists.denx.de \
    /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