lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <aSAyE0xQ15k4Qqwk@smile.fi.intel.com>
Date: Fri, 21 Nov 2025 11:34:11 +0200
From: Andy Shevchenko <andriy.shevchenko@...el.com>
To: Francesco Lavra <flavra@...libre.com>
Cc: Lorenzo Bianconi <lorenzo@...nel.org>,
	Jonathan Cameron <jic23@...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 v2 5/9] iio: imu: st_lsm6dsx: remove event_threshold
 field from hw struct

On Fri, Nov 21, 2025 at 09:43:28AM +0100, Francesco Lavra wrote:
> On Fri, 2025-11-21 at 09:14 +0100, Lorenzo Bianconi wrote:
> > > This field is used to store the wakeup event detection threshold value.
> > > When adding support for more event types, some of which may have
> > > different
> > > threshold values for different axes, storing all threshold values for
> > > all
> > > event sources would be cumbersome. Thus, remove this field altogether,
> > > and
> > > read the currently configured value from the sensor when requested by
> > > userspace.
> > > 
> > > Signed-off-by: Francesco Lavra <flavra@...libre.com>

> > Just a nit inline, fixing it:

...

> > > +#define st_lsm6dsx_field_get(mask, reg)        ((reg & mask) >>
> > > __ffs(mask))
> > 
> > To be aligned with the rest of the code, I guess we could use capital
> > letters
> > here:
> > 
> >         #define ST_LSM6DSX_FIELD_GET(mask, reg)▸     ((reg & mask) >>
> > __ffs(mask))
> 
> That's what I proposed initially, but Andy suggested [1] using small
> letters instead.
> 
> https://lore.kernel.org/linux-iio/aQh4m25uVBV8A09F@smile.fi.intel.com/

Yes, this should be temporary as there is a pending series to make field_get()
to appear in the common header, so this one will be removed, we may even do
that after v6.19-rc1 as a (semi-)fix if Jonathan agrees on that.

-- 
With Best Regards,
Andy Shevchenko



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ