From: Dan Carpenter <dan.carpenter@linaro.org>
To: oe-kbuild@lists.linux.dev,
"marcelo.schmitt@analog.com" <marcelo.schmitt@analog.com>,
beniamin.bia@analog.com, paul.cercueil@analog.com,
Michael.Hennerich@analog.com, lars@metafoo.de, jic23@kernel.org,
marcelo.schmitt1@gmail.com
Cc: lkp@intel.com, oe-kbuild-all@lists.linux.dev,
Marcelo Schmitt <marcelo.schmitt@analog.com>,
linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 6/7] iio: adc: Add support for AD7091R-8
Date: Thu, 23 Nov 2023 09:30:01 +0300 [thread overview]
Message-ID: <bde42756-5153-42fa-b9d6-769a2978c337@suswa.mountain> (raw)
In-Reply-To: <514295a9b760b44a710425803a41decddd3e8df8.1700595310.git.marcelo.schmitt1@gmail.com>
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@intel.com>
| Reported-by: Dan Carpenter <error27@gmail.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
next prev parent reply other threads:[~2023-11-23 6:30 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-21 21:33 [PATCH 0/7] Add support for AD7091R-2/-4/-8 marcelo.schmitt
2023-11-21 21:34 ` [PATCH 1/7] iio: adc: ad7091r-base: Set alert config and drvdata marcelo.schmitt
2023-11-21 21:35 ` [PATCH 2/7] MAINTAINERS: Add MAINTAINERS entry for AD7091R marcelo.schmitt
2023-11-21 21:35 ` [PATCH 3/7] iio: adc: ad7091r: Move defines to header file marcelo.schmitt
2023-11-22 12:40 ` kernel test robot
2023-11-21 21:35 ` [PATCH 4/7] iio: adc: ad7091r: Alloc IIO device before generic probe marcelo.schmitt
2023-11-21 21:36 ` [PATCH 5/7] dt-bindings: iio: Add binding documentation for AD7091R-8 marcelo.schmitt
2023-11-22 9:57 ` Krzysztof Kozlowski
2023-11-22 12:40 ` kernel test robot
2023-11-21 21:36 ` [PATCH 6/7] iio: adc: Add support " marcelo.schmitt
2023-11-22 10:01 ` Krzysztof Kozlowski
2023-11-23 6:30 ` Dan Carpenter [this message]
2023-11-21 21:36 ` [PATCH 7/7] iio: adc: ad7091r-base: Add debugfs reg access marcelo.schmitt
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=bde42756-5153-42fa-b9d6-769a2978c337@suswa.mountain \
--to=dan.carpenter@linaro.org \
--cc=Michael.Hennerich@analog.com \
--cc=beniamin.bia@analog.com \
--cc=jic23@kernel.org \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lkp@intel.com \
--cc=marcelo.schmitt1@gmail.com \
--cc=marcelo.schmitt@analog.com \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=oe-kbuild@lists.linux.dev \
--cc=paul.cercueil@analog.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®