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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to