Re: [PATCH 7/9] iio: imu: st_lsm6dsx: make event management functions generic
From: Andy Shevchenko
Date: Thu Oct 30 2025 - 09:36:29 EST
On Thu, Oct 30, 2025 at 12:17:52PM +0100, Francesco Lavra wrote:
> On Thu, 2025-10-30 at 10:15 +0200, Andy Shevchenko wrote:
> > On Thu, Oct 30, 2025 at 08:27:50AM +0100, Francesco Lavra wrote:
...
> > > +static bool
> > > +st_lsm6dsx_report_motion_event(struct st_lsm6dsx_hw *hw)
> >
> > Why not one line?
>
> This function was already there as is, even though the diff makes it appear
> as a new function. Will make it one line.
Do you use --histogram diff algo when preparing patches? Perhaps that helps
without modifying the code?
...
> > > + events_found = st_lsm6dsx_report_events(hw,
> > > ST_LSM6DSX_EVENT_WAKEUP, IIO_EV_TYPE_THRESH,
> > > + IIO_EV_DIR_EITHER);
> >
> > Indentation.
>
> Seems good to me, what should I change?
First line is way too long for IIO which tries to keep 80 limit.
--
With Best Regards,
Andy Shevchenko