* [jic23-iio:sparse-friendly-direct-mode 90/166] drivers/iio/adc/stm32-dfsdm-adc.c:1320 __stm32_dfsdm_read_info_raw() error: uninitialized symbol 'ret'.
@ 2025-02-04 1:32 kernel test robot
0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2025-02-04 1:32 UTC (permalink / raw)
To: oe-kbuild; +Cc: lkp, Dan Carpenter
BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
TO: Jonathan Cameron <Jonathan.Cameron@huawei.com>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git sparse-friendly-direct-mode
head: 2d042931355bda7a2fd9e7f81d0be99c3669af4f
commit: 92540659cab57f14a1fc6615b93e4adb97b51acd [90/166] iio: adc: stm32-dfsdm: Factor out core of reading INFO_RAW
:::::: branch date: 4 hours ago
:::::: commit date: 29 hours ago
config: m68k-randconfig-r071-20250204 (https://download.01.org/0day-ci/archive/20250204/202502040918.N96TGHTV-lkp@intel.com/config)
compiler: m68k-linux-gcc (GCC) 14.2.0
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>
| Reported-by: Dan Carpenter <error27@gmail.com>
| Closes: https://lore.kernel.org/r/202502040918.N96TGHTV-lkp@intel.com/
smatch warnings:
drivers/iio/adc/stm32-dfsdm-adc.c:1320 __stm32_dfsdm_read_info_raw() error: uninitialized symbol 'ret'.
vim +/ret +1320 drivers/iio/adc/stm32-dfsdm-adc.c
e2e6771c646251 Arnaud Pouliquen 2018-01-10 1308
92540659cab57f Jonathan Cameron 2025-01-19 1309 static int __stm32_dfsdm_read_info_raw(struct iio_dev *indio_dev,
92540659cab57f Jonathan Cameron 2025-01-19 1310 struct iio_chan_spec const *chan,
92540659cab57f Jonathan Cameron 2025-01-19 1311 int *val)
e2e6771c646251 Arnaud Pouliquen 2018-01-10 1312 {
e2e6771c646251 Arnaud Pouliquen 2018-01-10 1313 struct stm32_dfsdm_adc *adc = iio_priv(indio_dev);
e2e6771c646251 Arnaud Pouliquen 2018-01-10 1314 int ret;
e2e6771c646251 Arnaud Pouliquen 2018-01-10 1315
3208fa0cd91914 Olivier Moysan 2024-07-30 1316 if (adc->hwc)
e2e6771c646251 Arnaud Pouliquen 2018-01-10 1317 ret = iio_hw_consumer_enable(adc->hwc);
6fc839dc320cd6 Olivier Moysan 2024-07-30 1318 if (adc->backend)
92540659cab57f Jonathan Cameron 2025-01-19 1319 ret = iio_backend_enable(adc->backend[chan->scan_index]);
e2e6771c646251 Arnaud Pouliquen 2018-01-10 @1320 if (ret < 0) {
e2e6771c646251 Arnaud Pouliquen 2018-01-10 1321 dev_err(&indio_dev->dev,
e2e6771c646251 Arnaud Pouliquen 2018-01-10 1322 "%s: IIO enable failed (channel %d)\n",
e2e6771c646251 Arnaud Pouliquen 2018-01-10 1323 __func__, chan->channel);
e2e6771c646251 Arnaud Pouliquen 2018-01-10 1324 return ret;
e2e6771c646251 Arnaud Pouliquen 2018-01-10 1325 }
e2e6771c646251 Arnaud Pouliquen 2018-01-10 1326 ret = stm32_dfsdm_single_conv(indio_dev, chan, val);
3208fa0cd91914 Olivier Moysan 2024-07-30 1327 if (adc->hwc)
e2e6771c646251 Arnaud Pouliquen 2018-01-10 1328 iio_hw_consumer_disable(adc->hwc);
6fc839dc320cd6 Olivier Moysan 2024-07-30 1329 if (adc->backend)
92540659cab57f Jonathan Cameron 2025-01-19 1330 iio_backend_disable(adc->backend[chan->scan_index]);
e2e6771c646251 Arnaud Pouliquen 2018-01-10 1331 if (ret < 0) {
e2e6771c646251 Arnaud Pouliquen 2018-01-10 1332 dev_err(&indio_dev->dev,
e2e6771c646251 Arnaud Pouliquen 2018-01-10 1333 "%s: Conversion failed (channel %d)\n",
e2e6771c646251 Arnaud Pouliquen 2018-01-10 1334 __func__, chan->channel);
e2e6771c646251 Arnaud Pouliquen 2018-01-10 1335 return ret;
e2e6771c646251 Arnaud Pouliquen 2018-01-10 1336 }
92540659cab57f Jonathan Cameron 2025-01-19 1337
92540659cab57f Jonathan Cameron 2025-01-19 1338 return 0;
92540659cab57f Jonathan Cameron 2025-01-19 1339 }
92540659cab57f Jonathan Cameron 2025-01-19 1340
:::::: The code at line 1320 was first introduced by commit
:::::: e2e6771c646251657fafb2a78db566d5c2c70635 IIO: ADC: add STM32 DFSDM sigma delta ADC support
:::::: TO: Arnaud Pouliquen <arnaud.pouliquen@st.com>
:::::: CC: Mark Brown <broonie@kernel.org>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 2+ messages in thread
* [jic23-iio:sparse-friendly-direct-mode 90/166] drivers/iio/adc/stm32-dfsdm-adc.c:1320 __stm32_dfsdm_read_info_raw() error: uninitialized symbol 'ret'.
@ 2025-02-04 5:30 Dan Carpenter
0 siblings, 0 replies; 2+ messages in thread
From: Dan Carpenter @ 2025-02-04 5:30 UTC (permalink / raw)
To: oe-kbuild, Jonathan Cameron; +Cc: lkp, oe-kbuild-all
tree: https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git sparse-friendly-direct-mode
head: 2d042931355bda7a2fd9e7f81d0be99c3669af4f
commit: 92540659cab57f14a1fc6615b93e4adb97b51acd [90/166] iio: adc: stm32-dfsdm: Factor out core of reading INFO_RAW
config: m68k-randconfig-r071-20250204 (https://download.01.org/0day-ci/archive/20250204/202502040918.N96TGHTV-lkp@intel.com/config)
compiler: m68k-linux-gcc (GCC) 14.2.0
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>
| Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
| Closes: https://lore.kernel.org/r/202502040918.N96TGHTV-lkp@intel.com/
smatch warnings:
drivers/iio/adc/stm32-dfsdm-adc.c:1320 __stm32_dfsdm_read_info_raw() error: uninitialized symbol 'ret'.
vim +/ret +1320 drivers/iio/adc/stm32-dfsdm-adc.c
92540659cab57f Jonathan Cameron 2025-01-19 1309 static int __stm32_dfsdm_read_info_raw(struct iio_dev *indio_dev,
92540659cab57f Jonathan Cameron 2025-01-19 1310 struct iio_chan_spec const *chan,
92540659cab57f Jonathan Cameron 2025-01-19 1311 int *val)
e2e6771c646251 Arnaud Pouliquen 2018-01-10 1312 {
e2e6771c646251 Arnaud Pouliquen 2018-01-10 1313 struct stm32_dfsdm_adc *adc = iio_priv(indio_dev);
e2e6771c646251 Arnaud Pouliquen 2018-01-10 1314 int ret;
e2e6771c646251 Arnaud Pouliquen 2018-01-10 1315
3208fa0cd91914 Olivier Moysan 2024-07-30 1316 if (adc->hwc)
e2e6771c646251 Arnaud Pouliquen 2018-01-10 1317 ret = iio_hw_consumer_enable(adc->hwc);
6fc839dc320cd6 Olivier Moysan 2024-07-30 1318 if (adc->backend)
92540659cab57f Jonathan Cameron 2025-01-19 1319 ret = iio_backend_enable(adc->backend[chan->scan_index]);
Could both adc->hwc and adc->backend be false?
e2e6771c646251 Arnaud Pouliquen 2018-01-10 @1320 if (ret < 0) {
^^^
Uninitialized warning
e2e6771c646251 Arnaud Pouliquen 2018-01-10 1321 dev_err(&indio_dev->dev,
e2e6771c646251 Arnaud Pouliquen 2018-01-10 1322 "%s: IIO enable failed (channel %d)\n",
e2e6771c646251 Arnaud Pouliquen 2018-01-10 1323 __func__, chan->channel);
e2e6771c646251 Arnaud Pouliquen 2018-01-10 1324 return ret;
e2e6771c646251 Arnaud Pouliquen 2018-01-10 1325 }
e2e6771c646251 Arnaud Pouliquen 2018-01-10 1326 ret = stm32_dfsdm_single_conv(indio_dev, chan, val);
3208fa0cd91914 Olivier Moysan 2024-07-30 1327 if (adc->hwc)
e2e6771c646251 Arnaud Pouliquen 2018-01-10 1328 iio_hw_consumer_disable(adc->hwc);
6fc839dc320cd6 Olivier Moysan 2024-07-30 1329 if (adc->backend)
92540659cab57f Jonathan Cameron 2025-01-19 1330 iio_backend_disable(adc->backend[chan->scan_index]);
e2e6771c646251 Arnaud Pouliquen 2018-01-10 1331 if (ret < 0) {
e2e6771c646251 Arnaud Pouliquen 2018-01-10 1332 dev_err(&indio_dev->dev,
e2e6771c646251 Arnaud Pouliquen 2018-01-10 1333 "%s: Conversion failed (channel %d)\n",
e2e6771c646251 Arnaud Pouliquen 2018-01-10 1334 __func__, chan->channel);
e2e6771c646251 Arnaud Pouliquen 2018-01-10 1335 return ret;
e2e6771c646251 Arnaud Pouliquen 2018-01-10 1336 }
92540659cab57f Jonathan Cameron 2025-01-19 1337
92540659cab57f Jonathan Cameron 2025-01-19 1338 return 0;
92540659cab57f Jonathan Cameron 2025-01-19 1339 }
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-02-04 5:30 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-04 1:32 [jic23-iio:sparse-friendly-direct-mode 90/166] drivers/iio/adc/stm32-dfsdm-adc.c:1320 __stm32_dfsdm_read_info_raw() error: uninitialized symbol 'ret' kernel test robot
-- strict thread matches above, loose matches on Subject: below --
2025-02-04 5:30 Dan Carpenter
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.