From: kernel test robot <lkp@intel.com>
To: andrei.drimbarean@analog.com, linux-iio@vger.kernel.org,
linux-kernel@vger.kernel.org
Cc: llvm@lists.linux.dev, kbuild-all@lists.01.org,
devicetree@vger.kernel.org, fazilyildiran@gmail.com,
andrei.drimbarean@analog.com, robh+dt@kernel.org,
jic23@kernel.org, Michael.Hennerich@analog.com, lars@metafoo.de
Subject: Re: [PATCH 2/2] drivers:iio:light: add ADPD188 driver support
Date: Sun, 10 Oct 2021 04:30:53 +0800 [thread overview]
Message-ID: <202110100421.vAmN5LcM-lkp@intel.com> (raw)
In-Reply-To: <20211008112747.79969-3-andrei.drimbarean@analog.com>
[-- Attachment #1: Type: text/plain, Size: 5147 bytes --]
Hi,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on jic23-iio/togreg]
[also build test ERROR on linux/master robh/for-next linus/master v5.15-rc4 next-20211008]
[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/0day-ci/linux/commits/andrei-drimbarean-analog-com/ADPD188-linux-driver/20211008-193035
base: https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git togreg
config: arm-randconfig-c002-20211010 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 30caca39f401ae17927439c0a0bd6d1b1916dd6a)
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
# install arm cross compiling tool for clang build
# apt-get install binutils-arm-linux-gnueabi
# https://github.com/0day-ci/linux/commit/2fdc24f2cc61e00f472a8857c942bfa26ec97f0b
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review andrei-drimbarean-analog-com/ADPD188-linux-driver/20211008-193035
git checkout 2fdc24f2cc61e00f472a8857c942bfa26ec97f0b
# save the attached .config to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=arm SHELL=/bin/bash drivers/iio/light/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All error/warnings (new ones prefixed by >>):
>> drivers/iio/light/adpd188.c:572:13: warning: variable 'ret' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
} else if (config.slot_id == ADPD188_SLOTB) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/iio/light/adpd188.c:583:9: note: uninitialized use occurs here
return ret;
^~~
drivers/iio/light/adpd188.c:572:9: note: remove the 'if' if its condition is always true
} else if (config.slot_id == ADPD188_SLOTB) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/iio/light/adpd188.c:561:9: note: initialize the variable 'ret' to silence this warning
int ret;
^
= 0
>> drivers/iio/light/adpd188.c:1306:22: error: no member named 'id' in 'struct iio_dev'
indio_dev->id);
~~~~~~~~~ ^
1 warning and 1 error generated.
vim +1306 drivers/iio/light/adpd188.c
1266
1267 static int adpd188_core_setup(struct iio_dev *indio_dev, struct device *dev,
1268 int irq)
1269 {
1270 int ret;
1271 int regval;
1272 struct adpd188 *dev_data = iio_priv(indio_dev);
1273 struct adpd188_ops *ops = dev_data->ops;
1274 struct iio_trigger *trig;
1275
1276 ret = ops->reg_read(dev_data->bus, ADPD188_REG_DEVID, ®val);
1277 if (ret < 0)
1278 return ret;
1279 if ((regval & ADPD188_DEVID_MASK) != ADPD188_DEVID) {
1280 dev_err(dev, "Error wrong device ID: %d\n", regval);
1281 return -ENODEV;
1282 }
1283
1284 ret = adpd188_reg_write_mask(dev_data, ADPD188_REG_SAMPLE_CLK, 1, ADPD188_CLK32K_EN);
1285 if (ret < 0)
1286 return ret;
1287
1288 ret = adpd188_core_smoke_setup(dev_data);
1289 if (ret < 0)
1290 return ret;
1291
1292 ret = adpd188_reg_write_mask(dev_data, ADPD188_REG_GPIO_DRV, 1, ADPD188_GPIO0_ENA);
1293 if (ret < 0)
1294 return ret;
1295 if (dev_data->no_devices > 1)
1296 regval = 0xD;
1297 else
1298 regval = 0x0;
1299 ret = adpd188_reg_write_mask(dev_data, ADPD188_REG_GPIO_CTRL,
1300 regval, ADPD188_GPIO0_ALT_CONFIG);
1301 if (ret < 0)
1302 return ret;
1303
1304 trig = devm_iio_trigger_alloc(indio_dev->dev.parent, "%s-dev%d",
1305 indio_dev->name,
> 1306 indio_dev->id);
1307 if (!trig)
1308 return -ENOMEM;
1309
1310 trig->dev.parent = indio_dev->dev.parent;
1311 trig->ops = &adpd188_trigger_ops;
1312 iio_trigger_set_drvdata(trig, indio_dev);
1313
1314 ret = devm_iio_trigger_register(dev, trig);
1315 if (ret)
1316 return ret;
1317
1318 indio_dev->trig = iio_trigger_get(trig);
1319
1320 init_completion(&dev_data->value_ok);
1321
1322 ret = devm_request_threaded_irq(indio_dev->dev.parent, irq,
1323 &adpd188_interrupt, &adpd188_oneshot_apply,
1324 IRQF_TRIGGER_HIGH | IRQF_ONESHOT,
1325 indio_dev->name, indio_dev);
1326 if (ret)
1327 return ret;
1328
1329 return devm_iio_triggered_buffer_setup(indio_dev->dev.parent, indio_dev,
1330 &iio_pollfunc_store_time,
1331 &adpd188_trigger_handler,
1332 &adpd188_buffer_setup_ops);
1333 }
1334
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 26274 bytes --]
prev parent reply other threads:[~2021-10-09 20:32 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-08 11:27 [PATCH 0/2] ADPD188 linux driver andrei.drimbarean
2021-10-08 11:27 ` [PATCH 1/2] dt-bindings: add adpd188 schema andrei.drimbarean
2021-10-08 16:34 ` Jonathan Cameron
2021-10-08 19:48 ` Rob Herring
2021-10-08 11:27 ` [PATCH 2/2] drivers:iio:light: add ADPD188 driver support andrei.drimbarean
2021-10-08 17:55 ` Jonathan Cameron
2021-10-09 20:30 ` kernel test robot [this message]
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=202110100421.vAmN5LcM-lkp@intel.com \
--to=lkp@intel.com \
--cc=Michael.Hennerich@analog.com \
--cc=andrei.drimbarean@analog.com \
--cc=devicetree@vger.kernel.org \
--cc=fazilyildiran@gmail.com \
--cc=jic23@kernel.org \
--cc=kbuild-all@lists.01.org \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=robh+dt@kernel.org \
/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).