[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20251019114645.6e352caa@jic23-huawei>
Date: Sun, 19 Oct 2025 11:46:45 +0100
From: Jonathan Cameron <jic23@...nel.org>
To: Francesco Lavra <flavra@...libre.com>
Cc: Andy Shevchenko <andriy.shevchenko@...el.com>, Lorenzo Bianconi
<lorenzo@...nel.org>, David Lechner <dlechner@...libre.com>, Nuno
Sá <nuno.sa@...log.com>, Andy Shevchenko <andy@...nel.org>,
linux-iio@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] iio: imu: st_lsm6dsx: fix array size for
st_lsm6dsx_settings fields
On Sat, 18 Oct 2025 20:55:40 +0200
Francesco Lavra <flavra@...libre.com> wrote:
> On Sat, 2025-10-18 at 20:30 +0300, Andy Shevchenko wrote:
> > On Fri, Oct 17, 2025 at 07:32:08PM +0200, Francesco Lavra wrote:
> > > The `decimator` and `batch` fields of struct st_lsm6dsx_settings
> > > are arrays indexed by sensor type, not by sensor hardware
> > > identifier; moreover, the `batch` field is only used for the
> > > accelerometer and gyroscope.
> > > Change the array size for `decimator` from ST_LSM6DSX_MAX_ID to
> > > ST_LSM6DSX_ID_MAX, and change the array size for `batch` from
> > > ST_LSM6DSX_MAX_ID to 2; move the enum st_lsm6dsx_sensor_id
> > > definition so that the ST_LSM6DSX_ID_MAX value is usable within
> > > the struct st_lsm6dsx_settings definition.
> >
> > ...
> >
> > > +enum st_lsm6dsx_sensor_id {
> > > + ST_LSM6DSX_ID_GYRO,
> > > + ST_LSM6DSX_ID_ACC,
> > > + ST_LSM6DSX_ID_EXT0,
> > > + ST_LSM6DSX_ID_EXT1,
> > > + ST_LSM6DSX_ID_EXT2,
> >
> >
> >
> > > + ST_LSM6DSX_ID_MAX,
> >
> > Is it a termination entry? (Looks like that to me) Can we drop trailing
> > comma
> > while at it?
>
> Yes, it's a termination entry, I will drop the trailing comma.
>
> > > +};
I tweaked it. So no need for new version.
Powered by blists - more mailing lists