Re: [PATCH 4/4] iio: adc: add support for ad4052

kernel test robot
2025-03-07T12:40:10Z

Hi Jorge,

kernel test robot noticed the following build warnings:

[auto build test WARNING on aac287ec80d71a7ab7e44c936a434625417c3e30]

url: https://github.com/intel-lab-lkp/linux/commits/Jorge-Marques/iio-code-mark-iio_dev-as-const-in-iio_buffer_enabled/20250306-220719
base: aac287ec80d71a7ab7e44c936a434625417c3e30
patch link: https://lore.kernel.org/r/20250306-iio-driver-ad4052-v1-4-2badad30116c%40analog.com
patch subject: [PATCH 4/4] iio: adc: add support for ad4052
config: powerpc-randconfig-r132-20250307 (https://download.01.org/0day-ci/archive/20250307/202503072008.ysqhEBaX-lkp@intel.com/config)
compiler: powerpc-linux-gcc (GCC) 14.2.0
reproduce: (https://download.01.org/0day-ci/archive/20250307/202503072008.ysqhEBaX-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202503072008.ysqhEBaX-lkp@intel.com/

sparse warnings: (new ones prefixed by >>)
>> drivers/iio/adc/ad4052.c:357:31: sparse: sparse: symbol 'ad4050_chip_info' was not declared. Should it be static?
>> drivers/iio/adc/ad4052.c:366:31: sparse: sparse: symbol 'ad4052_chip_info' was not declared. Should it be static?
>> drivers/iio/adc/ad4052.c:375:31: sparse: sparse: symbol 'ad4056_chip_info' was not declared. Should it be static?
>> drivers/iio/adc/ad4052.c:384:31: sparse: sparse: symbol 'ad4058_chip_info' was not declared. Should it be static?
>> drivers/iio/adc/ad4052.c:711:22: sparse: sparse: incorrect type in assignment (different base types) @@ expected int @@ got restricted __be16 [usertype] d16 @@
drivers/iio/adc/ad4052.c:711:22: sparse: expected int
drivers/iio/adc/ad4052.c:711:22: sparse: got restricted __be16 [usertype] d16
>> drivers/iio/adc/ad4052.c:715:22: sparse: sparse: incorrect type in assignment (different base types) @@ expected int @@ got restricted __be32 [usertype] d32 @@
drivers/iio/adc/ad4052.c:715:22: sparse: expected int
drivers/iio/adc/ad4052.c:715:22: sparse: got restricted __be32 [usertype] d32
drivers/iio/adc/ad4052.c:912:22: sparse: sparse: incorrect type in assignment (different base types) @@ expected int @@ got restricted __be32 [usertype] d32 @@
drivers/iio/adc/ad4052.c:912:22: sparse: expected int
drivers/iio/adc/ad4052.c:912:22: sparse: got restricted __be32 [usertype] d32
>> drivers/iio/adc/ad4052.c:958:33: sparse: sparse: bad assignment (>>=) to restricted __be16
drivers/iio/adc/ad4052.c:251:12: sparse: sparse: context imbalance in 'ad4052_iio_device_claim_direct' - different lock contexts for basic block
drivers/iio/adc/ad4052.c:277:9: sparse: sparse: context imbalance in 'ad4052_sample_rate_get' - unexpected unlock
drivers/iio/adc/ad4052.c:294:9: sparse: sparse: context imbalance in 'ad4052_sample_rate_set' - unexpected unlock
drivers/iio/adc/ad4052.c:780:34: sparse: sparse: context imbalance in 'ad4052_read_raw' - unexpected unlock
drivers/iio/adc/ad4052.c:805:34: sparse: sparse: context imbalance in 'ad4052_write_raw' - unexpected unlock
drivers/iio/adc/ad4052.c:820:9: sparse: sparse: context imbalance in 'ad4052_read_event_config' - unexpected unlock
drivers/iio/adc/ad4052.c:903:42: sparse: sparse: context imbalance in 'ad4052_read_event_value' - unexpected unlock
drivers/iio/adc/ad4052.c:971:34: sparse: sparse: context imbalance in 'ad4052_write_event_value' - unexpected unlock
drivers/iio/adc/ad4052.c:1055:34: sparse: sparse: context imbalance in 'ad4052_debugfs_reg_access' - unexpected unlock

vim +/ad4050_chip_info +357 drivers/iio/adc/ad4052.c

356
> 357 const struct ad4052_chip_info ad4050_chip_info = {
358 .name = "ad4050",
359 .channels = { AD4052_CHAN(12, AD4052_2MSPS) },
360 .offload_channels = { AD4052_OFFLOAD_CHAN(12, AD4052_2MSPS) },
361 .prod_id = 0x70,
362 .max_avg = AD4050_MAX_AVG,
363 .grade = AD4052_2MSPS,
364 };
365
> 366 const struct ad4052_chip_info ad4052_chip_info = {
367 .name = "ad4052",
368 .channels = { AD4052_CHAN(16, AD4052_2MSPS) },
369 .offload_channels = { AD4052_OFFLOAD_CHAN(16, AD4052_2MSPS) },
370 .prod_id = 0x72,
371 .max_avg = AD4052_MAX_AVG,
372 .grade = AD4052_2MSPS,
373 };
374
> 375 const struct ad4052_chip_info ad4056_chip_info = {
376 .name = "ad4056",
377 .channels = { AD4052_CHAN(12, AD4052_500KSPS) },
378 .offload_channels = { AD4052_OFFLOAD_CHAN(12, AD4052_500KSPS) },
379 .prod_id = 0x70,
380 .max_avg = AD4050_MAX_AVG,
381 .grade = AD4052_500KSPS,
382 };
383
> 384 const struct ad4052_chip_info ad4058_chip_info = {
385 .name = "ad4058",
386 .channels = { AD4052_CHAN(16, AD4052_500KSPS) },
387 .offload_channels = { AD4052_OFFLOAD_CHAN(16, AD4052_500KSPS) },
388 .prod_id = 0x72,
389 .max_avg = AD4052_MAX_AVG,
390 .grade = AD4052_500KSPS,
391 };
392

--
0-DAY CI Kernel Test Service