All of lore.kernel.org
 help / color / mirror / Atom feed
* [lunn:v6.7-rc2-net-next-mv88e6xxx-leds-v2 2/7] net/switchdev/port_leds.c:129:6: error: 'struct led_classdev' has no member named 'hw_control_get_device'
@ 2023-12-05 12:29 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2023-12-05 12:29 UTC (permalink / raw)
  To: Andrew Lunn; +Cc: oe-kbuild-all

tree:   https://github.com/lunn/linux.git v6.7-rc2-net-next-mv88e6xxx-leds-v2
head:   f53b44745216770b0b090aa7a1def08f267575ac
commit: 2d3288f4a81b362c674699749ec6f017910d4a49 [2/7] net: switchdev: Add helpers for port LEDs.
config: i386-randconfig-002-20231205 (https://download.01.org/0day-ci/archive/20231205/202312052049.ZFJTo5Lm-lkp@intel.com/config)
compiler: gcc-7 (Ubuntu 7.5.0-6ubuntu2) 7.5.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231205/202312052049.ZFJTo5Lm-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/202312052049.ZFJTo5Lm-lkp@intel.com/

All errors (new ones prefixed by >>):

   net/switchdev/port_leds.c: In function 'port_led_setup':
>> net/switchdev/port_leds.c:129:6: error: 'struct led_classdev' has no member named 'hw_control_get_device'
     cdev->hw_control_get_device = port_hw_control_get_device;
         ^~


vim +129 net/switchdev/port_leds.c

    86	
    87	static int port_led_setup(struct device_node *led, struct device *dev,
    88				  struct list_head *list, void *priv, int port,
    89				  struct port_leds_ops *ops)
    90	{
    91		struct led_init_data init_data = {};
    92		struct led_classdev *cdev;
    93		struct port_led *port_led;
    94		u32 index;
    95		int err;
    96	
    97		port_led = devm_kzalloc(dev, sizeof(*port_led), GFP_KERNEL);
    98		if (!port_led)
    99			return -ENOMEM;
   100	
   101		port_led->dev = dev;
   102		port_led->priv = priv;
   103		port_led->port = port;
   104		port_led->ops = ops;
   105		cdev = &port_led->led_cdev;
   106	
   107		err = of_property_read_u32(led, "reg", &index);
   108		if (err)
   109			return err;
   110	
   111		if (index > 255)
   112			return -EINVAL;
   113	
   114		port_led->index = index;
   115	
   116		if (ops->brightness_set)
   117			cdev->brightness_set_blocking = port_brightness_set;
   118		if (ops->blink_set)
   119			cdev->blink_set = port_blink_set;
   120	#ifdef CONFIG_LEDS_TRIGGERS
   121		if (ops->hw_control_is_supported)
   122			cdev->hw_control_is_supported = port_hw_control_is_supported;
   123		if (ops->hw_control_set)
   124			cdev->hw_control_set = port_hw_control_set;
   125		if (ops->hw_control_get)
   126			cdev->hw_control_get = port_hw_control_get;
   127		cdev->hw_control_trigger = "netdev";
   128	#endif
 > 129		cdev->hw_control_get_device = port_hw_control_get_device;
   130		cdev->max_brightness = 1;
   131		init_data.fwnode = of_fwnode_handle(led);
   132		init_data.devname_mandatory = true;
   133	
   134		init_data.devicename = dev_name(dev);
   135		err = devm_led_classdev_register_ext(dev, cdev, &init_data);
   136		if (err)
   137			return err;
   138	
   139		INIT_LIST_HEAD(&port_led->led_list);
   140		list_add(&port_led->led_list, list);
   141	
   142		return 0;
   143	}
   144	

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-12-05 12:29 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-05 12:29 [lunn:v6.7-rc2-net-next-mv88e6xxx-leds-v2 2/7] net/switchdev/port_leds.c:129:6: error: 'struct led_classdev' has no member named 'hw_control_get_device' kernel test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.