From: kbuild test robot <lkp@intel.com>
To: Marc CAPDEVILLE <m.capdeville@no-log.org>
Cc: kbuild-all@01.org, Kevin Tsai <ktsai@capellamicro.com>,
Jonathan Cameron <jic23@kernel.org>,
Hartmut Knaack <knaack.h@gmx.de>,
Lars-Peter Clausen <lars@metafoo.de>,
Peter Meerwald-Stadler <pmeerw@pmeerw.net>,
Mika Westerberg <mika.westerberg@linux.intel.com>,
Wolfram Sang <wsa@the-dreams.de>,
linux-iio@vger.kernel.org, linux-i2c@vger.kernel.org,
linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org,
Marc CAPDEVILLE <m.capdeville@no-log.org>
Subject: Re: [PATCH v6 3/4] iio : Add cm3218 smbus ara and acpi support
Date: Tue, 26 Dec 2017 14:34:50 +0800 [thread overview]
Message-ID: <201712261459.JQ8urgR0%fengguang.wu@intel.com> (raw)
In-Reply-To: <20171225155723.6338-3-m.capdeville@no-log.org>
[-- Attachment #1: Type: text/plain, Size: 4861 bytes --]
Hi Marc,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on wsa/i2c/for-next]
[also build test ERROR on v4.15-rc5 next-20171222]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Marc-CAPDEVILLE/i2c-core-acpi-Add-i2c_acpi_set_connection/20171226-083729
base: https://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux.git i2c/for-next
config: i386-randconfig-c0-12261310 (attached as .config)
compiler: gcc-7 (Debian 7.2.0-12) 7.2.1 20171025
reproduce:
# save the attached .config to linux build tree
make ARCH=i386
All errors (new ones prefixed by >>):
drivers/iio/light/cm32181.o: In function `cm32181_irq':
>> drivers/iio/light/cm32181.c:336: undefined reference to `i2c_smbus_alert_event'
drivers/iio/light/cm32181.o: In function `cm32181_probe':
>> drivers/iio/light/cm32181.c:405: undefined reference to `i2c_require_smbus_alert'
drivers/iio/light/cm32181.o: In function `cm32181_reg_init':
drivers/iio/light/cm32181.c:95: undefined reference to `i2c_smbus_alert_event'
vim +336 drivers/iio/light/cm32181.c
329
330 static irqreturn_t cm32181_irq(int irq, void *d)
331 {
332 struct cm32181_chip *cm32181 = d;
333
334 if (cm32181->chip_id == CM3218_ID) {
335 /* This is cm3218 chip irq, so handle the smbus alert */
> 336 i2c_smbus_alert_event(cm32181->client);
337 }
338
339 return IRQ_HANDLED;
340 }
341
342 static int cm32181_probe(struct i2c_client *client,
343 const struct i2c_device_id *id)
344 {
345 struct cm32181_chip *cm32181;
346 struct iio_dev *indio_dev;
347 int ret;
348 const struct of_device_id *of_id;
349 const struct acpi_device_id *acpi_id;
350
351 indio_dev = devm_iio_device_alloc(&client->dev, sizeof(*cm32181));
352 if (!indio_dev) {
353 dev_err(&client->dev, "devm_iio_device_alloc failed\n");
354 return -ENOMEM;
355 }
356
357 cm32181 = iio_priv(indio_dev);
358 i2c_set_clientdata(client, indio_dev);
359 cm32181->client = client;
360
361 mutex_init(&cm32181->lock);
362 indio_dev->dev.parent = &client->dev;
363 indio_dev->channels = cm32181_channels;
364 indio_dev->num_channels = ARRAY_SIZE(cm32181_channels);
365 indio_dev->info = &cm32181_info;
366 indio_dev->name = id->name;
367 indio_dev->modes = INDIO_DIRECT_MODE;
368
369 /* Lookup for chip ID from platform, acpi or of device table */
370 if (id) {
371 cm32181->chip_id = id->driver_data;
372 } else if (ACPI_COMPANION(&client->dev)) {
373 acpi_id = acpi_match_device(client->dev.driver->acpi_match_table,
374 &client->dev);
375 if (!acpi_id)
376 return -ENODEV;
377
378 cm32181->chip_id = (kernel_ulong_t)acpi_id->driver_data;
379 } else if (client->dev.of_node) {
380 of_id = of_match_device(client->dev.driver->of_match_table,
381 &client->dev);
382 if (!of_id)
383 return -ENODEV;
384
385 cm32181->chip_id = (kernel_ulong_t)of_id->data;
386 } else {
387 return -ENODEV;
388 }
389
390 if (cm32181->chip_id == CM3218_ID) {
391 if (ACPI_COMPANION(&client->dev) &&
392 client->addr == SMBUS_ARA_ADDR) {
393 /*
394 * In case this device as been enumerated by acpi
395 * with the reserved smbus ARA address (first acpi
396 * connection), request change of address to the second
397 * connection.
398 */
399 ret = i2c_acpi_set_connection(client, 1);
400 if (ret)
401 return ret;
402 }
403
404 /* cm3218 chip require an ara device on his adapter */
> 405 ret = i2c_require_smbus_alert(client);
406 if (ret < 0)
407 return ret;
408
409 /*
410 * If irq is given, request a threaded irq handler to manage
411 * smbus alert.
412 */
413 if (client->irq > 0) {
414 ret = devm_request_threaded_irq(&client->dev,
415 client->irq,
416 NULL, cm32181_irq,
417 IRQF_ONESHOT,
418 "cm32181", cm32181);
419 if (ret)
420 return ret;
421 }
422 }
423
424 ret = cm32181_reg_init(cm32181);
425 if (ret) {
426 dev_err(&client->dev,
427 "%s: register init failed\n",
428 __func__);
429 return ret;
430 }
431
432 ret = devm_iio_device_register(&client->dev, indio_dev);
433 if (ret) {
434 dev_err(&client->dev,
435 "%s: regist device failed\n",
436 __func__);
437 return ret;
438 }
439
440 return 0;
441 }
442
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 21676 bytes --]
next prev parent reply other threads:[~2017-12-26 6:35 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-25 15:57 [PATCH v6 1/4] i2c-core-acpi : Add i2c_acpi_set_connection Marc CAPDEVILLE
2017-12-25 15:57 ` [PATCH v6 2/4] i2c-smbus : Add client discovered ARA support Marc CAPDEVILLE
2017-12-26 1:43 ` kbuild test robot
2017-12-29 13:04 ` Jonathan Cameron
2017-12-25 15:57 ` [PATCH v6 3/4] iio : Add cm3218 smbus ara and acpi support Marc CAPDEVILLE
2017-12-26 6:34 ` kbuild test robot [this message]
2017-12-28 1:19 ` Rafael J. Wysocki
2017-12-29 12:54 ` Jonathan Cameron
2017-12-29 12:53 ` Jonathan Cameron
2017-12-25 15:57 ` [PATCH v6 4/4] iio : cm32181 : cosmetic cleanup Marc CAPDEVILLE
2017-12-29 12:56 ` Jonathan Cameron
2017-12-28 1:04 ` [PATCH v6 1/4] i2c-core-acpi : Add i2c_acpi_set_connection Rafael J. Wysocki
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=201712261459.JQ8urgR0%fengguang.wu@intel.com \
--to=lkp@intel.com \
--cc=jic23@kernel.org \
--cc=kbuild-all@01.org \
--cc=knaack.h@gmx.de \
--cc=ktsai@capellamicro.com \
--cc=lars@metafoo.de \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=m.capdeville@no-log.org \
--cc=mika.westerberg@linux.intel.com \
--cc=pmeerw@pmeerw.net \
--cc=wsa@the-dreams.de \
/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®