All of lore.kernel.org
 help / color / mirror / Atom feed
From: Qi Yong <qiyong@mail.fc-cn.com>
To: dtor@mail.ru
Cc: dmitry.torokhov@gmail.com, linux-input@atrey.karlin.mff.cuni.cz,
	linux-kernel@vger.kernel.org, akpm@linux-foundation.org
Subject: [patch] add printk_ratelimit to atkbd_interrupt
Date: Wed, 20 Jun 2007 09:17:53 +0800	[thread overview]
Message-ID: <20070620011753.GA16692@virgo.fc-cn.com> (raw)

Add printk_ratelimit() to atkbd_interrupt(). I get "Spurious ACK" messages flushing on my
screen. This patch helps to read the screen.

Signed-off-by: Qi Yong <qiyong@mail.fc-cn.com>
--
diff --git a/drivers/input/keyboard/atkbd.c b/drivers/input/keyboard/atkbd.c
index be1fe46..13e6bd4 100644
--- a/drivers/input/keyboard/atkbd.c
+++ b/drivers/input/keyboard/atkbd.c
@@ -408,9 +408,10 @@ static irqreturn_t atkbd_interrupt(struct serio *serio, unsigned char data,
 			goto out;
 		case ATKBD_RET_ACK:
 		case ATKBD_RET_NAK:
-			printk(KERN_WARNING "atkbd.c: Spurious %s on %s. "
-			       "Some program might be trying access hardware directly.\n",
-			       data == ATKBD_RET_ACK ? "ACK" : "NAK", serio->phys);
+			if (printk_ratelimit())
+				printk(KERN_WARNING "atkbd.c: Spurious %s on %s. "
+				       "Some program might be trying access hardware directly.\n",
+				       data == ATKBD_RET_ACK ? "ACK" : "NAK", serio->phys);
 			goto out;
 		case ATKBD_RET_HANGEUL:
 		case ATKBD_RET_HANJA:

             reply	other threads:[~2007-06-20  1:17 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-20  1:17 Qi Yong [this message]
2007-06-20  4:13 ` [patch] add printk_ratelimit to atkbd_interrupt Dmitry Torokhov
2007-06-20  7:34   ` Qi Yong
2007-06-21  3:07     ` Dmitry Torokhov

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=20070620011753.GA16692@virgo.fc-cn.com \
    --to=qiyong@mail.fc-cn.com \
    --cc=akpm@linux-foundation.org \
    --cc=dmitry.torokhov@gmail.com \
    --cc=dtor@mail.ru \
    --cc=linux-input@atrey.karlin.mff.cuni.cz \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.