File tree Expand file tree Collapse file tree 1 file changed +3
-13
lines changed Expand file tree Collapse file tree 1 file changed +3
-13
lines changed Original file line number Diff line number Diff line change @@ -2322,19 +2322,9 @@ void enable_percpu_nmi(unsigned int irq, unsigned int type)
2322
2322
*/
2323
2323
bool irq_percpu_is_enabled (unsigned int irq )
2324
2324
{
2325
- unsigned int cpu = smp_processor_id ();
2326
- struct irq_desc * desc ;
2327
- unsigned long flags ;
2328
- bool is_enabled ;
2329
-
2330
- desc = irq_get_desc_lock (irq , & flags , IRQ_GET_DESC_CHECK_PERCPU );
2331
- if (!desc )
2332
- return false;
2333
-
2334
- is_enabled = cpumask_test_cpu (cpu , desc -> percpu_enabled );
2335
- irq_put_desc_unlock (desc , flags );
2336
-
2337
- return is_enabled ;
2325
+ scoped_irqdesc_get_and_lock (irq , IRQ_GET_DESC_CHECK_PERCPU )
2326
+ return cpumask_test_cpu (smp_processor_id (), scoped_irqdesc -> percpu_enabled );
2327
+ return false;
2338
2328
}
2339
2329
EXPORT_SYMBOL_GPL (irq_percpu_is_enabled );
2340
2330
You can’t perform that action at this time.
0 commit comments