LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Andreas Mohr <andi@rhlx01.hs-esslingen.de>
To: Richard Hughes <hughsient@gmail.com>
Cc: Bastien Nocera <hadess@hadess.net>,
	John Belmonte <john@neggie.net>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	linux-acpi <linux-acpi@vger.kernel.org>,
	Dmitry Torokhov <dmitry.torokhov@gmail.com>
Subject: Re: Add INPUT support to toshiba_acpi
Date: Thu, 31 May 2007 18:46:39 +0200	[thread overview]
Message-ID: <20070531164639.GA13742@rhlx01.hs-esslingen.de> (raw)
In-Reply-To: <1180626416.3469.7.camel@localhost.localdomain>

Hi,

On Thu, May 31, 2007 at 04:46:56PM +0100, Richard Hughes wrote:

+	if (!hotkeys_over_input) {
+		if (!key_event_valid) {
+			hci_read1(HCI_SYSTEM_EVENT, &value, &hci_result);
+			if (hci_result == HCI_SUCCESS) {
+				key_event_valid = 1;
+				last_key_event = value;
+			} else if (hci_result == HCI_EMPTY) {
+				/* better luck next time */

HCI_EMPTY is *by far* the most frequent state to occur I think
(users won't press keys all the time), thus it's probably better(?)
for branch prediction to have this placed first, right?
Not that it matters too much instruction-wise, but still...

Apart from that I'm very happy to see progress on this front
(speaking as a "proud" owner of an old Toshiba notebook requiring
this stuff).

Oh, and maybe merge the sprintf()s into a single one to reduce code size.

And I'd definitely move the multiple identical "Re-enabled hotkeys" parts
into one single non-inlined(!) function for the same reason.
Not to mention that it's BUTT UGLY to have the *same* fat
multi-line comment duplicated bazillion times.

Thanks a lot!

Andreas Mohr

  reply	other threads:[~2007-05-31 16:46 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-31 12:36 Richard Hughes
2007-05-31 12:53 ` Bastien Nocera
2007-05-31 13:43   ` Richard Hughes
2007-05-31 15:46     ` Richard Hughes
2007-05-31 16:46       ` Andreas Mohr [this message]
2007-05-31 23:09         ` Richard Hughes
2007-06-01 16:45       ` Dmitry Torokhov
2007-06-02 12:50         ` Richard Hughes
2007-06-02 14:23           ` Matthew Garrett
2007-06-03  4:48             ` Dmitry Torokhov
2007-06-07 16:58               ` Richard Hughes
2007-06-08 14:23                 ` Dmitry Torokhov
2007-06-08 14:30                   ` Richard Hughes
2007-06-11 13:26                 ` Renato S. Yamane
2007-06-23 14:56 ` Rolf Eike Beer
2007-06-25  9:52   ` Richard Hughes
2007-06-25 11:03     ` Rolf Eike Beer
2007-06-26  5:03     ` Rolf Eike Beer
2007-06-26  8:56       ` Richard Hughes
2007-06-28 11:27         ` Rolf Eike Beer
2007-06-28 12:22           ` Renato S. Yamane
2007-07-03  5:38             ` Rolf Eike Beer
2007-07-03 12:59               ` Renato S. Yamane

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=20070531164639.GA13742@rhlx01.hs-esslingen.de \
    --to=andi@rhlx01.hs-esslingen.de \
    --cc=dmitry.torokhov@gmail.com \
    --cc=hadess@hadess.net \
    --cc=hughsient@gmail.com \
    --cc=john@neggie.net \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --subject='Re: Add INPUT support to toshiba_acpi' \
    /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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).