Re: [PATCH v1 1/1] iio: common: scmi_sensors: Replace const_ilog2() with ilog2()

Andy Shevchenko
2025-11-03T08:30:32Z

On Fri, Oct 31, 2025 at 04:13:31PM +0000, David Laight wrote:
> On Fri, 31 Oct 2025 14:51:57 +0200
> Andy Shevchenko <andriy.shevchenko@linux.intel.com> wrote:
> > On Fri, Oct 31, 2025 at 12:45:30PM +0000, David Laight wrote:

...

> > Do you have an idea how to improve that?
>
> Not sure I'd want to get cpp to generate a high-precision log.
> It if definitely doable, but will be a mind-blowing mess.
> (and I'm not sure how many MB the expanded line would be).
> An ilog10() would be easier (probably looking like const_ilog2()).
>
> But for this code just use '+ 9' and add a suitable comment :-)

v2 is sent: 20251103082937.4081863-1-andriy.shevchenko@linux.intel.com

--
With Best Regards,
Andy Shevchenko