public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Jonathan Brophy <professorjonny98@gmail.com>,
	lee Jones <lee@kernel.org>, Pavel Machek <pavel@kernel.org>,
	Jonathan Brophy <professor_jonny@hotmail.com>,
	Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Radoslav Tsvetkov <rtsvetkov@gradotech.eu>
Cc: oe-kbuild-all@lists.linux.dev, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-leds@vger.kernel.org
Subject: Re: [PATCH 2/5] leds: rgb: Add Virtual Color LED Group driver to Make
Date: Wed, 17 Sep 2025 11:37:08 +0800	[thread overview]
Message-ID: <202509171109.7rJrwT7i-lkp@intel.com> (raw)
In-Reply-To: <20250916110217.45894-2-professorjonny98@gmail.com>

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

  parent reply	other threads:[~2025-09-17  3:37 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-16 11:02 [PATCH 1/5] leds: Add Virtual Color LED Group driver Jonathan Brophy
2025-09-16 11:02 ` [PATCH 2/5] leds: rgb: Add Virtual Color LED Group driver to Make Jonathan Brophy
2025-09-16 12:28   ` Lee Jones
2025-09-17  3:37   ` kernel test robot [this message]
2025-09-17  5:04   ` kernel test robot
2025-09-16 11:02 ` [PATCH 3/5] dt-bindings: leds: Add YAML bindings for Virtual Color LED Group driver Jonathan Brophy
2025-09-16 13:25   ` Rob Herring (Arm)
2025-09-22 16:45   ` Rob Herring
2025-09-22 23:38     ` Jonathan Brophy
2025-09-16 11:02 ` [PATCH 4/5] ABI: sysfs-class-leds-virtualcolor: Document sysfs entries for Virtual Color LEDs Jonathan Brophy
2025-09-16 11:02 ` [PATCH 5/5] dt-bindings: led: add virtual LED bindings Jonathan Brophy

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=202509171109.7rJrwT7i-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=krzk@kernel.org \
    --cc=lee@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-leds@vger.kernel.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=pavel@kernel.org \
    --cc=professor_jonny@hotmail.com \
    --cc=professorjonny98@gmail.com \
    --cc=robh@kernel.org \
    --cc=rtsvetkov@gradotech.eu \
    /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