public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [RFC] add a WARN in setup_irq function for the IRQF_DISABLED flag
@ 2013-06-07 22:17 Daniel Lezcano
  2013-06-07 22:19 ` Daniel Lezcano
  0 siblings, 1 reply; 2+ messages in thread
From: Daniel Lezcano @ 2013-06-07 22:17 UTC (permalink / raw)
  To: Thomas Gleixner; +Cc: Linux Kernel Mailing List


Hi,

we are still seeing drivers with the irq flag IRQF_DISABLED present and
*new* drivers submitted with this flag set.

I am wondering if we can add a WARN in the setup_irq function about this
flag. May be it is a bit rough but people will pay attention.

Thanks

  -- Daniel

Index: clockevents/kernel/irq/manage.c
===================================================================
--- clockevents.orig/kernel/irq/manage.c        2013-06-05
23:57:22.723446115 +0200
+++ clockevents/kernel/irq/manage.c     2013-06-08 00:12:19.985035465 +0200
@@ -1212,6 +1212,9 @@ int setup_irq(unsigned int irq, struct i

        if (WARN_ON(irq_settings_is_per_cpu_devid(desc)))
                return -EINVAL;
+
+       WARN(act->flags & IRQF_DISABLED, "IRQF_DISABLED flag is disabled");
+
        chip_bus_lock(desc);
        retval = __setup_irq(irq, desc, act);
        chip_bus_sync_unlock(desc);

-- 
 <http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [RFC] add a WARN in setup_irq function for the IRQF_DISABLED flag
  2013-06-07 22:17 [RFC] add a WARN in setup_irq function for the IRQF_DISABLED flag Daniel Lezcano
@ 2013-06-07 22:19 ` Daniel Lezcano
  0 siblings, 0 replies; 2+ messages in thread
From: Daniel Lezcano @ 2013-06-07 22:19 UTC (permalink / raw)
  To: Thomas Gleixner; +Cc: Linux Kernel Mailing List

On 06/08/2013 12:17 AM, Daniel Lezcano wrote:
> 
> Hi,
> 
> we are still seeing drivers with the irq flag IRQF_DISABLED present and
> *new* drivers submitted with this flag set.
> 
> I am wondering if we can add a WARN in the setup_irq function about this
> flag. May be it is a bit rough but people will pay attention.

s/rough/brutal :)

> Thanks
> 
>   -- Daniel
> 
> Index: clockevents/kernel/irq/manage.c
> ===================================================================
> --- clockevents.orig/kernel/irq/manage.c        2013-06-05
> 23:57:22.723446115 +0200
> +++ clockevents/kernel/irq/manage.c     2013-06-08 00:12:19.985035465 +0200
> @@ -1212,6 +1212,9 @@ int setup_irq(unsigned int irq, struct i
> 
>         if (WARN_ON(irq_settings_is_per_cpu_devid(desc)))
>                 return -EINVAL;
> +
> +       WARN(act->flags & IRQF_DISABLED, "IRQF_DISABLED flag is disabled");
> +
>         chip_bus_lock(desc);
>         retval = __setup_irq(irq, desc, act);
>         chip_bus_sync_unlock(desc);
> 


-- 
 <http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-06-07 22:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-07 22:17 [RFC] add a WARN in setup_irq function for the IRQF_DISABLED flag Daniel Lezcano
2013-06-07 22:19 ` Daniel Lezcano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox