Re: [PATCH v2] iio: core: switch info_mask fields to unsigned long to match find_bit helpers
From: Jonathan Cameron
Date: Mon Aug 25 2025 - 06:08:30 EST
On Wed, 20 Aug 2025 12:52:18 +0300
Andy Shevchenko <andy.shevchenko@xxxxxxxxx> wrote:
> 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>
>
Applied.
Thanks,
Jonathan