CC: [email protected] CC: [email protected] CC: [email protected] TO: Miquel Raynal <[email protected]> CC: 0day robot <[email protected]>
tree: https://github.com/0day-ci/linux/commits/Miquel-Raynal/Bring-external-triggers-support-to-MAX1027-like-ADCs/20210922-131741 head: 82403933ab13283e98041a4c285420988531362c commit: 1e80dcadd79f6dec7346dc596fbafd508ea2844e iio: adc: max1027: Minimize the number of converted channels date: 8 days ago :::::: branch date: 8 days ago :::::: commit date: 8 days ago config: riscv-randconfig-c006-20210927 (attached as .config) compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project dc6e8dfdfe7efecfda318d43a06fae18b40eb498) reproduce (this is a W=1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # install riscv cross compiling tool for clang build # apt-get install binutils-riscv64-linux-gnu # https://github.com/0day-ci/linux/commit/1e80dcadd79f6dec7346dc596fbafd508ea2844e git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Miquel-Raynal/Bring-external-triggers-support-to-MAX1027-like-ADCs/20210922-131741 git checkout 1e80dcadd79f6dec7346dc596fbafd508ea2844e # save the attached .config to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=riscv clang-analyzer If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot <[email protected]> clang-analyzer warnings: (new ones prefixed by >>) struct adis16130_state { ~~~~~~~^~~~~~~~~~~~~~~~~ Suppressed 8 warnings (8 in non-user code). Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. 9 warnings generated. Suppressed 9 warnings (9 in non-user code). Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. 9 warnings generated. Suppressed 9 warnings (9 in non-user code). Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. 6 warnings generated. Suppressed 6 warnings (6 in non-user code). Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. 11 warnings generated. Suppressed 11 warnings (11 in non-user code). Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. 11 warnings generated. drivers/iio/dac/ad5770r.c:133:8: warning: Excessive padding in 'struct ad5770r_state' (86 padding bytes, where 22 is optimal). Optimal fields order: transf_buf, internal_ref, external_res, spi, regmap, vref_reg, gpio_reset, vref, ch_pwr_down, output_mode, consider reordering the fields or adding explicit padding members [clang-analyzer-optin.performance.Padding] struct ad5770r_state { ~~~~~~~^~~~~~~~~~~~~~~ drivers/iio/dac/ad5770r.c:133:8: note: Excessive padding in 'struct ad5770r_state' (86 padding bytes, where 22 is optimal). Optimal fields order: transf_buf, internal_ref, external_res, spi, regmap, vref_reg, gpio_reset, vref, ch_pwr_down, output_mode, consider reordering the fields or adding explicit padding members struct ad5770r_state { ~~~~~~~^~~~~~~~~~~~~~~ Suppressed 10 warnings (10 in non-user code). Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. 10 warnings generated. Suppressed 10 warnings (10 in non-user code). Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. 9 warnings generated. Suppressed 9 warnings (9 in non-user code). Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. 10 warnings generated. Suppressed 10 warnings (10 in non-user code). Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. 11 warnings generated. drivers/iio/dac/ad7303.c:37:8: warning: Excessive padding in 'struct ad7303_state' (98 padding bytes, where 34 is optimal). Optimal fields order: data, config, spi, vdd_reg, vref_reg, lock, dac_cache, consider reordering the fields or adding explicit padding members [clang-analyzer-optin.performance.Padding] struct ad7303_state { ~~~~~~~^~~~~~~~~~~~~~ drivers/iio/dac/ad7303.c:37:8: note: Excessive padding in 'struct ad7303_state' (98 padding bytes, where 34 is optimal). Optimal fields order: data, config, spi, vdd_reg, vref_reg, lock, dac_cache, consider reordering the fields or adding explicit padding members struct ad7303_state { ~~~~~~~^~~~~~~~~~~~~~ Suppressed 10 warnings (10 in non-user code). Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. 11 warnings generated. drivers/iio/dac/ad8801.c:21:8: warning: Excessive padding in 'struct ad8801_state' (98 padding bytes, where 34 is optimal). Optimal fields order: data, dac_cache, spi, vrefh_mv, vrefl_mv, vrefh_reg, vrefl_reg, consider reordering the fields or adding explicit padding members [clang-analyzer-optin.performance.Padding] struct ad8801_state { ~~~~~~~^~~~~~~~~~~~~~ drivers/iio/dac/ad8801.c:21:8: note: Excessive padding in 'struct ad8801_state' (98 padding bytes, where 34 is optimal). Optimal fields order: data, dac_cache, spi, vrefh_mv, vrefl_mv, vrefh_reg, vrefl_reg, consider reordering the fields or adding explicit padding members struct ad8801_state { ~~~~~~~^~~~~~~~~~~~~~ Suppressed 10 warnings (10 in non-user code). Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. 9 warnings generated. Suppressed 9 warnings (9 in non-user code). Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. 10 warnings generated. drivers/iio/adc/max1027.c:265:8: warning: Excessive padding in 'struct max1027_state' (99 padding bytes, where 35 is optimal). Optimal fields order: reg, info, spi, trig, buffer, lock, consider reordering the fields or adding explicit padding members [clang-analyzer-optin.performance.Padding] struct max1027_state { ~~~~~~~^~~~~~~~~~~~~~~ drivers/iio/adc/max1027.c:265:8: note: Excessive padding in 'struct max1027_state' (99 padding bytes, where 35 is optimal). Optimal fields order: reg, info, spi, trig, buffer, lock, consider reordering the fields or adding explicit padding members struct max1027_state { ~~~~~~~^~~~~~~~~~~~~~~ >> drivers/iio/adc/max1027.c:412:14: warning: The result of the left shift is >> undefined because the left operand is negative >> [clang-analyzer-core.UndefinedBinaryOperatorResult] st->reg |= MAX1027_CHAN(fls(*indio_dev->active_scan_mask) - 2); ^ drivers/iio/adc/max1027.c:38:32: note: expanded from macro 'MAX1027_CHAN' #define MAX1027_CHAN(n) ((n) << 3) ~~~ ^ drivers/iio/adc/max1027.c:399:6: note: Assuming 'state' is true if (state) { ^~~~~ drivers/iio/adc/max1027.c:399:2: note: Taking true branch if (state) { ^ drivers/iio/adc/max1027.c:404:7: note: Assuming 'ret' is >= 0 if (ret < 0) ^~~~~~~ drivers/iio/adc/max1027.c:404:3: note: Taking false branch if (ret < 0) ^ drivers/iio/adc/max1027.c:412:14: note: The result of the left shift is undefined because the left operand is negative st->reg |= MAX1027_CHAN(fls(*indio_dev->active_scan_mask) - 2); ^ drivers/iio/adc/max1027.c:38:32: note: expanded from macro 'MAX1027_CHAN' #define MAX1027_CHAN(n) ((n) << 3) ~~~ ^ Suppressed 8 warnings (8 in non-user code). Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. 11 warnings generated. drivers/iio/adc/max11100.c:31:8: warning: Excessive padding in 'struct max11100_state' (117 padding bytes, where 53 is optimal). Optimal fields order: buffer, vref_reg, spi, consider reordering the fields or adding explicit padding members [clang-analyzer-optin.performance.Padding] struct max11100_state { ~~~~~~~^~~~~~~~~~~~~~~~ drivers/iio/adc/max11100.c:31:8: note: Excessive padding in 'struct max11100_state' (117 padding bytes, where 53 is optimal). Optimal fields order: buffer, vref_reg, spi, consider reordering the fields or adding explicit padding members struct max11100_state { ~~~~~~~^~~~~~~~~~~~~~~~ Suppressed 10 warnings (10 in non-user code). Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. 11 warnings generated. drivers/iio/adc/max1241.c:22:8: warning: Excessive padding in 'struct max1241' (98 padding bytes, where 34 is optimal). Optimal fields order: data, spi, vdd, vref, shutdown, lock, consider reordering the fields or adding explicit padding members [clang-analyzer-optin.performance.Padding] struct max1241 { ~~~~~~~^~~~~~~~~ drivers/iio/adc/max1241.c:22:8: note: Excessive padding in 'struct max1241' (98 padding bytes, where 34 is optimal). Optimal fields order: data, spi, vdd, vref, shutdown, lock, consider reordering the fields or adding explicit padding members struct max1241 { ~~~~~~~^~~~~~~~~ Suppressed 10 warnings (10 in non-user code). Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. 9 warnings generated. Suppressed 9 warnings (9 in non-user code). Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. 16 warnings generated. drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/polaris10_smumgr.c:589:11: warning: Value stored to 'hi_sidd' during its initialization is never read [clang-analyzer-deadcode.DeadStores] uint16_t hi_sidd = smu_data->power_tune_table.BapmVddCBaseLeakageHiSidd; ^~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/polaris10_smumgr.c:589:11: note: Value stored to 'hi_sidd' during its initialization is never read uint16_t hi_sidd = smu_data->power_tune_table.BapmVddCBaseLeakageHiSidd; ^~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/polaris10_smumgr.c:590:11: warning: Value stored to 'lo_sidd' during its initialization is never read [clang-analyzer-deadcode.DeadStores] uint16_t lo_sidd = smu_data->power_tune_table.BapmVddCBaseLeakageLoSidd; ^~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/polaris10_smumgr.c:590:11: note: Value stored to 'lo_sidd' during its initialization is never read uint16_t lo_sidd = smu_data->power_tune_table.BapmVddCBaseLeakageLoSidd; ^~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/polaris10_smumgr.c:967:2: warning: Value stored to 'result' is never read [clang-analyzer-deadcode.DeadStores] result = polaris10_calculate_sclk_params(hwmgr, clock, &curr_sclk_setting); ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/polaris10_smumgr.c:967:2: note: Value stored to 'result' is never read result = polaris10_calculate_sclk_params(hwmgr, clock, &curr_sclk_setting); ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/polaris10_smumgr.c:1592:3: warning: Value stored to 'result' is never read [clang-analyzer-deadcode.DeadStores] result = 0; ^ ~ drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/polaris10_smumgr.c:1592:3: note: Value stored to 'result' is never read result = 0; ^ ~ drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/polaris10_smumgr.c:1600:3: warning: Value stored to 'result' is never read [clang-analyzer-deadcode.DeadStores] result = 0; ^ ~ drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/polaris10_smumgr.c:1600:3: note: Value stored to 'result' is never read result = 0; ^ ~ drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/polaris10_smumgr.c:1868:3: warning: Value stored to 'result' is never read [clang-analyzer-deadcode.DeadStores] result = smu7_read_smc_sram_dword(hwmgr, ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/polaris10_smumgr.c:1868:3: note: Value stored to 'result' is never read result = smu7_read_smc_sram_dword(hwmgr, ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Suppressed 10 warnings (10 in non-user code). Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. 6 warnings generated. Suppressed 6 warnings (6 in non-user code). vim +412 drivers/iio/adc/max1027.c fc167f62483325 Philippe Reynes 2014-06-14 392 fc167f62483325 Philippe Reynes 2014-06-14 393 static int max1027_set_trigger_state(struct iio_trigger *trig, bool state) fc167f62483325 Philippe Reynes 2014-06-14 394 { fc167f62483325 Philippe Reynes 2014-06-14 395 struct iio_dev *indio_dev = iio_trigger_get_drvdata(trig); fc167f62483325 Philippe Reynes 2014-06-14 396 struct max1027_state *st = iio_priv(indio_dev); fc167f62483325 Philippe Reynes 2014-06-14 397 int ret; fc167f62483325 Philippe Reynes 2014-06-14 398 fc167f62483325 Philippe Reynes 2014-06-14 399 if (state) { fc167f62483325 Philippe Reynes 2014-06-14 400 /* Start acquisition on cnvst */ fc167f62483325 Philippe Reynes 2014-06-14 401 st->reg = MAX1027_SETUP_REG | MAX1027_CKS_MODE0 | fc167f62483325 Philippe Reynes 2014-06-14 402 MAX1027_REF_MODE2; fc167f62483325 Philippe Reynes 2014-06-14 403 ret = spi_write(st->spi, &st->reg, 1); fc167f62483325 Philippe Reynes 2014-06-14 404 if (ret < 0) fc167f62483325 Philippe Reynes 2014-06-14 405 return ret; fc167f62483325 Philippe Reynes 2014-06-14 406 1e80dcadd79f6d Miquel Raynal 2021-09-21 407 /* 1e80dcadd79f6d Miquel Raynal 2021-09-21 408 * Scan from chan 0 to the highest requested channel. 1e80dcadd79f6d Miquel Raynal 2021-09-21 409 * Include temperature on demand. 1e80dcadd79f6d Miquel Raynal 2021-09-21 410 */ 1e80dcadd79f6d Miquel Raynal 2021-09-21 411 st->reg = MAX1027_CONV_REG | MAX1027_SCAN_0_N; 1e80dcadd79f6d Miquel Raynal 2021-09-21 @412 st->reg |= MAX1027_CHAN(fls(*indio_dev->active_scan_mask) - 2); 1e80dcadd79f6d Miquel Raynal 2021-09-21 413 if (*indio_dev->active_scan_mask & MAX1X27_SCAN_MASK_TEMP) 1e80dcadd79f6d Miquel Raynal 2021-09-21 414 st->reg |= MAX1027_TEMP; 1e80dcadd79f6d Miquel Raynal 2021-09-21 415 fc167f62483325 Philippe Reynes 2014-06-14 416 ret = spi_write(st->spi, &st->reg, 1); fc167f62483325 Philippe Reynes 2014-06-14 417 if (ret < 0) fc167f62483325 Philippe Reynes 2014-06-14 418 return ret; fc167f62483325 Philippe Reynes 2014-06-14 419 } else { fc167f62483325 Philippe Reynes 2014-06-14 420 /* Start acquisition on conversion register write */ fc167f62483325 Philippe Reynes 2014-06-14 421 st->reg = MAX1027_SETUP_REG | MAX1027_CKS_MODE2 | fc167f62483325 Philippe Reynes 2014-06-14 422 MAX1027_REF_MODE2; fc167f62483325 Philippe Reynes 2014-06-14 423 ret = spi_write(st->spi, &st->reg, 1); fc167f62483325 Philippe Reynes 2014-06-14 424 if (ret < 0) fc167f62483325 Philippe Reynes 2014-06-14 425 return ret; fc167f62483325 Philippe Reynes 2014-06-14 426 } fc167f62483325 Philippe Reynes 2014-06-14 427 fc167f62483325 Philippe Reynes 2014-06-14 428 return 0; fc167f62483325 Philippe Reynes 2014-06-14 429 } fc167f62483325 Philippe Reynes 2014-06-14 430 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/[email protected]
.config.gz
Description: application/gzip
_______________________________________________ kbuild mailing list -- [email protected] To unsubscribe send an email to [email protected]
