From: kbuild test robot <lkp@intel.com>
To: William Breathitt Gray <vilhelm.gray@gmail.com>
Cc: kbuild-all@01.org, jic23@kernel.org, knaack.h@gmx.de,
lars@metafoo.de, pmeerw@pmeerw.net, benjamin.gaignard@linaro.org,
linux-kernel@vger.kernel.org, linux-iio@vger.kernel.org,
William Breathitt Gray <vilhelm.gray@gmail.com>
Subject: Re: [PATCH 2/3] iio: Introduce the generic counter interface
Date: Tue, 1 Aug 2017 07:15:23 +0800 [thread overview]
Message-ID: <201708010741.4qmVf3C3%fengguang.wu@intel.com> (raw)
In-Reply-To: <e7ca230a62f6b850fd89205b38819bd7d5309693.1501516678.git.vilhelm.gray@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 5149 bytes --]
Hi William,
[auto build test WARNING on iio/togreg]
[cannot apply to v4.13-rc3 next-20170731]
[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/William-Breathitt-Gray/iio-Introduce-the-generic-counter-interface/20170801-050943
base: https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git togreg
config: xtensa-allmodconfig (attached as .config)
compiler: xtensa-linux-gcc (GCC) 4.9.0
reproduce:
wget https://raw.githubusercontent.com/01org/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
make.cross ARCH=xtensa
All warnings (new ones prefixed by >>):
drivers/iio/industrialio-counter.c: In function '__iio_counter_value_ext_info_alloc':
>> drivers/iio/industrialio-counter.c:466:23: warning: assignment makes integer from pointer without a cast
ext_info[i].private = (void *)&trigger_pos->signal->id;
^
drivers/iio/industrialio-counter.c:476:23: warning: assignment makes integer from pointer without a cast
ext_info[i].private = (void *)&trigger_pos->signal->id;
^
vim +466 drivers/iio/industrialio-counter.c
388
389 static int __iio_counter_value_ext_info_alloc(struct iio_chan_spec *const chan,
390 struct iio_counter_value *const value)
391 {
392 const struct iio_chan_spec_ext_info ext_info_default[] = {
393 {
394 .name = "name",
395 .shared = IIO_SEPARATE,
396 .read = __iio_counter_value_name_read
397 },
398 IIO_ENUM("function", IIO_SEPARATE, &value->function_enum),
399 {
400 .name = "function_available",
401 .shared = IIO_SEPARATE,
402 .read = iio_enum_available_read,
403 .private = (uintptr_t)((void *)&value->function_enum)
404 },
405 {
406 .name = "triggers",
407 .shared = IIO_SEPARATE,
408 .read = __iio_counter_value_triggers_read
409 }
410 };
411 const size_t num_default = ARRAY_SIZE(ext_info_default);
412 const struct iio_chan_spec_ext_info ext_info_trigger[] = {
413 {
414 .shared = IIO_SEPARATE,
415 .read = __iio_counter_trigger_mode_read,
416 .write = __iio_counter_trigger_mode_write
417 },
418 {
419 .shared = IIO_SEPARATE,
420 .read = __iio_counter_trigger_mode_available_read
421 }
422 };
423 const size_t num_ext_info_trigger = ARRAY_SIZE(ext_info_trigger);
424 const struct list_head *pos;
425 size_t num_triggers = 0;
426 size_t num_triggers_ext_info;
427 size_t num_ext_info;
428 int err;
429 struct iio_chan_spec_ext_info *ext_info;
430 const struct iio_counter_trigger *trigger_pos;
431 size_t i;
432
433 value->function_enum.items = value->function_modes;
434 value->function_enum.num_items = value->num_function_modes;
435 value->function_enum.set = __iio_counter_value_function_set;
436 value->function_enum.get = __iio_counter_value_function_get;
437
438 mutex_lock(&value->trigger_list_lock);
439
440 list_for_each(pos, &value->trigger_list)
441 num_triggers++;
442
443 num_triggers_ext_info = num_ext_info_trigger * num_triggers;
444 num_ext_info = num_default + num_triggers_ext_info + 1;
445
446 ext_info = kmalloc_array(num_ext_info, sizeof(*ext_info), GFP_KERNEL);
447 if (!ext_info) {
448 err = -ENOMEM;
449 goto err_ext_info_alloc;
450 }
451 ext_info[num_ext_info - 1].name = NULL;
452
453 memcpy(ext_info, ext_info_default, sizeof(ext_info_default));
454 for (i = 0; i < num_triggers_ext_info; i += num_ext_info_trigger)
455 memcpy(ext_info + num_default + i, ext_info_trigger,
456 sizeof(ext_info_trigger));
457
458 i = num_default;
459 list_for_each_entry(trigger_pos, &value->trigger_list, list) {
460 ext_info[i].name = kasprintf(GFP_KERNEL, "trigger_signal%d-%d",
461 chan->channel, trigger_pos->signal->id);
462 if (!ext_info[i].name) {
463 err = -ENOMEM;
464 goto err_name_alloc;
465 }
> 466 ext_info[i].private = (void *)&trigger_pos->signal->id;
467 i++;
468
469 ext_info[i].name = kasprintf(GFP_KERNEL,
470 "trigger_signal%d-%d_available",
471 chan->channel, trigger_pos->signal->id);
472 if (!ext_info[i].name) {
473 err = -ENOMEM;
474 goto err_name_alloc;
475 }
476 ext_info[i].private = (void *)&trigger_pos->signal->id;
477 i++;
478 }
479
480 chan->ext_info = ext_info;
481
482 mutex_unlock(&value->trigger_list_lock);
483
484 return 0;
485
486 err_name_alloc:
487 while (i-- > num_default)
488 kfree(ext_info[i].name);
489 kfree(ext_info);
490 err_ext_info_alloc:
491 mutex_unlock(&value->trigger_list_lock);
492 return err;
493 }
494
---
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: 50146 bytes --]
next prev parent reply other threads:[~2017-07-31 23:15 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-31 16:02 [PATCH 0/3] " William Breathitt Gray
2017-07-31 16:03 ` [PATCH 1/3] iio: Implement counter channel specification and IIO_SIGNAL constant William Breathitt Gray
2017-07-31 16:03 ` [PATCH 2/3] iio: Introduce the generic counter interface William Breathitt Gray
2017-07-31 23:15 ` kbuild test robot [this message]
2017-08-20 11:40 ` Jonathan Cameron
2017-08-28 15:57 ` William Breathitt Gray
2017-09-03 17:37 ` Jonathan Cameron
2017-07-31 16:03 ` [PATCH 3/3] iio: 104-quad-8: Add IIO generic counter interface support William Breathitt Gray
2017-08-20 12:11 ` Jonathan Cameron
2017-08-28 16:23 ` William Breathitt Gray
2017-09-03 17:50 ` Jonathan Cameron
2017-09-03 18:24 ` Jonathan Cameron
2017-08-20 12:00 ` [PATCH 0/3] iio: Introduce the generic counter interface Jonathan Cameron
2017-08-28 14:16 ` William Breathitt Gray
2017-09-03 17:44 ` 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=201708010741.4qmVf3C3%fengguang.wu@intel.com \
--to=lkp@intel.com \
--cc=benjamin.gaignard@linaro.org \
--cc=jic23@kernel.org \
--cc=kbuild-all@01.org \
--cc=knaack.h@gmx.de \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pmeerw@pmeerw.net \
--cc=vilhelm.gray@gmail.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®