From: kernel test robot <lkp@intel.com>
To: oe-kbuild@lists.linux.dev
Cc: lkp@intel.com, Dan Carpenter <error27@gmail.com>
Subject: Re: [PATCH] iio: chemical: scd4x: Add pressure compensation
Date: Wed, 5 Jul 2023 20:20:32 +0800 [thread overview]
Message-ID: <202307052018.7DV5CAOH-lkp@intel.com> (raw)
BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
In-Reply-To: <20230704084706.370637-1-roan@protonic.nl>
References: <20230704084706.370637-1-roan@protonic.nl>
TO: Roan van Dijk <roan@protonic.nl>
TO: jic23@kernel.org
CC: lars@metafoo.de
CC: linux-iio@vger.kernel.org
CC: linux-kernel@vger.kernel.org
CC: roan@protonic.nl
Hi Roan,
kernel test robot noticed the following build warnings:
[auto build test WARNING on jic23-iio/togreg]
[also build test WARNING on linus/master v6.4 next-20230705]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Roan-van-Dijk/iio-chemical-scd4x-Add-pressure-compensation/20230704-170621
base: https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git togreg
patch link: https://lore.kernel.org/r/20230704084706.370637-1-roan%40protonic.nl
patch subject: [PATCH] iio: chemical: scd4x: Add pressure compensation
:::::: branch date: 27 hours ago
:::::: commit date: 27 hours ago
config: x86_64-randconfig-m001-20230705 (https://download.01.org/0day-ci/archive/20230705/202307052018.7DV5CAOH-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce: (https://download.01.org/0day-ci/archive/20230705/202307052018.7DV5CAOH-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>
| Reported-by: Dan Carpenter <error27@gmail.com>
| Closes: https://lore.kernel.org/r/202307052018.7DV5CAOH-lkp@intel.com/
smatch warnings:
drivers/iio/chemical/scd4x.c:385 scd4x_read_raw() error: uninitialized symbol 'ret'.
drivers/iio/chemical/scd4x.c:388 scd4x_read_raw() error: uninitialized symbol 'tmp'.
vim +/ret +385 drivers/iio/chemical/scd4x.c
49d22b695cbb69 Roan van Dijk 2021-10-08 334
49d22b695cbb69 Roan van Dijk 2021-10-08 335 static int scd4x_read_raw(struct iio_dev *indio_dev,
49d22b695cbb69 Roan van Dijk 2021-10-08 336 struct iio_chan_spec const *chan, int *val,
49d22b695cbb69 Roan van Dijk 2021-10-08 337 int *val2, long mask)
49d22b695cbb69 Roan van Dijk 2021-10-08 338 {
49d22b695cbb69 Roan van Dijk 2021-10-08 339 struct scd4x_state *state = iio_priv(indio_dev);
49d22b695cbb69 Roan van Dijk 2021-10-08 340 int ret;
49d22b695cbb69 Roan van Dijk 2021-10-08 341 __be16 tmp;
49d22b695cbb69 Roan van Dijk 2021-10-08 342
49d22b695cbb69 Roan van Dijk 2021-10-08 343 switch (mask) {
49d22b695cbb69 Roan van Dijk 2021-10-08 344 case IIO_CHAN_INFO_RAW:
49d22b695cbb69 Roan van Dijk 2021-10-08 345 ret = iio_device_claim_direct_mode(indio_dev);
49d22b695cbb69 Roan van Dijk 2021-10-08 346 if (ret)
49d22b695cbb69 Roan van Dijk 2021-10-08 347 return ret;
49d22b695cbb69 Roan van Dijk 2021-10-08 348
49d22b695cbb69 Roan van Dijk 2021-10-08 349 mutex_lock(&state->lock);
49d22b695cbb69 Roan van Dijk 2021-10-08 350 ret = scd4x_read_channel(state, chan->address);
49d22b695cbb69 Roan van Dijk 2021-10-08 351 mutex_unlock(&state->lock);
49d22b695cbb69 Roan van Dijk 2021-10-08 352
49d22b695cbb69 Roan van Dijk 2021-10-08 353 iio_device_release_direct_mode(indio_dev);
49d22b695cbb69 Roan van Dijk 2021-10-08 354 if (ret < 0)
49d22b695cbb69 Roan van Dijk 2021-10-08 355 return ret;
49d22b695cbb69 Roan van Dijk 2021-10-08 356
49d22b695cbb69 Roan van Dijk 2021-10-08 357 *val = ret;
49d22b695cbb69 Roan van Dijk 2021-10-08 358 return IIO_VAL_INT;
49d22b695cbb69 Roan van Dijk 2021-10-08 359 case IIO_CHAN_INFO_SCALE:
e46e2512ac84bd Roan van Dijk 2021-10-21 360 if (chan->type == IIO_CONCENTRATION) {
e46e2512ac84bd Roan van Dijk 2021-10-21 361 *val = 0;
e46e2512ac84bd Roan van Dijk 2021-10-21 362 *val2 = 100;
e46e2512ac84bd Roan van Dijk 2021-10-21 363 return IIO_VAL_INT_PLUS_MICRO;
e46e2512ac84bd Roan van Dijk 2021-10-21 364 } else if (chan->type == IIO_TEMP) {
49d22b695cbb69 Roan van Dijk 2021-10-08 365 *val = 175000;
49d22b695cbb69 Roan van Dijk 2021-10-08 366 *val2 = 65536;
49d22b695cbb69 Roan van Dijk 2021-10-08 367 return IIO_VAL_FRACTIONAL;
49d22b695cbb69 Roan van Dijk 2021-10-08 368 } else if (chan->type == IIO_HUMIDITYRELATIVE) {
49d22b695cbb69 Roan van Dijk 2021-10-08 369 *val = 100000;
49d22b695cbb69 Roan van Dijk 2021-10-08 370 *val2 = 65536;
49d22b695cbb69 Roan van Dijk 2021-10-08 371 return IIO_VAL_FRACTIONAL;
49d22b695cbb69 Roan van Dijk 2021-10-08 372 }
49d22b695cbb69 Roan van Dijk 2021-10-08 373 return -EINVAL;
49d22b695cbb69 Roan van Dijk 2021-10-08 374 case IIO_CHAN_INFO_OFFSET:
49d22b695cbb69 Roan van Dijk 2021-10-08 375 *val = -16852;
49d22b695cbb69 Roan van Dijk 2021-10-08 376 *val2 = 114286;
49d22b695cbb69 Roan van Dijk 2021-10-08 377 return IIO_VAL_INT_PLUS_MICRO;
49d22b695cbb69 Roan van Dijk 2021-10-08 378 case IIO_CHAN_INFO_CALIBBIAS:
49d22b695cbb69 Roan van Dijk 2021-10-08 379 mutex_lock(&state->lock);
8e4a309948cffe Roan van Dijk 2023-07-04 380 if (chan->type == IIO_TEMP)
49d22b695cbb69 Roan van Dijk 2021-10-08 381 ret = scd4x_read(state, CMD_GET_TEMP_OFFSET, &tmp, sizeof(tmp));
8e4a309948cffe Roan van Dijk 2023-07-04 382 else if (chan->type == IIO_PRESSURE)
8e4a309948cffe Roan van Dijk 2023-07-04 383 ret = scd4x_read(state, CMD_GET_AMB_PRESSURE, &tmp, sizeof(tmp));
49d22b695cbb69 Roan van Dijk 2021-10-08 384 mutex_unlock(&state->lock);
49d22b695cbb69 Roan van Dijk 2021-10-08 @385 if (ret)
49d22b695cbb69 Roan van Dijk 2021-10-08 386 return ret;
49d22b695cbb69 Roan van Dijk 2021-10-08 387
49d22b695cbb69 Roan van Dijk 2021-10-08 @388 *val = be16_to_cpu(tmp);
49d22b695cbb69 Roan van Dijk 2021-10-08 389
49d22b695cbb69 Roan van Dijk 2021-10-08 390 return IIO_VAL_INT;
49d22b695cbb69 Roan van Dijk 2021-10-08 391 default:
49d22b695cbb69 Roan van Dijk 2021-10-08 392 return -EINVAL;
49d22b695cbb69 Roan van Dijk 2021-10-08 393 }
49d22b695cbb69 Roan van Dijk 2021-10-08 394 }
49d22b695cbb69 Roan van Dijk 2021-10-08 395
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next reply other threads:[~2023-07-05 12:21 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-05 12:20 kernel test robot [this message]
-- strict thread matches above, loose matches on Subject: below --
2023-07-04 8:47 [PATCH] iio: chemical: scd4x: Add pressure compensation Roan van Dijk
2023-07-04 11:34 ` kernel test robot
2023-07-05 13:03 ` Dan Carpenter
2023-07-06 1:28 ` Jonathan Cameron
[not found] ` <e575a7b0-20a4-39c6-9fa5-87185108e683@protonic.nl>
2023-07-08 14:33 ` Jonathan Cameron
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202307052018.7DV5CAOH-lkp@intel.com \
--to=lkp@intel.com \
--cc=error27@gmail.com \
--cc=oe-kbuild@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.