Re: [PATCH 04/15] iio: common: st: use irq_get_trigger_type()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 2 Sep 2024 14:44:06 +0300
Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx> wrote:

> On Sun, Sep 01, 2024 at 02:59:39PM +0100, Jonathan Cameron wrote:
> > From: Jonathan Cameron <Jonathan.Cameron@xxxxxxxxxx>
> > 
> > Use irq_get_trigger_type() to replace getting the irq data then the
> > type in two steps.  
> 
> ...
> 
> > -	irq_trig = irqd_get_trigger_type(irq_get_irq_data(sdata->irq));
> > +	irq_trig = irq_get_trigger_type(sdata->irq);  
> 
> Usually I think the
> 
> 	/* ...comment on flow... */
> 	foo = bar();
> 	...something with foo that is commented above...
> 
> is slightly better as after reading the comment we immediately see where the
> foo comes from.
> 
> >  	/*
> >  	 * If the IRQ is triggered on falling edge, we need to mark the
> >  	 * interrupt as active low, if the hardware supports this.  
> 
> But, it's not a big deal.
Agreed it makes sense.

This just goes to show how little I looked at surrounding code
when putting this set together.

I've reordered and added a note on that to the description.
> 





[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux