From: Jonathan Cameron <jic23@kernel.org>
To: Francesco Lavra <flavra@baylibre.com>
Cc: "Andy Shevchenko" <andriy.shevchenko@intel.com>,
"Lorenzo Bianconi" <lorenzo@kernel.org>,
"David Lechner" <dlechner@baylibre.com>,
"Nuno Sá" <nuno.sa@analog.com>,
"Andy Shevchenko" <andy@kernel.org>,
linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] iio: imu: st_lsm6dsx: fix array size for st_lsm6dsx_settings fields
Date: Sun, 19 Oct 2025 11:46:45 +0100 [thread overview]
Message-ID: <20251019114645.6e352caa@jic23-huawei> (raw)
In-Reply-To: <41f72463394e5e9110f5c889049e9592d3a8efa8.camel@baylibre.com>
On Sat, 18 Oct 2025 20:55:40 +0200
Francesco Lavra <flavra@baylibre.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.
prev parent reply other threads:[~2025-10-19 10:46 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-17 17:32 [PATCH] iio: imu: st_lsm6dsx: fix array size for st_lsm6dsx_settings fields Francesco Lavra
2025-10-18 9:33 ` Lorenzo Bianconi
2025-10-18 19:17 ` Jonathan Cameron
2025-10-18 17:30 ` Andy Shevchenko
2025-10-18 18:55 ` Francesco Lavra
2025-10-19 10:46 ` Jonathan Cameron [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20251019114645.6e352caa@jic23-huawei \
--to=jic23@kernel.org \
--cc=andriy.shevchenko@intel.com \
--cc=andy@kernel.org \
--cc=dlechner@baylibre.com \
--cc=flavra@baylibre.com \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lorenzo@kernel.org \
--cc=nuno.sa@analog.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).