public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: will.deacon@arm.com (Will Deacon)
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 11:31:18 +0100	[thread overview]
Message-ID: <20131018103117.GA3296@mudshark.cambridge.arm.com> (raw)
In-Reply-To: <1382090789-18177-1-git-send-email-vkale@apm.com>

On Fri, Oct 18, 2013 at 11:06:29AM +0100, Vinayak Kale wrote:
> 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;

<bikeshedding> I reckon -ENODEV is clearer here. </bikeshedding>

Also, there's a counterpart to this code in request_threaded_irq, where I
think we should do something similar.

Will

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

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-18 10:06 [PATCH] genirq: error reporting for non-percpu interrupt in request_percpu_irq() Vinayak Kale
2013-10-18 10:09 ` Vinayak Kale
2013-10-29 12:59   ` Thomas Gleixner
2013-10-29 16:15     ` Vinayak Kale
2013-10-18 10:31 ` Will Deacon [this message]
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=20131018103117.GA3296@mudshark.cambridge.arm.com \
    --to=will.deacon@arm.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