[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <bde42756-5153-42fa-b9d6-769a2978c337@suswa.mountain>
Date: Thu, 23 Nov 2023 09:30:01 +0300
From: Dan Carpenter <dan.carpenter@...aro.org>
To: oe-kbuild@...ts.linux.dev,
"marcelo.schmitt@...log.com" <marcelo.schmitt@...log.com>,
beniamin.bia@...log.com, paul.cercueil@...log.com,
Michael.Hennerich@...log.com, lars@...afoo.de, jic23@...nel.org,
marcelo.schmitt1@...il.com
Cc: lkp@...el.com, oe-kbuild-all@...ts.linux.dev,
Marcelo Schmitt <marcelo.schmitt@...log.com>,
linux-iio@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 6/7] iio: adc: Add support for AD7091R-8
Hi,
kernel test robot noticed the following build warnings:
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/marcelo-schmitt-analog-com/MAINTAINERS-Add-MAINTAINERS-entry-for-AD7091R/20231122-093706
base: https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git togreg
patch link: https://lore.kernel.org/r/514295a9b760b44a710425803a41decddd3e8df8.1700595310.git.marcelo.schmitt1%40gmail.com
patch subject: [PATCH 6/7] iio: adc: Add support for AD7091R-8
config: x86_64-randconfig-161-20231122 (https://download.01.org/0day-ci/archive/20231123/202311230719.KwwC9NyC-lkp@intel.com/config)
compiler: clang version 16.0.4 (https://github.com/llvm/llvm-project.git ae42196bc493ffe877a7e3dff8be32035dea4d07)
reproduce: (https://download.01.org/0day-ci/archive/20231123/202311230719.KwwC9NyC-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@...el.com>
| Reported-by: Dan Carpenter <error27@...il.com>
| Closes: https://lore.kernel.org/r/202311230719.KwwC9NyC-lkp@intel.com/
smatch warnings:
drivers/iio/adc/ad7091r-base.c:53 ad7091r_set_mode() warn: ignoring unreachable code.
vim +53 drivers/iio/adc/ad7091r-base.c
ca69300173b642 Paul Cercueil 2019-11-15 32 static int ad7091r_set_mode(struct ad7091r_state *st, enum ad7091r_mode mode)
ca69300173b642 Paul Cercueil 2019-11-15 33 {
ca69300173b642 Paul Cercueil 2019-11-15 34 int ret, conf;
ca69300173b642 Paul Cercueil 2019-11-15 35
ca69300173b642 Paul Cercueil 2019-11-15 36 switch (mode) {
ca69300173b642 Paul Cercueil 2019-11-15 37 case AD7091R_MODE_SAMPLE:
ca69300173b642 Paul Cercueil 2019-11-15 38 conf = 0;
ca69300173b642 Paul Cercueil 2019-11-15 39 break;
ca69300173b642 Paul Cercueil 2019-11-15 40 case AD7091R_MODE_COMMAND:
ca69300173b642 Paul Cercueil 2019-11-15 41 conf = AD7091R_REG_CONF_CMD;
ca69300173b642 Paul Cercueil 2019-11-15 42 break;
ca69300173b642 Paul Cercueil 2019-11-15 43 case AD7091R_MODE_AUTOCYCLE:
ca69300173b642 Paul Cercueil 2019-11-15 44 conf = AD7091R_REG_CONF_AUTO;
ca69300173b642 Paul Cercueil 2019-11-15 45 break;
ca69300173b642 Paul Cercueil 2019-11-15 46 default:
ca69300173b642 Paul Cercueil 2019-11-15 47 return -EINVAL;
ca69300173b642 Paul Cercueil 2019-11-15 48 }
ca69300173b642 Paul Cercueil 2019-11-15 49
fccb9cf346d38a Marcelo Schmitt 2023-11-21 50 /* AD7091R-2/4/8 don't set normal, command, autocycle modes in conf reg */
fccb9cf346d38a Marcelo Schmitt 2023-11-21 51 if (st->chip_info->type == AD7091R5) {
fccb9cf346d38a Marcelo Schmitt 2023-11-21 52 return 0;
I normally ignore when people add a return 0 to stub out code because
it's obviously deliberate. But this is a patch to add support for new
hardware and it's stubbing out the existing:
ret = regmap_update_bits()
For existing users... It feels like if that's necessary then it should
be done in a separate commit.
ca69300173b642 Paul Cercueil 2019-11-15 @53 ret = regmap_update_bits(st->map, AD7091R_REG_CONF,
ca69300173b642 Paul Cercueil 2019-11-15 54 AD7091R_REG_CONF_MODE_MASK, conf);
ca69300173b642 Paul Cercueil 2019-11-15 55 if (ret)
ca69300173b642 Paul Cercueil 2019-11-15 56 return ret;
fccb9cf346d38a Marcelo Schmitt 2023-11-21 57 }
ca69300173b642 Paul Cercueil 2019-11-15 58
ca69300173b642 Paul Cercueil 2019-11-15 59 st->mode = mode;
ca69300173b642 Paul Cercueil 2019-11-15 60
ca69300173b642 Paul Cercueil 2019-11-15 61 return 0;
ca69300173b642 Paul Cercueil 2019-11-15 62 }
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
Powered by blists - more mailing lists