From: Vinayak Kale <vkale@apm.com>
To: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org
Cc: tglx@linutronix.de, will.deacon@arm.com, patches@apm.com,
jcm@redhat.com, Vinayak Kale <vkale@apm.com>
Subject: [PATCH 1/2] genirq: error reporting in request_percpu_irq() and request_threaded_irq()
Date: Wed, 6 Nov 2013 17:37:36 +0530 [thread overview]
Message-ID: <1383739658-10036-2-git-send-email-vkale@apm.com> (raw)
In-Reply-To: <1383739658-10036-1-git-send-email-vkale@apm.com>
Return a separate error code when invalid interrupt type is passed to
request_percpu_irq() and request_threaded_irq().
Suggested-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Vinayak Kale <vkale@apm.com>
---
kernel/irq/manage.c | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c
index 514bcfd..08fffaf 100644
--- a/kernel/irq/manage.c
+++ b/kernel/irq/manage.c
@@ -1414,10 +1414,12 @@ int request_threaded_irq(unsigned int irq, irq_handler_t handler,
if (!desc)
return -EINVAL;
- if (!irq_settings_can_request(desc) ||
- WARN_ON(irq_settings_is_per_cpu_devid(desc)))
+ if (!irq_settings_can_request(desc))
return -EINVAL;
+ if (irq_settings_is_per_cpu_devid(desc))
+ return -EPERM;
+
if (!handler) {
if (!thread_fn)
return -EINVAL;
@@ -1671,10 +1673,12 @@ int request_percpu_irq(unsigned int irq, irq_handler_t handler,
return -EINVAL;
desc = irq_to_desc(irq);
- if (!desc || !irq_settings_can_request(desc) ||
- !irq_settings_is_per_cpu_devid(desc))
+ if (!desc || !irq_settings_can_request(desc))
return -EINVAL;
+ if (!irq_settings_is_per_cpu_devid(desc))
+ return -EPERM;
+
action = kzalloc(sizeof(struct irqaction), GFP_KERNEL);
if (!action)
return -ENOMEM;
--
1.7.9.5
next prev parent reply other threads:[~2013-11-06 12:08 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-06 12:07 [PATCH 0/2] genirq: arm64: perf: support for percpu pmu interrupt Vinayak Kale
2013-11-06 12:07 ` Vinayak Kale [this message]
2013-11-06 12:07 ` [PATCH 2/2] arm64: perf: add " Vinayak Kale
2013-11-08 15:57 ` Will Deacon
2013-11-11 9:30 ` Vinayak Kale
2013-11-09 1:04 ` Stephen Boyd
2013-11-09 1:04 ` [PATCH 0/2] genirq: arm64: perf: " Stephen Boyd
2013-11-11 9:25 ` Vinayak Kale
2013-11-11 10:44 ` Will Deacon
2013-11-11 12:33 ` Ganapat Rao P Kulkarni
2013-11-12 6:00 ` Vinayak Kale
2013-11-12 8:31 ` Thomas Gleixner
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=1383739658-10036-2-git-send-email-vkale@apm.com \
--to=vkale@apm.com \
--cc=jcm@redhat.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=patches@apm.com \
--cc=tglx@linutronix.de \
--cc=will.deacon@arm.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®