lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <201909172340.4IiDNcEm%lkp@intel.com>
Date:   Tue, 17 Sep 2019 23:10:31 +0800
From:   kbuild test robot <lkp@...el.com>
To:     Pavel Machek <pavel@....cz>
Cc:     kbuild-all@...org, Jacek Anaszewski <jacek.anaszewski@...il.com>,
        Tony Lindgren <tony@...mide.com>,
        kernel list <linux-kernel@...r.kernel.org>, sre@...nel.org,
        nekit1000@...il.com, mpartap@....net, merlijn@...zup.org,
        Dan Murphy <dmurphy@...com>, linux-leds@...r.kernel.org
Subject: Re: [PATCH] lm3532: right registration to work with LED-backlight

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@...el.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

Download attachment ".config.gz" of type "application/gzip" (58751 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ