Re: [PATCH] iio: imu: adis16550: rework clock range test
From: Andy Shevchenko
Date: Wed Jul 02 2025 - 11:00:32 EST
On Wed, Jul 02, 2025 at 05:53:57PM +0300, Andy Shevchenko wrote:
> On Wed, Jul 02, 2025 at 09:27:45AM -0500, David Lechner wrote:
> > Rework the clock rate range test to test if sync_mode_data != NULL
> > instead of testing if the for loop index variable. This makes it easier
> > for static analyzers to see that we aren't using an uninitialized
> > sync_mode_data [1].
>
> But at the same time it makes it not to be the usual pattern.,,
Reading the static analyser output I think the first hunk is only what we need,
but this is still false positive and it's problem of that static
analyser. Have you filed a bug there? (My point is that modifying the code for
the advantage of false positives of some static analyser is wrong road to go
in my opinion.)
--
With Best Regards,
Andy Shevchenko