On Tue, Mar 05 2024 at 18:39, Biju Das wrote: Sorry. I just noticed that this series fell through the cracks. > static int rzg2l_irq_set_type(struct irq_data *d, unsigned int type) > { > - unsigned int hw_irq = irqd_to_hwirq(d) - IRQC_IRQ_START; > struct rzg2l_irqc_priv *priv = irq_data_to_priv(d); > + unsigned int hwirq = irqd_to_hwirq(d); > + u32 iitseln = hwirq - IRQC_IRQ_START; > + bool clear_irq_int = false; > + unsigned long flags; > u16 sense, tmp; > > switch (type & IRQ_TYPE_SENSE_MASK) { > @@ -192,37 +195,59 @@ static int rzg2l_irq_set_type(struct irq_data *d, unsigned int type) > > case IRQ_TYPE_EDGE_FALLING: > sense = IITSR_IITSEL_EDGE_FALLING; > + clear_irq_int = true; > break; > > case IRQ_TYPE_EDGE_RISING: > sense = IITSR_IITSEL_EDGE_RISING; > + clear_irq_int = true; > break; > > case IRQ_TYPE_EDGE_BOTH: > sense = IITSR_IITSEL_EDGE_BOTH; > + clear_irq_int = true; > break; > > default: > return -EINVAL; > } > > - raw_spin_lock(&priv->lock); > + raw_spin_lock_irqsave(&priv->lock, flags); irq_set_type() is always called with irq_desc::lock held and interrupts disabled. What's exactly the point of this change?