Re: [PATCH RFC 3/3] iio: core: use kstrtodec64() to parse fixed-point values

From: Andy Shevchenko

Date: Fri Oct 02 2026 - 04:05:23 EST


On Thu, Oct 01, 2026 at 12:34:58PM -0300, Rodrigo Alencar via B4 Relay wrote:

...

> + /* fract_mult = 10^n, so ffs(10^n) = ffs(2^n * 5^n) = n + 1 */
> + unsigned int scale = ffs(fract_mult);

Hmm... It's not obvious. Maybe you want to use int_log() instead?

--
With Best Regards,
Andy Shevchenko