Re: [PATCH v2] iio: core: switch info_mask fields to unsigned long to match find_bit helpers

From: Andy Shevchenko
Date: Wed Aug 20 2025 - 05:58:28 EST


On Wed, Aug 20, 2025 at 3:48 AM Junjie Cao <junjie.cao@xxxxxxxxx> wrote:
>
> for_each_set_bit()/find_*_bit() expect arrays of unsigned long (see
> include/linux/find.h), but industrialio-core passed const long * into
> iio_device_add_info_mask_type{,_avail}().
>
> These masks are used purely as bit arrays and are populated via BIT()
> (1UL << n). Switch the info_mask_* fields and the corresponding function
> parameters to unsigned long so the types match the helpers. This removes
> sparse warnings about signedness mismatches (seen with 'make C=1'
> CF='-Wsparse-all') without changing behavior or struct layout.
>
> No functional change intended.

Thanks, this is better than v1.
Reviewed-by: Andy Shevchenko <andy@xxxxxxxxxx>

--
With Best Regards,
Andy Shevchenko