From: kernel test robot <lkp@intel.com>
To: Xiaohui Zhang <xiaohuizhang@ruc.edu.cn>,
Jonathan Cameron <jic23@kernel.org>,
Lars-Peter Clausen <lars@metafoo.de>,
Gwendal Grignou <gwendal@chromium.org>,
Stephen Boyd <swboyd@chromium.org>,
Jongpil Jung <jongpil19.jung@samsung.com>,
linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: kbuild-all@lists.01.org
Subject: Re: [PATCH 1/1] iio:proximity:sx9360: Fix hardware gain read/write
Date: Thu, 9 Jun 2022 08:14:50 +0800 [thread overview]
Message-ID: <202206090828.1Q7GljFY-lkp@intel.com> (raw)
In-Reply-To: <20220608010857.1720-1-xiaohuizhang@ruc.edu.cn>
Hi Xiaohui,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on jic23-iio/togreg]
[also build test ERROR on v5.19-rc1 next-20220608]
[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]
url: https://github.com/intel-lab-lkp/linux/commits/Xiaohui-Zhang/iio-proximity-sx9360-Fix-hardware-gain-read-write/20220608-125912
base: https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git togreg
config: openrisc-randconfig-r033-20220608 (https://download.01.org/0day-ci/archive/20220609/202206090828.1Q7GljFY-lkp@intel.com/config)
compiler: or1k-linux-gcc (GCC) 11.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/intel-lab-lkp/linux/commit/bdc0a6947530604152de0d152635e144a486ee32
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Xiaohui-Zhang/iio-proximity-sx9360-Fix-hardware-gain-read-write/20220608-125912
git checkout bdc0a6947530604152de0d152635e144a486ee32
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.3.0 make.cross W=1 O=build_dir ARCH=openrisc SHELL=/bin/bash drivers/iio/proximity/
If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
drivers/iio/proximity/sx9360.c: In function 'sx9360_read_gain':
>> drivers/iio/proximity/sx9360.c:297:28: error: 'SX9360_REG_PROX_CTRL0_GAIN_RSVD' undeclared (first use in this function); did you mean 'SX9324_REG_PROX_CTRL0_GAIN_RSVD'?
297 | else if (regval == SX9360_REG_PROX_CTRL0_GAIN_RSVD ||
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| SX9324_REG_PROX_CTRL0_GAIN_RSVD
drivers/iio/proximity/sx9360.c:297:28: note: each undeclared identifier is reported only once for each function it appears in
>> drivers/iio/proximity/sx9360.c:298:27: error: 'SX9360_REG_PROX_CTRL0_GAIN_8' undeclared (first use in this function); did you mean 'SX9324_REG_PROX_CTRL0_GAIN_8'?
298 | regval > SX9360_REG_PROX_CTRL0_GAIN_8)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
| SX9324_REG_PROX_CTRL0_GAIN_8
drivers/iio/proximity/sx9360.c: In function 'sx9360_write_gain':
drivers/iio/proximity/sx9360.c:646:32: error: 'SX9360_REG_PROX_CTRL0_GAIN_8' undeclared (first use in this function); did you mean 'SX9324_REG_PROX_CTRL0_GAIN_8'?
646 | if (val <= 0 || gain > SX9360_REG_PROX_CTRL0_GAIN_8)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
| SX9324_REG_PROX_CTRL0_GAIN_8
drivers/iio/proximity/sx9360.c: At top level:
>> drivers/iio/proximity/sx9360.c:699:17: error: 'SX9360_REG_PROX_CTRL0_GAIN_1' undeclared here (not in a function); did you mean 'SX9324_REG_PROX_CTRL0_GAIN_1'?
699 | SX9360_REG_PROX_CTRL0_GAIN_1 << SX9360_REG_PROX_CTRL0_GAIN_SHIFT |
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
| SX9324_REG_PROX_CTRL0_GAIN_1
>> drivers/iio/proximity/sx9360.c:699:49: error: 'SX9360_REG_PROX_CTRL0_GAIN_SHIFT' undeclared here (not in a function); did you mean 'SX9324_REG_PROX_CTRL0_GAIN_SHIFT'?
699 | SX9360_REG_PROX_CTRL0_GAIN_1 << SX9360_REG_PROX_CTRL0_GAIN_SHIFT |
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| SX9324_REG_PROX_CTRL0_GAIN_SHIFT
vim +297 drivers/iio/proximity/sx9360.c
282
283 static int sx9360_read_gain(struct sx_common_data *data,
284 const struct iio_chan_spec *chan, int *val)
285 {
286 unsigned int reg, regval;
287 int ret;
288
289 reg = SX9360_REG_PROX_CTRL0_PHR + chan->channel;
290 ret = regmap_read(data->regmap, reg, ®val);
291 if (ret)
292 return ret;
293
294 regval = FIELD_GET(SX9360_REG_PROX_CTRL0_GAIN_MASK, regval);
295 if (regval)
296 regval--;
> 297 else if (regval == SX9360_REG_PROX_CTRL0_GAIN_RSVD ||
> 298 regval > SX9360_REG_PROX_CTRL0_GAIN_8)
299 return -EINVAL;
300
301 *val = 1 << regval;
302
303 return IIO_VAL_INT;
304 }
305
--
0-DAY CI Kernel Test Service
https://01.org/lkp
next prev parent reply other threads:[~2022-06-09 0:15 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-08 1:08 [PATCH 1/1] iio:proximity:sx9360: Fix hardware gain read/write Xiaohui Zhang
2022-06-08 23:44 ` kernel test robot
2022-06-09 0:14 ` kernel test robot [this message]
-- strict thread matches above, loose matches on Subject: below --
2022-06-10 5:30 Xiaohui Zhang
2022-06-10 14:37 ` Andy Shevchenko
2022-06-11 16:03 ` 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=202206090828.1Q7GljFY-lkp@intel.com \
--to=lkp@intel.com \
--cc=gwendal@chromium.org \
--cc=jic23@kernel.org \
--cc=jongpil19.jung@samsung.com \
--cc=kbuild-all@lists.01.org \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=swboyd@chromium.org \
--cc=xiaohuizhang@ruc.edu.cn \
/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;
as well as URLs for NNTP newsgroup(s).