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: <202509171109.7rJrwT7i-lkp@intel.com>
Date: Wed, 17 Sep 2025 11:37:08 +0800
From: kernel test robot <lkp@...el.com>
To: Jonathan Brophy <professorjonny98@...il.com>,
	lee Jones <lee@...nel.org>, Pavel Machek <pavel@...nel.org>,
	Jonathan Brophy <professor_jonny@...mail.com>,
	Rob Herring <robh@...nel.org>,
	Krzysztof Kozlowski <krzk@...nel.org>,
	Conor Dooley <conor+dt@...nel.org>,
	Radoslav Tsvetkov <rtsvetkov@...dotech.eu>
Cc: oe-kbuild-all@...ts.linux.dev, devicetree@...r.kernel.org,
	linux-kernel@...r.kernel.org, linux-leds@...r.kernel.org
Subject: Re: [PATCH 2/5] leds: rgb: Add Virtual Color LED Group driver to Make

Hi Jonathan,

kernel test robot noticed the following build warnings:

[auto build test WARNING on lee-leds/for-leds-next]
[also build test WARNING on robh/for-next linus/master v6.17-rc6 next-20250916]
[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#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Jonathan-Brophy/leds-rgb-Add-Virtual-Color-LED-Group-driver-to-Make/20250916-190606
base:   https://git.kernel.org/pub/scm/linux/kernel/git/lee/leds.git for-leds-next
patch link:    https://lore.kernel.org/r/20250916110217.45894-2-professorjonny98%40gmail.com
patch subject: [PATCH 2/5] leds: rgb: Add Virtual Color LED Group driver to Make
config: i386-randconfig-012-20250917 (https://download.01.org/0day-ci/archive/20250917/202509171109.7rJrwT7i-lkp@intel.com/config)
compiler: gcc-13 (Debian 13.3.0-16) 13.3.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250917/202509171109.7rJrwT7i-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@...el.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202509171109.7rJrwT7i-lkp@intel.com/

All warnings (new ones prefixed by >>):

   drivers/leds/rgb/leds-group-virtualcolor.c: In function 'leds_virtualcolor_init_vled':
   drivers/leds/rgb/leds-group-virtualcolor.c:254:28: error: implicit declaration of function 'of_led_get'; did you mean 'of_node_get'? [-Werror=implicit-function-declaration]
     254 |                 led_cdev = of_led_get(child, i);
         |                            ^~~~~~~~~~
         |                            of_node_get
>> drivers/leds/rgb/leds-group-virtualcolor.c:254:26: warning: assignment to 'struct led_classdev *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
     254 |                 led_cdev = of_led_get(child, i);
         |                          ^
   cc1: some warnings being treated as errors


vim +254 drivers/leds/rgb/leds-group-virtualcolor.c

8ce5fa26ed391cb Jonathan Brophy 2025-09-16  217  
8ce5fa26ed391cb Jonathan Brophy 2025-09-16  218  static int leds_virtualcolor_init_vled(struct device *dev, struct device_node *child,
8ce5fa26ed391cb Jonathan Brophy 2025-09-16  219  				       struct virtual_led *vled, struct leds_virtualcolor *vc_data)
8ce5fa26ed391cb Jonathan Brophy 2025-09-16  220  {
8ce5fa26ed391cb Jonathan Brophy 2025-09-16  221  	struct fwnode_handle *child_fwnode = of_fwnode_handle(child);
8ce5fa26ed391cb Jonathan Brophy 2025-09-16  222  	struct led_init_data init_data = {};
8ce5fa26ed391cb Jonathan Brophy 2025-09-16  223  	u32 blink_interval;
8ce5fa26ed391cb Jonathan Brophy 2025-09-16  224  	u32 phandle_count;
8ce5fa26ed391cb Jonathan Brophy 2025-09-16  225  	u32 max_brightness;
8ce5fa26ed391cb Jonathan Brophy 2025-09-16  226  	int ret, i;
8ce5fa26ed391cb Jonathan Brophy 2025-09-16  227  
8ce5fa26ed391cb Jonathan Brophy 2025-09-16  228  	ret = of_property_read_u32(child, "priority", &vled->priority);
8ce5fa26ed391cb Jonathan Brophy 2025-09-16  229  	if (ret)
8ce5fa26ed391cb Jonathan Brophy 2025-09-16  230  		vled->priority = 0;
8ce5fa26ed391cb Jonathan Brophy 2025-09-16  231  
8ce5fa26ed391cb Jonathan Brophy 2025-09-16  232  	ret = of_property_read_u32(child, "blink", &blink_interval);
8ce5fa26ed391cb Jonathan Brophy 2025-09-16  233  	if (!ret) {
8ce5fa26ed391cb Jonathan Brophy 2025-09-16  234  		vled->blink_delay_on = blink_interval;
8ce5fa26ed391cb Jonathan Brophy 2025-09-16  235  		vled->blink_delay_off = blink_interval;
8ce5fa26ed391cb Jonathan Brophy 2025-09-16  236  	}
8ce5fa26ed391cb Jonathan Brophy 2025-09-16  237  
8ce5fa26ed391cb Jonathan Brophy 2025-09-16  238  	phandle_count = fwnode_property_count_u32(child_fwnode, "leds");
8ce5fa26ed391cb Jonathan Brophy 2025-09-16  239  	if (phandle_count <= 0) {
8ce5fa26ed391cb Jonathan Brophy 2025-09-16  240  		dev_err(dev, "No monochromatic LEDs specified for virtual LED %s\n",
8ce5fa26ed391cb Jonathan Brophy 2025-09-16  241  			vled->cdev.name);
8ce5fa26ed391cb Jonathan Brophy 2025-09-16  242  		return -EINVAL;
8ce5fa26ed391cb Jonathan Brophy 2025-09-16  243  	}
8ce5fa26ed391cb Jonathan Brophy 2025-09-16  244  
8ce5fa26ed391cb Jonathan Brophy 2025-09-16  245  	vled->num_monochromatics = phandle_count;
8ce5fa26ed391cb Jonathan Brophy 2025-09-16  246  	vled->monochromatics = devm_kcalloc(dev, vled->num_monochromatics,
8ce5fa26ed391cb Jonathan Brophy 2025-09-16  247  					    sizeof(*vled->monochromatics), GFP_KERNEL);
8ce5fa26ed391cb Jonathan Brophy 2025-09-16  248  	if (!vled->monochromatics)
8ce5fa26ed391cb Jonathan Brophy 2025-09-16  249  		return -ENOMEM;
8ce5fa26ed391cb Jonathan Brophy 2025-09-16  250  
8ce5fa26ed391cb Jonathan Brophy 2025-09-16  251  	for (i = 0; i < vled->num_monochromatics; i++) {
8ce5fa26ed391cb Jonathan Brophy 2025-09-16  252  		struct led_classdev *led_cdev;
8ce5fa26ed391cb Jonathan Brophy 2025-09-16  253  
8ce5fa26ed391cb Jonathan Brophy 2025-09-16 @254  		led_cdev = of_led_get(child, i);
8ce5fa26ed391cb Jonathan Brophy 2025-09-16  255  		if (IS_ERR_OR_NULL(led_cdev)) {
8ce5fa26ed391cb Jonathan Brophy 2025-09-16  256  			/*
8ce5fa26ed391cb Jonathan Brophy 2025-09-16  257  			 * If the LED is not available yet, defer the probe.
8ce5fa26ed391cb Jonathan Brophy 2025-09-16  258  			 * The probe will be retried when the it becomes available.
8ce5fa26ed391cb Jonathan Brophy 2025-09-16  259  			 */
8ce5fa26ed391cb Jonathan Brophy 2025-09-16  260  			if (PTR_ERR(led_cdev) == -EPROBE_DEFER || !led_cdev) {
8ce5fa26ed391cb Jonathan Brophy 2025-09-16  261  				return -EPROBE_DEFER;
8ce5fa26ed391cb Jonathan Brophy 2025-09-16  262  			} else {
8ce5fa26ed391cb Jonathan Brophy 2025-09-16  263  				ret = PTR_ERR(led_cdev);
8ce5fa26ed391cb Jonathan Brophy 2025-09-16  264  				dev_err(dev, "Failed to get monochromatic LED for %s, error %d\n",
8ce5fa26ed391cb Jonathan Brophy 2025-09-16  265  					vled->cdev.name, ret);
8ce5fa26ed391cb Jonathan Brophy 2025-09-16  266  				return ret;
8ce5fa26ed391cb Jonathan Brophy 2025-09-16  267  			}
8ce5fa26ed391cb Jonathan Brophy 2025-09-16  268  		}
8ce5fa26ed391cb Jonathan Brophy 2025-09-16  269  
8ce5fa26ed391cb Jonathan Brophy 2025-09-16  270  		vled->monochromatics[i] = led_cdev;
8ce5fa26ed391cb Jonathan Brophy 2025-09-16  271  	}
8ce5fa26ed391cb Jonathan Brophy 2025-09-16  272  
8ce5fa26ed391cb Jonathan Brophy 2025-09-16  273  	ret = of_property_read_u32(child, "max-brightness", &max_brightness);
8ce5fa26ed391cb Jonathan Brophy 2025-09-16  274  	if (ret)
8ce5fa26ed391cb Jonathan Brophy 2025-09-16  275  		vled->cdev.max_brightness = LED_FULL;
8ce5fa26ed391cb Jonathan Brophy 2025-09-16  276  	else
8ce5fa26ed391cb Jonathan Brophy 2025-09-16  277  		vled->cdev.max_brightness = max_brightness;
8ce5fa26ed391cb Jonathan Brophy 2025-09-16  278  
8ce5fa26ed391cb Jonathan Brophy 2025-09-16  279  	vled->cdev.brightness_set_blocking = virtual_led_brightness_set;
8ce5fa26ed391cb Jonathan Brophy 2025-09-16  280  	vled->cdev.max_brightness = LED_FULL;
8ce5fa26ed391cb Jonathan Brophy 2025-09-16  281  	vled->cdev.flags = LED_CORE_SUSPENDRESUME;
8ce5fa26ed391cb Jonathan Brophy 2025-09-16  282  
8ce5fa26ed391cb Jonathan Brophy 2025-09-16  283  	init_data.fwnode = child_fwnode;
8ce5fa26ed391cb Jonathan Brophy 2025-09-16  284  	ret = devm_led_classdev_register_ext(dev, &vled->cdev, &init_data);
8ce5fa26ed391cb Jonathan Brophy 2025-09-16  285  	if (ret) {
8ce5fa26ed391cb Jonathan Brophy 2025-09-16  286  		dev_err(dev, "Failed to register virtual LED %s\n", vled->cdev.name);
8ce5fa26ed391cb Jonathan Brophy 2025-09-16  287  		return ret;
8ce5fa26ed391cb Jonathan Brophy 2025-09-16  288  	}
8ce5fa26ed391cb Jonathan Brophy 2025-09-16  289  
8ce5fa26ed391cb Jonathan Brophy 2025-09-16  290  	ret = device_create_file(vled->cdev.dev, &dev_attr_priority);
8ce5fa26ed391cb Jonathan Brophy 2025-09-16  291  	if (ret) {
8ce5fa26ed391cb Jonathan Brophy 2025-09-16  292  		dev_err(dev, "Failed to create sysfs attribute for priority\n");
8ce5fa26ed391cb Jonathan Brophy 2025-09-16  293  		return ret;
8ce5fa26ed391cb Jonathan Brophy 2025-09-16  294  	}
8ce5fa26ed391cb Jonathan Brophy 2025-09-16  295  
8ce5fa26ed391cb Jonathan Brophy 2025-09-16  296  	ret = device_create_file(vled->cdev.dev, &dev_attr_blink_delay_on);
8ce5fa26ed391cb Jonathan Brophy 2025-09-16  297  	if (ret) {
8ce5fa26ed391cb Jonathan Brophy 2025-09-16  298  		dev_err(dev, "Failed to create sysfs attribute for blink_delay_on\n");
8ce5fa26ed391cb Jonathan Brophy 2025-09-16  299  		return ret;
8ce5fa26ed391cb Jonathan Brophy 2025-09-16  300  	}
8ce5fa26ed391cb Jonathan Brophy 2025-09-16  301  
8ce5fa26ed391cb Jonathan Brophy 2025-09-16  302  	ret = device_create_file(vled->cdev.dev, &dev_attr_blink_delay_off);
8ce5fa26ed391cb Jonathan Brophy 2025-09-16  303  	if (ret) {
8ce5fa26ed391cb Jonathan Brophy 2025-09-16  304  		dev_err(dev, "Failed to create sysfs attribute for blink_delay_off\n");
8ce5fa26ed391cb Jonathan Brophy 2025-09-16  305  		return ret;
8ce5fa26ed391cb Jonathan Brophy 2025-09-16  306  	}
8ce5fa26ed391cb Jonathan Brophy 2025-09-16  307  
8ce5fa26ed391cb Jonathan Brophy 2025-09-16  308  	vled->vc_data = vc_data;
8ce5fa26ed391cb Jonathan Brophy 2025-09-16  309  
8ce5fa26ed391cb Jonathan Brophy 2025-09-16  310  	return 0;
8ce5fa26ed391cb Jonathan Brophy 2025-09-16  311  }
8ce5fa26ed391cb Jonathan Brophy 2025-09-16  312  

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ