From: kbuild test robot <lkp@intel.com>
To: Pavel Machek <pavel@ucw.cz>
Cc: kbuild-all@01.org, Jacek Anaszewski <jacek.anaszewski@gmail.com>,
Tony Lindgren <tony@atomide.com>,
kernel list <linux-kernel@vger.kernel.org>,
sre@kernel.org, nekit1000@gmail.com, mpartap@gmx.net,
merlijn@wizzup.org, Dan Murphy <dmurphy@ti.com>,
linux-leds@vger.kernel.org
Subject: Re: [PATCH] lm3532: right registration to work with LED-backlight
Date: Tue, 17 Sep 2019 23:10:31 +0800 [thread overview]
Message-ID: <201909172340.4IiDNcEm%lkp@intel.com> (raw)
In-Reply-To: <20190917124032.GA27465@amd>
[-- Attachment #1: Type: text/plain, Size: 7094 bytes --]
Hi Pavel,
I love your patch! Yet something to improve:
[auto build test ERROR on linus/master]
[cannot apply to v5.3 next-20190916]
[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/Pavel-Machek/lm3532-right-registration-to-work-with-LED-backlight/20190917-205315
config: sparc64-allmodconfig (attached as .config)
compiler: sparc64-linux-gcc (GCC) 7.4.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
GCC_VERSION=7.4.0 make.cross ARCH=sparc64
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>
All error/warnings (new ones prefixed by >>):
drivers/leds/leds-lm3532.c: In function 'lm3532_parse_node':
>> drivers/leds/leds-lm3532.c:520:10: error: variable 'idata' has initializer but incomplete type
struct led_init_data idata = {
^~~~~~~~~~~~~
>> drivers/leds/leds-lm3532.c:521:5: error: 'struct led_init_data' has no member named 'fwnode'
.fwnode = child,
^~~~~~
>> drivers/leds/leds-lm3532.c:521:14: warning: excess elements in struct initializer
.fwnode = child,
^~~~~
drivers/leds/leds-lm3532.c:521:14: note: (near initialization for 'idata')
>> drivers/leds/leds-lm3532.c:522:5: error: 'struct led_init_data' has no member named 'default_label'
.default_label = ":",
^~~~~~~~~~~~~
drivers/leds/leds-lm3532.c:522:21: warning: excess elements in struct initializer
.default_label = ":",
^~~
drivers/leds/leds-lm3532.c:522:21: note: (near initialization for 'idata')
>> drivers/leds/leds-lm3532.c:523:5: error: 'struct led_init_data' has no member named 'devicename'
.devicename = priv->client->name,
^~~~~~~~~~
drivers/leds/leds-lm3532.c:523:18: warning: excess elements in struct initializer
.devicename = priv->client->name,
^~~~
drivers/leds/leds-lm3532.c:523:18: note: (near initialization for 'idata')
>> drivers/leds/leds-lm3532.c:520:24: error: storage size of 'idata' isn't known
struct led_init_data idata = {
^~~~~
>> drivers/leds/leds-lm3532.c:591:9: error: implicit declaration of function 'devm_led_classdev_register_ext'; did you mean 'devm_led_classdev_register'? [-Werror=implicit-function-declaration]
ret = devm_led_classdev_register_ext(priv->dev, &led->led_dev, &idata);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
devm_led_classdev_register
drivers/leds/leds-lm3532.c:520:24: warning: unused variable 'idata' [-Wunused-variable]
struct led_init_data idata = {
^~~~~
cc1: some warnings being treated as errors
vim +/idata +520 drivers/leds/leds-lm3532.c
485
486 static int lm3532_parse_node(struct lm3532_data *priv)
487 {
488 struct fwnode_handle *child = NULL;
489 struct lm3532_led *led;
490 const char *name;
491 int control_bank;
492 u32 ramp_time;
493 size_t i = 0;
494 int ret;
495
496 priv->enable_gpio = devm_gpiod_get_optional(&priv->client->dev,
497 "enable", GPIOD_OUT_LOW);
498 if (IS_ERR(priv->enable_gpio))
499 priv->enable_gpio = NULL;
500
501 priv->regulator = devm_regulator_get(&priv->client->dev, "vin");
502 if (IS_ERR(priv->regulator))
503 priv->regulator = NULL;
504
505 ret = device_property_read_u32(&priv->client->dev, "ramp-up-us",
506 &ramp_time);
507 if (ret)
508 dev_info(&priv->client->dev, "ramp-up-ms property missing\n");
509 else
510 priv->runtime_ramp_up = lm3532_get_ramp_index(ramp_time);
511
512 ret = device_property_read_u32(&priv->client->dev, "ramp-down-us",
513 &ramp_time);
514 if (ret)
515 dev_info(&priv->client->dev, "ramp-down-ms property missing\n");
516 else
517 priv->runtime_ramp_down = lm3532_get_ramp_index(ramp_time);
518
519 device_for_each_child_node(priv->dev, child) {
> 520 struct led_init_data idata = {
> 521 .fwnode = child,
> 522 .default_label = ":",
> 523 .devicename = priv->client->name,
524 };
525
526 led = &priv->leds[i];
527
528 ret = fwnode_property_read_u32(child, "reg", &control_bank);
529 if (ret) {
530 dev_err(&priv->client->dev, "reg property missing\n");
531 fwnode_handle_put(child);
532 goto child_out;
533 }
534
535 if (control_bank > LM3532_CONTROL_C) {
536 dev_err(&priv->client->dev, "Control bank invalid\n");
537 continue;
538 }
539
540 led->control_bank = control_bank;
541
542 ret = fwnode_property_read_u32(child, "ti,led-mode",
543 &led->mode);
544 if (ret) {
545 dev_err(&priv->client->dev, "ti,led-mode property missing\n");
546 fwnode_handle_put(child);
547 goto child_out;
548 }
549
550 if (led->mode == LM3532_BL_MODE_ALS) {
551 ret = lm3532_parse_als(priv);
552 if (ret)
553 dev_err(&priv->client->dev, "Failed to parse als\n");
554 else
555 lm3532_als_configure(priv, led);
556 }
557
558 led->num_leds = fwnode_property_read_u32_array(child,
559 "led-sources",
560 NULL, 0);
561
562 if (led->num_leds > LM3532_MAX_LED_STRINGS) {
563 dev_err(&priv->client->dev, "To many LED string defined\n");
564 continue;
565 }
566
567 ret = fwnode_property_read_u32_array(child, "led-sources",
568 led->led_strings,
569 led->num_leds);
570 if (ret) {
571 dev_err(&priv->client->dev, "led-sources property missing\n");
572 fwnode_handle_put(child);
573 goto child_out;
574 }
575
576 fwnode_property_read_string(child, "linux,default-trigger",
577 &led->led_dev.default_trigger);
578
579 ret = fwnode_property_read_string(child, "label", &name);
580 if (ret)
581 snprintf(led->label, sizeof(led->label),
582 "%s::", priv->client->name);
583 else
584 snprintf(led->label, sizeof(led->label),
585 "%s:%s", priv->client->name, name);
586
587 led->priv = priv;
588 led->led_dev.name = led->label;
589 led->led_dev.brightness_set_blocking = lm3532_brightness_set;
590
> 591 ret = devm_led_classdev_register_ext(priv->dev, &led->led_dev, &idata);
592 if (ret) {
593 dev_err(&priv->client->dev, "led register err: %d\n",
594 ret);
595 fwnode_handle_put(child);
596 goto child_out;
597 }
598
599 lm3532_init_registers(led);
600
601 i++;
602 }
603
604 child_out:
605 return ret;
606 }
607
---
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: 58751 bytes --]
next prev parent reply other threads:[~2019-09-17 15:11 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-27 21:52 [PATCH] leds: lm3532: Avoid potentially unpaired regulator calls Tony Lindgren
2019-08-28 8:42 ` Pavel Machek
2019-08-28 8:53 ` [FYI] lm3532: right registration to work with LED-backlight Pavel Machek
2019-08-28 20:32 ` Jacek Anaszewski
2019-09-08 8:03 ` Pavel Machek
2019-09-08 16:17 ` Jacek Anaszewski
2019-09-17 12:40 ` [PATCH] " Pavel Machek
2019-09-17 15:10 ` kbuild test robot [this message]
2019-09-17 12:42 ` [FYI] " Pavel Machek
2019-09-17 17:23 ` Jacek Anaszewski
2019-08-28 20:09 ` [PATCH] leds: lm3532: Avoid potentially unpaired regulator calls Jacek Anaszewski
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=201909172340.4IiDNcEm%lkp@intel.com \
--to=lkp@intel.com \
--cc=dmurphy@ti.com \
--cc=jacek.anaszewski@gmail.com \
--cc=kbuild-all@01.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-leds@vger.kernel.org \
--cc=merlijn@wizzup.org \
--cc=mpartap@gmx.net \
--cc=nekit1000@gmail.com \
--cc=pavel@ucw.cz \
--cc=sre@kernel.org \
--cc=tony@atomide.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