public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: vkale@apm.com (Vinayak Kale)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] genirq: error reporting for non-percpu interrupt in request_percpu_irq()
Date: Fri, 18 Oct 2013 15:36:29 +0530	[thread overview]
Message-ID: <1382090789-18177-1-git-send-email-vkale@apm.com> (raw)

Return a separate error code when a non-percpu interrupt is passed to
request_percpu_irq().

Suggested-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Vinayak Kale <vkale@apm.com>
---
 kernel/irq/manage.c |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c
index 514bcfd..c2713ae 100644
--- a/kernel/irq/manage.c
+++ b/kernel/irq/manage.c
@@ -1671,10 +1671,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

             reply	other threads:[~2013-10-18 10:06 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-18 10:06 Vinayak Kale [this message]
2013-10-18 10:09 ` [PATCH] genirq: error reporting for non-percpu interrupt in request_percpu_irq() Vinayak Kale
2013-10-29 12:59   ` Thomas Gleixner
2013-10-29 16:15     ` Vinayak Kale
2013-10-18 10:31 ` Will Deacon
2013-10-18 11:03   ` Vinayak Kale
2013-10-18 14:12     ` Vinayak Kale

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=1382090789-18177-1-git-send-email-vkale@apm.com \
    --to=vkale@apm.com \
    --cc=linux-arm-kernel@lists.infradead.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox