]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
iio: core: switch info_mask fields to unsigned long to match find_bit helpers
authorJunjie Cao <junjie.cao@intel.com>
Wed, 20 Aug 2025 00:47:55 +0000 (08:47 +0800)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Mon, 25 Aug 2025 10:07:17 +0000 (11:07 +0100)
commit60ad9a07319283e6e1094cef3e972e754315c024
tree4d9e2bbc41a58ee64539aac7fac5e0cf86f42089
parent21feb435be9b19a0be8b2c44a9efb7a5296c9a66
iio: core: switch info_mask fields to unsigned long to match find_bit helpers

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.

Suggested-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Junjie Cao <junjie.cao@intel.com>
Reviewed-by: Andy Shevchenko <andy@kernel.org>
Link: https://patch.msgid.link/20250820004755.69627-1-junjie.cao@intel.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/industrialio-core.c
include/linux/iio/iio.h