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: <aWjyjLnNE-K0AyUi@smile.fi.intel.com>
Date: Thu, 15 Jan 2026 15:58:36 +0200
From: Andy Shevchenko <andriy.shevchenko@...el.com>
To: Lorenzo Bianconi <lorenzo@...nel.org>
Cc: Francesco Lavra <flavra@...libre.com>,
	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 3/3] iio: imu: st_lsm6dsx: Add support for rotation
 sensor

On Thu, Jan 15, 2026 at 02:51:43PM +0100, Lorenzo Bianconi wrote:
> On Jan 15, Andy Shevchenko wrote:
> > On Thu, Jan 15, 2026 at 02:32:11PM +0100, Lorenzo Bianconi wrote:

...

> > > > +	settings = &sensor->hw->settings->sf_settings;
> > > > +	switch (mask) {
> > > > +	case IIO_CHAN_INFO_SAMP_FREQ: {
> > > > +		u32 odr_mHz;
> > > > +		u8 odr_val;
> > > > +
> > > > +		odr_mHz = val * MILLI + val2 * MILLI / MICRO;
> > > > +		err = st_lsm6dsx_sf_get_odr_val(settings, odr_mHz, &odr_val);
> > > > +		if (err)
> > > > +			return err;
> > > > +
> > > > +		sensor->hwfifo_odr_mHz = odr_mHz;
> > > > +		return 0;
> > > 
> > > break;
> > > 
> > > > +	}
> > > > +	default:
> > > > +		return -EINVAL;
> > > 
> > > break;
> > > 
> > > > +	}
> > > 
> > > return err;
> > 
> > Why?
> 
> I guess it is more clear, but just a Nit, I can live with the current implementation.

At least what you proposed is the opposite to the style that is accepted
in IIO.

-- 
With Best Regards,
Andy Shevchenko



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ