From: Jonathan Corbet <corbet@lwn.net>
To: Jiri Kosina <jkosina@suse.cz>
Cc: Dave Jones <davej@redhat.com>,
Linux Kernel <linux-kernel@vger.kernel.org>
Subject: Re: dummy irq trace 'Flags mismatch'
Date: Tue, 30 Apr 2013 07:28:17 -0600 [thread overview]
Message-ID: <20130430072817.61d3ca9f@lwn.net> (raw)
In-Reply-To: <alpine.LNX.2.00.1304300651080.20139@pobox.suse.cz>
On Tue, 30 Apr 2013 06:59:22 +0200 (CEST)
Jiri Kosina <jkosina@suse.cz> wrote:
> Or have it depend on CONFIG_EXPERT would probably make most sense ... ?
We could also just have it tell you when you screwed up? Something like
the following (compile tested only)?
jon
---
dummy-irq: require the user to specify an IRQ number
Reported-by: Dave Jones <davej@redhat.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
diff --git a/drivers/misc/dummy-irq.c b/drivers/misc/dummy-irq.c
index 7014167..c37eeed 100644
--- a/drivers/misc/dummy-irq.c
+++ b/drivers/misc/dummy-irq.c
@@ -19,7 +19,7 @@
#include <linux/irq.h>
#include <linux/interrupt.h>
-static int irq;
+static int irq = -1;
static irqreturn_t dummy_interrupt(int irq, void *dev_id)
{
@@ -36,6 +36,10 @@ static irqreturn_t dummy_interrupt(int irq, void *dev_id)
static int __init dummy_irq_init(void)
{
+ if (irq < 0) {
+ printk(KERN_ERR "dummy-irq: no IRQ given. Use irq=N\n");
+ return -EIO;
+ }
if (request_irq(irq, &dummy_interrupt, IRQF_SHARED, "dummy_irq", &irq)) {
printk(KERN_ERR "dummy-irq: cannot register IRQ %d\n", irq);
return -EIO;
next prev parent reply other threads:[~2013-04-30 14:00 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-29 21:16 dummy irq trace 'Flags mismatch' Dave Jones
2013-04-30 4:59 ` Jiri Kosina
2013-04-30 13:28 ` Jonathan Corbet [this message]
2013-04-30 20:42 ` [PATCH] dummy-irq: require the user to specify an IRQ number Jiri Kosina
2013-04-30 20:50 ` Greg Kroah-Hartman
2013-04-30 21:12 ` Jiri Kosina
2013-04-30 23:53 ` Greg Kroah-Hartman
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=20130430072817.61d3ca9f@lwn.net \
--to=corbet@lwn.net \
--cc=davej@redhat.com \
--cc=jkosina@suse.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.