Message ID | 20240901135950.797396-1-jic23@kernel.org (mailing list archive) |
---|---|
Headers | show |
Series | IIO: use irq_get_trigger_type() instead of opencoding. | expand |
On Sun, Sep 01, 2024 at 02:59:35PM +0100, Jonathan Cameron wrote: > From: Jonathan Cameron <Jonathan.Cameron@huawei.com> > > Andy pointed out in a review that there is an irq_get_trigger_type() > helper that first gets the irq data then extracts the type from it. > This saves on opencoding those two steps when the irq data isn't used > for anything else. > > Update all the sites this pattern occurs in IIO to use the helper. > In a few cases there will be a slightly different error message is > somehow there is a valid irq number passed to this call and it doesn't > have the data associated with it. Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> There are some nit-picks, up to you how to proceed with them (only one seems better to address is where the reversed xmas tree ordering is broken).
On Mon, 2 Sep 2024 14:49:19 +0300 Andy Shevchenko <andriy.shevchenko@linux.intel.com> wrote: > On Sun, Sep 01, 2024 at 02:59:35PM +0100, Jonathan Cameron wrote: > > From: Jonathan Cameron <Jonathan.Cameron@huawei.com> > > > > Andy pointed out in a review that there is an irq_get_trigger_type() > > helper that first gets the irq data then extracts the type from it. > > This saves on opencoding those two steps when the irq data isn't used > > for anything else. > > > > Update all the sites this pattern occurs in IIO to use the helper. > > In a few cases there will be a slightly different error message is > > somehow there is a valid irq number passed to this call and it doesn't > > have the data associated with it. > > Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> > > There are some nit-picks, up to you how to proceed with them (only one seems > better to address is where the reversed xmas tree ordering is broken). > I made the changes suggested. Applied to the togreg branch of iio.git. I think these will probably wait for next cycle now given timing. Jonathan
From: Jonathan Cameron <Jonathan.Cameron@huawei.com> Andy pointed out in a review that there is an irq_get_trigger_type() helper that first gets the irq data then extracts the type from it. This saves on opencoding those two steps when the irq data isn't used for anything else. Update all the sites this pattern occurs in IIO to use the helper. In a few cases there will be a slightly different error message is somehow there is a valid irq number passed to this call and it doesn't have the data associated with it. Jonathan Cameron (15): iio: accel: adxl380: use irq_get_trigger_type() iio: accel: fxls8962af: use irq_get_trigger_type() iio: adc: ti-ads1015: use irq_get_trigger_type() iio: common: st: use irq_get_trigger_type() iio: gyro: fxas21002c: use irq_get_trigger_type() iio: gyro: mpu3050: use irq_get_trigger_type() iio: humidity: hts221: use irq_get_trigger_type() iio: imu: bmi160: use irq_get_trigger_type() iio: imu: bmi323: use irq_get_trigger_type() iio: imu: inv_icm42600: use irq_get_trigger_type() iio: imu: inv_mpu6050: use irq_get_trigger_type() iio: imu: st_lsm6dsx: use irq_get_trigger_type() iio: light: st_uvis25: use irq_get_trigger_type() iio: magn: ak8974: use irq_get_trigger_type() iio: pressure: bmp280: use irq_get_trigger_type() drivers/iio/accel/adxl380.c | 7 +------ drivers/iio/accel/fxls8962af-core.c | 2 +- drivers/iio/adc/ti-ads1015.c | 2 +- drivers/iio/common/st_sensors/st_sensors_trigger.c | 2 +- drivers/iio/gyro/fxas21002c_core.c | 2 +- drivers/iio/gyro/mpu3050-core.c | 2 +- drivers/iio/humidity/hts221_buffer.c | 2 +- drivers/iio/imu/bmi160/bmi160_core.c | 11 +---------- drivers/iio/imu/bmi323/bmi323_core.c | 8 +------- drivers/iio/imu/inv_icm42600/inv_icm42600_core.c | 10 +--------- drivers/iio/imu/inv_mpu6050/inv_mpu_core.c | 9 +-------- drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c | 2 +- drivers/iio/light/st_uvis25_core.c | 2 +- drivers/iio/magnetometer/ak8974.c | 2 +- drivers/iio/pressure/bmp280-core.c | 2 +- 15 files changed, 15 insertions(+), 50 deletions(-)