mirror of
https://github.com/torvalds/linux.git
synced 2026-01-25 15:03:52 +08:00
genirq/irqdesc: Decrease indentation level in __irq_get_desc_lock()
There is a conditional that covers all the code for the entire function. Invert it and decrease indentation level. This also helps for further changes to be clearer and tidier. [ tglx: Removed line breaks ] Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Link: https://lore.kernel.org/all/20250416114122.2191820-2-andriy.shevchenko@linux.intel.com
This commit is contained in:
committed by
Thomas Gleixner
parent
0128816c42
commit
e5032ead85
@@ -896,27 +896,27 @@ unsigned int irq_get_next_irq(unsigned int offset)
|
||||
return irq_find_at_or_after(offset);
|
||||
}
|
||||
|
||||
struct irq_desc *
|
||||
__irq_get_desc_lock(unsigned int irq, unsigned long *flags, bool bus,
|
||||
unsigned int check)
|
||||
struct irq_desc *__irq_get_desc_lock(unsigned int irq, unsigned long *flags, bool bus,
|
||||
unsigned int check)
|
||||
{
|
||||
struct irq_desc *desc = irq_to_desc(irq);
|
||||
struct irq_desc *desc;
|
||||
|
||||
if (desc) {
|
||||
if (check & _IRQ_DESC_CHECK) {
|
||||
if ((check & _IRQ_DESC_PERCPU) &&
|
||||
!irq_settings_is_per_cpu_devid(desc))
|
||||
return NULL;
|
||||
desc = irq_to_desc(irq);
|
||||
if (!desc)
|
||||
return NULL;
|
||||
|
||||
if (!(check & _IRQ_DESC_PERCPU) &&
|
||||
irq_settings_is_per_cpu_devid(desc))
|
||||
return NULL;
|
||||
}
|
||||
if (check & _IRQ_DESC_CHECK) {
|
||||
if ((check & _IRQ_DESC_PERCPU) && !irq_settings_is_per_cpu_devid(desc))
|
||||
return NULL;
|
||||
|
||||
if (bus)
|
||||
chip_bus_lock(desc);
|
||||
raw_spin_lock_irqsave(&desc->lock, *flags);
|
||||
if (!(check & _IRQ_DESC_PERCPU) && irq_settings_is_per_cpu_devid(desc))
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (bus)
|
||||
chip_bus_lock(desc);
|
||||
raw_spin_lock_irqsave(&desc->lock, *flags);
|
||||
|
||||
return desc;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user