Re: [PATCH v7 2/8] iio: core: add fixed point parsing with 64-bit parts
From: Rodrigo Alencar
Date: Mon Feb 23 2026 - 05:38:45 EST
On 26/02/23 11:06AM, Andy Shevchenko wrote:
> On Sun, Feb 22, 2026 at 05:29:12PM +0000, Jonathan Cameron wrote:
> > On Mon, 16 Feb 2026 15:02:17 +0000
> > Rodrigo Alencar via B4 Relay <devnull+rodrigo.alencar.analog.com@xxxxxxxxxx> wrote:
> >
> > > Add iio_str_to_fixpoint64() function that leverages simple_strtoull()
> > > to parse numbers from a string.
> > > A helper function __iio_str_to_fixpoint64() replaces
> > > __iio_str_to_fixpoint() implementation, extending its usage for
> > > 64-bit fixed-point parsing.
> > >
> > > Signed-off-by: Rodrigo Alencar <rodrigo.alencar@xxxxxxxxxx>
> > Hi Rodrigo.
> >
> > This looks fine to me, but given earlier discussions I'd ideally like
> > to wait for a final review from Andy.
>
> It all depends on the series from Dmitry Antipov.
> Can somebody help reviewing the patch 1 there?
> https://lore.kernel.org/linux-hardening/20260212125628.739276-1-dmantipov@xxxxxxxxx/
can we push for the exposure of that function to kernel modules?
We have discussed that in v6, and I understand that:
EXPORT_SYMBOL_FOR_MODULES(_parse_integer_limit, "industrialio");
in lib/kstrtox.c;
#include "../../lib/kstrtox.h"
in drivers/iio/industrialio-core.c
is not a good call...
> When it's in, we can continue on this one. TL;DR: for me this is on hold.
> But if you see the need to have the driver being in IIO, please add a big
> fat FIXME to make sure we will get this all being sorted out in the
> (nearest?) future.
I could add the FIXME into iio_safe_strntou64() doc header. It explains
the context:
> + * The implementation of this function is similar to _parse_integer_limit()
> + * available in lib/kstrtox.h, but that header/function is not available to be
> + * used in kernel modules. Hence, this implementation may need to change or
> + * removed to reuse a new suitable helper that is properly exposed.
--
Kind regards,
Rodrigo Alencar