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: <lipouuxehycprgdxg4yqg4wuw7pqpeynpfbzzpukatn3wbnwak@znjzqj434atw>
Date: Sat, 13 Sep 2025 09:46:33 -0300
From: Gustavo Silva <gustavograzs@...il.com>
To: Andy Shevchenko <andy.shevchenko@...il.com>
Cc: lanzano.alex@...il.com, jic23@...nel.org, dlechner@...libre.com, 
	nuno.sa@...log.com, andy@...nel.org, linux-iio@...r.kernel.org, 
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH v5 3/4] iio: imu: bmi270: add support for motion events

On Sat, Aug 30, 2025 at 03:44:37PM +0300, Andy Shevchenko wrote:

Hi Andy. Thank you for the review. I just have one question before
sending v6.
> 
> > +#define BMI270_INT_MICRO_TO_RAW(val, val2, scale) \
> > +       ((val) * (scale) + ((val2) * (scale)) / MEGA)
> > +#define BMI270_RAW_TO_MICRO(raw, scale) \
> > +       ((((raw) % (scale)) * MEGA) / scale)
> 
> In the macro names "MICRO" in the implementation "MEGA", please make
> this consistent.
> 
These macros are intended to work with values of type
IIO_VAL_INT_PLUS_MICRO. The division by MEGA is what produces the
fractional part in micro, so the naming was chosen to reflect the
result.
If you prefer, I can rename them for clarity. But please note that the
same naming is already used in the BMI323 driver, and I kept it
consistent here.
> 
> -- 
> With Best Regards,
> Andy Shevchenko

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ