* drivers/iio/dac/ad7293.c:524 ad7293_read_raw() error: uninitialized symbol 'data'.
@ 2022-01-24 12:05 ` Dan Carpenter
0 siblings, 0 replies; 5+ messages in thread
From: kernel test robot @ 2022-01-24 11:10 UTC (permalink / raw)
To: kbuild
[-- Attachment #1: Type: text/plain, Size: 8365 bytes --]
CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: Antoniu Miclaus <antoniu.miclaus@analog.com>
CC: Jonathan Cameron <Jonathan.Cameron@huawei.com>
CC: Cai Huoqing <cai.huoqing@linux.dev>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: dd81e1c7d5fb126e5fbc5c9e334d7b3ec29a16a0
commit: 0bb12606c05fe9737e3056fe76d6e4b9c2a87b57 iio:dac:ad7293: add support for AD7293
date: 7 weeks ago
:::::: branch date: 19 hours ago
:::::: commit date: 7 weeks ago
config: nios2-randconfig-m031-20220124 (https://download.01.org/0day-ci/archive/20220124/202201241944.dodYYcTk-lkp(a)intel.com/config)
compiler: nios2-linux-gcc (GCC) 11.2.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
smatch warnings:
drivers/iio/dac/ad7293.c:524 ad7293_read_raw() error: uninitialized symbol 'data'.
vim +/data +524 drivers/iio/dac/ad7293.c
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 475
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 476 static int ad7293_read_raw(struct iio_dev *indio_dev,
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 477 struct iio_chan_spec const *chan,
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 478 int *val, int *val2, long info)
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 479 {
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 480 struct ad7293_state *st = iio_priv(indio_dev);
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 481 int ret;
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 482 u16 data;
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 483
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 484 switch (info) {
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 485 case IIO_CHAN_INFO_RAW:
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 486 switch (chan->type) {
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 487 case IIO_VOLTAGE:
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 488 if (chan->output)
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 489 ret = ad7293_ch_read_raw(st, AD7293_DAC,
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 490 chan->channel, &data);
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 491 else
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 492 ret = ad7293_ch_read_raw(st, AD7293_ADC_VINX,
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 493 chan->channel, &data);
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 494
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 495 break;
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 496 case IIO_CURRENT:
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 497 ret = ad7293_ch_read_raw(st, AD7293_ADC_ISENSE,
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 498 chan->channel, &data);
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 499
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 500 break;
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 501 case IIO_TEMP:
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 502 ret = ad7293_ch_read_raw(st, AD7293_ADC_TSENSE,
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 503 chan->channel, &data);
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 504
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 505 break;
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 506 default:
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 507 return -EINVAL;
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 508 }
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 509
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 510 if (ret)
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 511 return ret;
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 512
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 513 *val = data;
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 514
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 515 return IIO_VAL_INT;
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 516 case IIO_CHAN_INFO_OFFSET:
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 517 switch (chan->type) {
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 518 case IIO_VOLTAGE:
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 519 if (chan->output) {
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 520 ret = ad7293_get_offset(st,
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 521 chan->channel + AD7293_VOUT_MIN_OFFSET_CH,
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 522 &data);
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 523
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 @524 data = FIELD_GET(AD7293_REG_VOUT_OFFSET_MSK, data);
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 525 } else {
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 526 ret = ad7293_get_offset(st, chan->channel, &data);
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 527 }
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 528
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 529 break;
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 530 case IIO_CURRENT:
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 531 ret = ad7293_get_offset(st,
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 532 chan->channel + AD7293_ISENSE_MIN_OFFSET_CH,
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 533 &data);
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 534
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 535 break;
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 536 case IIO_TEMP:
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 537 ret = ad7293_get_offset(st,
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 538 chan->channel + AD7293_TSENSE_MIN_OFFSET_CH,
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 539 &data);
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 540
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 541 break;
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 542 default:
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 543 return -EINVAL;
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 544 }
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 545 if (ret)
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 546 return ret;
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 547
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 548 *val = data;
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 549
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 550 return IIO_VAL_INT;
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 551 case IIO_CHAN_INFO_SCALE:
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 552 switch (chan->type) {
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 553 case IIO_VOLTAGE:
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 554 ret = ad7293_adc_get_scale(st, chan->channel, &data);
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 555 if (ret)
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 556 return ret;
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 557
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 558 *val = data;
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 559
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 560 return IIO_VAL_INT;
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 561 case IIO_CURRENT:
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 562 ret = ad7293_isense_get_scale(st, chan->channel, &data);
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 563 if (ret)
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 564 return ret;
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 565
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 566 *val = data;
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 567
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 568 return IIO_VAL_INT;
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 569 case IIO_TEMP:
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 570 *val = 1;
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 571 *val2 = 8;
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 572
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 573 return IIO_VAL_FRACTIONAL;
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 574 default:
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 575 return -EINVAL;
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 576 }
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 577 default:
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 578 return -EINVAL;
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 579 }
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 580 }
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 581
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
^ permalink raw reply [flat|nested] 5+ messages in thread
* drivers/iio/dac/ad7293.c:524 ad7293_read_raw() error: uninitialized symbol 'data'.
@ 2022-01-24 12:05 ` Dan Carpenter
0 siblings, 0 replies; 5+ messages in thread
From: Dan Carpenter @ 2022-01-24 12:05 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 2668 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: dd81e1c7d5fb126e5fbc5c9e334d7b3ec29a16a0
commit: 0bb12606c05fe9737e3056fe76d6e4b9c2a87b57 iio:dac:ad7293: add support for AD7293
config: nios2-randconfig-m031-20220124 (https://download.01.org/0day-ci/archive/20220124/202201241944.dodYYcTk-lkp(a)intel.com/config)
compiler: nios2-linux-gcc (GCC) 11.2.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
smatch warnings:
drivers/iio/dac/ad7293.c:524 ad7293_read_raw() error: uninitialized symbol 'data'.
vim +/data +524 drivers/iio/dac/ad7293.c
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 510 if (ret)
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 511 return ret;
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 512
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 513 *val = data;
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 514
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 515 return IIO_VAL_INT;
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 516 case IIO_CHAN_INFO_OFFSET:
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 517 switch (chan->type) {
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 518 case IIO_VOLTAGE:
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 519 if (chan->output) {
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 520 ret = ad7293_get_offset(st,
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 521 chan->channel + AD7293_VOUT_MIN_OFFSET_CH,
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 522 &data);
ad7293_get_offset() can fail
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 523
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 @524 data = FIELD_GET(AD7293_REG_VOUT_OFFSET_MSK, data);
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 525 } else {
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 526 ret = ad7293_get_offset(st, chan->channel, &data);
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 527 }
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 528
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 529 break;
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 530 case IIO_CURRENT:
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 531 ret = ad7293_get_offset(st,
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 532 chan->channel + AD7293_ISENSE_MIN_OFFSET_CH,
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 533 &data);
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 534
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 535 break;
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
^ permalink raw reply [flat|nested] 5+ messages in thread
* drivers/iio/dac/ad7293.c:524 ad7293_read_raw() error: uninitialized symbol 'data'.
@ 2022-01-24 12:05 ` Dan Carpenter
0 siblings, 0 replies; 5+ messages in thread
From: Dan Carpenter @ 2022-01-24 12:05 UTC (permalink / raw)
To: kbuild, Antoniu Miclaus
Cc: lkp, kbuild-all, linux-kernel, Jonathan Cameron, Cai Huoqing
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: dd81e1c7d5fb126e5fbc5c9e334d7b3ec29a16a0
commit: 0bb12606c05fe9737e3056fe76d6e4b9c2a87b57 iio:dac:ad7293: add support for AD7293
config: nios2-randconfig-m031-20220124 (https://download.01.org/0day-ci/archive/20220124/202201241944.dodYYcTk-lkp@intel.com/config)
compiler: nios2-linux-gcc (GCC) 11.2.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
smatch warnings:
drivers/iio/dac/ad7293.c:524 ad7293_read_raw() error: uninitialized symbol 'data'.
vim +/data +524 drivers/iio/dac/ad7293.c
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 510 if (ret)
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 511 return ret;
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 512
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 513 *val = data;
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 514
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 515 return IIO_VAL_INT;
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 516 case IIO_CHAN_INFO_OFFSET:
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 517 switch (chan->type) {
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 518 case IIO_VOLTAGE:
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 519 if (chan->output) {
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 520 ret = ad7293_get_offset(st,
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 521 chan->channel + AD7293_VOUT_MIN_OFFSET_CH,
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 522 &data);
ad7293_get_offset() can fail
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 523
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 @524 data = FIELD_GET(AD7293_REG_VOUT_OFFSET_MSK, data);
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 525 } else {
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 526 ret = ad7293_get_offset(st, chan->channel, &data);
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 527 }
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 528
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 529 break;
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 530 case IIO_CURRENT:
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 531 ret = ad7293_get_offset(st,
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 532 chan->channel + AD7293_ISENSE_MIN_OFFSET_CH,
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 533 &data);
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 534
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 535 break;
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
^ permalink raw reply [flat|nested] 5+ messages in thread
* drivers/iio/dac/ad7293.c:524 ad7293_read_raw() error: uninitialized symbol 'data'.
@ 2022-02-08 7:06 kernel test robot
0 siblings, 0 replies; 5+ messages in thread
From: kernel test robot @ 2022-02-08 7:06 UTC (permalink / raw)
To: kbuild
[-- Attachment #1: Type: text/plain, Size: 8366 bytes --]
CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: Antoniu Miclaus <antoniu.miclaus@analog.com>
CC: Jonathan Cameron <Jonathan.Cameron@huawei.com>
CC: Cai Huoqing <cai.huoqing@linux.dev>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 555f3d7be91a873114c9656069f1a9fa476ec41a
commit: 0bb12606c05fe9737e3056fe76d6e4b9c2a87b57 iio:dac:ad7293: add support for AD7293
date: 9 weeks ago
:::::: branch date: 8 hours ago
:::::: commit date: 9 weeks ago
config: x86_64-randconfig-m001-20220207 (https://download.01.org/0day-ci/archive/20220208/202202081433.mPxuLUuj-lkp(a)intel.com/config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
smatch warnings:
drivers/iio/dac/ad7293.c:524 ad7293_read_raw() error: uninitialized symbol 'data'.
vim +/data +524 drivers/iio/dac/ad7293.c
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 475
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 476 static int ad7293_read_raw(struct iio_dev *indio_dev,
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 477 struct iio_chan_spec const *chan,
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 478 int *val, int *val2, long info)
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 479 {
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 480 struct ad7293_state *st = iio_priv(indio_dev);
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 481 int ret;
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 482 u16 data;
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 483
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 484 switch (info) {
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 485 case IIO_CHAN_INFO_RAW:
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 486 switch (chan->type) {
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 487 case IIO_VOLTAGE:
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 488 if (chan->output)
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 489 ret = ad7293_ch_read_raw(st, AD7293_DAC,
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 490 chan->channel, &data);
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 491 else
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 492 ret = ad7293_ch_read_raw(st, AD7293_ADC_VINX,
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 493 chan->channel, &data);
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 494
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 495 break;
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 496 case IIO_CURRENT:
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 497 ret = ad7293_ch_read_raw(st, AD7293_ADC_ISENSE,
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 498 chan->channel, &data);
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 499
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 500 break;
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 501 case IIO_TEMP:
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 502 ret = ad7293_ch_read_raw(st, AD7293_ADC_TSENSE,
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 503 chan->channel, &data);
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 504
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 505 break;
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 506 default:
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 507 return -EINVAL;
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 508 }
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 509
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 510 if (ret)
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 511 return ret;
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 512
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 513 *val = data;
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 514
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 515 return IIO_VAL_INT;
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 516 case IIO_CHAN_INFO_OFFSET:
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 517 switch (chan->type) {
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 518 case IIO_VOLTAGE:
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 519 if (chan->output) {
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 520 ret = ad7293_get_offset(st,
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 521 chan->channel + AD7293_VOUT_MIN_OFFSET_CH,
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 522 &data);
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 523
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 @524 data = FIELD_GET(AD7293_REG_VOUT_OFFSET_MSK, data);
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 525 } else {
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 526 ret = ad7293_get_offset(st, chan->channel, &data);
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 527 }
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 528
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 529 break;
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 530 case IIO_CURRENT:
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 531 ret = ad7293_get_offset(st,
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 532 chan->channel + AD7293_ISENSE_MIN_OFFSET_CH,
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 533 &data);
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 534
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 535 break;
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 536 case IIO_TEMP:
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 537 ret = ad7293_get_offset(st,
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 538 chan->channel + AD7293_TSENSE_MIN_OFFSET_CH,
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 539 &data);
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 540
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 541 break;
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 542 default:
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 543 return -EINVAL;
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 544 }
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 545 if (ret)
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 546 return ret;
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 547
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 548 *val = data;
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 549
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 550 return IIO_VAL_INT;
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 551 case IIO_CHAN_INFO_SCALE:
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 552 switch (chan->type) {
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 553 case IIO_VOLTAGE:
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 554 ret = ad7293_adc_get_scale(st, chan->channel, &data);
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 555 if (ret)
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 556 return ret;
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 557
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 558 *val = data;
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 559
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 560 return IIO_VAL_INT;
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 561 case IIO_CURRENT:
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 562 ret = ad7293_isense_get_scale(st, chan->channel, &data);
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 563 if (ret)
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 564 return ret;
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 565
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 566 *val = data;
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 567
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 568 return IIO_VAL_INT;
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 569 case IIO_TEMP:
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 570 *val = 1;
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 571 *val2 = 8;
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 572
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 573 return IIO_VAL_FRACTIONAL;
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 574 default:
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 575 return -EINVAL;
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 576 }
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 577 default:
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 578 return -EINVAL;
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 579 }
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 580 }
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 581
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
^ permalink raw reply [flat|nested] 5+ messages in thread
* drivers/iio/dac/ad7293.c:524 ad7293_read_raw() error: uninitialized symbol 'data'.
@ 2022-02-08 15:09 kernel test robot
0 siblings, 0 replies; 5+ messages in thread
From: kernel test robot @ 2022-02-08 15:09 UTC (permalink / raw)
To: kbuild
[-- Attachment #1: Type: text/plain, Size: 8367 bytes --]
CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: Antoniu Miclaus <antoniu.miclaus@analog.com>
CC: Jonathan Cameron <Jonathan.Cameron@huawei.com>
CC: Cai Huoqing <cai.huoqing@linux.dev>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 555f3d7be91a873114c9656069f1a9fa476ec41a
commit: 0bb12606c05fe9737e3056fe76d6e4b9c2a87b57 iio:dac:ad7293: add support for AD7293
date: 9 weeks ago
:::::: branch date: 16 hours ago
:::::: commit date: 9 weeks ago
config: x86_64-randconfig-m001-20220207 (https://download.01.org/0day-ci/archive/20220208/202202082350.gmfeiROX-lkp(a)intel.com/config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
smatch warnings:
drivers/iio/dac/ad7293.c:524 ad7293_read_raw() error: uninitialized symbol 'data'.
vim +/data +524 drivers/iio/dac/ad7293.c
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 475
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 476 static int ad7293_read_raw(struct iio_dev *indio_dev,
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 477 struct iio_chan_spec const *chan,
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 478 int *val, int *val2, long info)
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 479 {
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 480 struct ad7293_state *st = iio_priv(indio_dev);
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 481 int ret;
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 482 u16 data;
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 483
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 484 switch (info) {
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 485 case IIO_CHAN_INFO_RAW:
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 486 switch (chan->type) {
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 487 case IIO_VOLTAGE:
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 488 if (chan->output)
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 489 ret = ad7293_ch_read_raw(st, AD7293_DAC,
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 490 chan->channel, &data);
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 491 else
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 492 ret = ad7293_ch_read_raw(st, AD7293_ADC_VINX,
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 493 chan->channel, &data);
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 494
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 495 break;
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 496 case IIO_CURRENT:
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 497 ret = ad7293_ch_read_raw(st, AD7293_ADC_ISENSE,
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 498 chan->channel, &data);
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 499
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 500 break;
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 501 case IIO_TEMP:
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 502 ret = ad7293_ch_read_raw(st, AD7293_ADC_TSENSE,
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 503 chan->channel, &data);
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 504
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 505 break;
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 506 default:
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 507 return -EINVAL;
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 508 }
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 509
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 510 if (ret)
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 511 return ret;
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 512
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 513 *val = data;
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 514
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 515 return IIO_VAL_INT;
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 516 case IIO_CHAN_INFO_OFFSET:
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 517 switch (chan->type) {
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 518 case IIO_VOLTAGE:
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 519 if (chan->output) {
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 520 ret = ad7293_get_offset(st,
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 521 chan->channel + AD7293_VOUT_MIN_OFFSET_CH,
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 522 &data);
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 523
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 @524 data = FIELD_GET(AD7293_REG_VOUT_OFFSET_MSK, data);
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 525 } else {
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 526 ret = ad7293_get_offset(st, chan->channel, &data);
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 527 }
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 528
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 529 break;
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 530 case IIO_CURRENT:
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 531 ret = ad7293_get_offset(st,
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 532 chan->channel + AD7293_ISENSE_MIN_OFFSET_CH,
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 533 &data);
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 534
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 535 break;
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 536 case IIO_TEMP:
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 537 ret = ad7293_get_offset(st,
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 538 chan->channel + AD7293_TSENSE_MIN_OFFSET_CH,
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 539 &data);
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 540
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 541 break;
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 542 default:
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 543 return -EINVAL;
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 544 }
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 545 if (ret)
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 546 return ret;
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 547
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 548 *val = data;
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 549
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 550 return IIO_VAL_INT;
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 551 case IIO_CHAN_INFO_SCALE:
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 552 switch (chan->type) {
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 553 case IIO_VOLTAGE:
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 554 ret = ad7293_adc_get_scale(st, chan->channel, &data);
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 555 if (ret)
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 556 return ret;
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 557
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 558 *val = data;
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 559
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 560 return IIO_VAL_INT;
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 561 case IIO_CURRENT:
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 562 ret = ad7293_isense_get_scale(st, chan->channel, &data);
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 563 if (ret)
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 564 return ret;
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 565
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 566 *val = data;
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 567
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 568 return IIO_VAL_INT;
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 569 case IIO_TEMP:
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 570 *val = 1;
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 571 *val2 = 8;
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 572
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 573 return IIO_VAL_FRACTIONAL;
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 574 default:
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 575 return -EINVAL;
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 576 }
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 577 default:
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 578 return -EINVAL;
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 579 }
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 580 }
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 581
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2022-02-08 15:09 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-01-24 11:10 drivers/iio/dac/ad7293.c:524 ad7293_read_raw() error: uninitialized symbol 'data' kernel test robot
2022-01-24 12:05 ` Dan Carpenter
2022-01-24 12:05 ` Dan Carpenter
-- strict thread matches above, loose matches on Subject: below --
2022-02-08 7:06 kernel test robot
2022-02-08 15:09 kernel test robot
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.