LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Parag Warudkar <parag.warudkar@gmail.com>
To: linux-kernel@vger.kernel.org
Cc: akpm@linux-foundation.org, torvalds@linux-foundation.org
Subject: keyboard.c: Stop flooding dmesg with useless warnings
Date: Sat, 24 Mar 2007 23:32:03 -0400 (EDT)	[thread overview]
Message-ID: <Pine.LNX.4.64.0703242315160.492@paragw-desktop> (raw)


I use  Apple keyboard and mouse which seem to generate events with 
keycode==0.

keyboard.c floods dmesg endlessly with below messages. This happens at a 
very fast rate and never stops, leaving the dmesg unusable.

[46591.960000] keyboard.c: can't emulate rawmode for keycode 0
[46591.996000] keyboard.c: can't emulate rawmode for keycode 0
[46592.032000] keyboard.c: can't emulate rawmode for keycode 0
[46592.068000] keyboard.c: can't emulate rawmode for keycode 0
[46592.104000] keyboard.c: can't emulate rawmode for keycode 0
[46592.140000] keyboard.c: can't emulate rawmode for keycode 0
[46592.176000] keyboard.c: can't emulate rawmode for keycode 0
[46592.212000] keyboard.c: can't emulate rawmode for keycode 0
[46592.248000] keyboard.c: can't emulate rawmode for keycode 0

The patch below avoids printing the warning if keycode == KEY_RESERVED.

If a more correct fix is possible please let me know and I will redo this.
(I suspect avoiding call to emulate_raw() with value ranges it cannot 
emulate might be a better fix?)

Otherwise please consider applying.

Signed-off-by: Parag Warudkar <parag.warudkar@gmail.com>

--- linux-2.6-wk/drivers/char/keyboard.c	2007-03-24 23:01:19.000000000 -0400
+++ linux-2.6/drivers/char/keyboard.c	2007-03-24 21:43:58.000000000 -0400
@@ -1161,7 +1161,7 @@

  	if ((raw_mode = (kbd->kbdmode == VC_RAW)) && !hw_raw)
  		if (emulate_raw(vc, keycode, !down << 7))
-			if (keycode < BTN_MISC && keycode != KEY_RESERVED)
+			if (keycode < BTN_MISC)
  				printk(KERN_WARNING "keyboard.c: can't emulate rawmode for keycode %d\n", keycode);

  #ifdef CONFIG_MAGIC_SYSRQ	       /* Handle the SysRq Hack */

             reply	other threads:[~2007-03-25  3:32 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-25  3:32 Parag Warudkar [this message]
2007-03-25  3:38 ` Parag Warudkar
     [not found]   ` <BAY144-F24481F006CCA5D5D74D6F4DF680@phx.gbl>
2007-03-25  4:28     ` About GCC4 Optimization Linus Torvalds
2007-03-25  5:07       ` David Schwartz
2007-03-25  4:31     ` Andrew Morton
2007-03-25  5:15   ` keyboard.c: Stop flooding dmesg with useless warnings Dmitry Torokhov
2007-03-25  5:27     ` Parag Warudkar
2007-03-25  5:29       ` Dmitry Torokhov
2007-03-25  5:35         ` Parag Warudkar
2007-03-25  9:16           ` Jiri Kosina
2007-03-25 14:32             ` Parag Warudkar

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=Pine.LNX.4.64.0703242315160.492@paragw-desktop \
    --to=parag.warudkar@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@linux-foundation.org \
    --subject='Re: keyboard.c: Stop flooding dmesg with useless warnings' \
    /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).