[linux-next:master 6070/6538] drivers/net/dsa/qca/qca8k-leds.c:406:31: error: 'struct led_classdev' has no member named 'hw_control_get_device'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   571d71e886a5edc89b4ea6d0fe6f445282938320
commit: 4f53c27f772e27e4cf4e5507d6f4d5980002cb6a [6070/6538] net: dsa: qca8k: add op to get ports netdev
config: arm64-randconfig-r001-20230531 (https://download.01.org/0day-ci/archive/20230601/202306011915.bWdy8AJ8-lkp@xxxxxxxxx/config)
compiler: aarch64-linux-gcc (GCC) 12.3.0
reproduce (this is a W=1 build):
        mkdir -p ~/bin
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=4f53c27f772e27e4cf4e5507d6f4d5980002cb6a
        git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
        git fetch --no-tags linux-next master
        git checkout 4f53c27f772e27e4cf4e5507d6f4d5980002cb6a
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.3.0 ~/bin/make.cross W=1 O=build_dir ARCH=arm64 olddefconfig
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.3.0 ~/bin/make.cross W=1 O=build_dir ARCH=arm64 SHELL=/bin/bash drivers/net/dsa/qca/

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202306011915.bWdy8AJ8-lkp@xxxxxxxxx/

All errors (new ones prefixed by >>):

   drivers/net/dsa/qca/qca8k-leds.c: In function 'qca8k_parse_port_leds':
   drivers/net/dsa/qca/qca8k-leds.c:403:31: error: 'struct led_classdev' has no member named 'hw_control_is_supported'
     403 |                 port_led->cdev.hw_control_is_supported = qca8k_cled_hw_control_is_supported;
         |                               ^
   drivers/net/dsa/qca/qca8k-leds.c:404:31: error: 'struct led_classdev' has no member named 'hw_control_set'
     404 |                 port_led->cdev.hw_control_set = qca8k_cled_hw_control_set;
         |                               ^
   drivers/net/dsa/qca/qca8k-leds.c:405:31: error: 'struct led_classdev' has no member named 'hw_control_get'
     405 |                 port_led->cdev.hw_control_get = qca8k_cled_hw_control_get;
         |                               ^
>> drivers/net/dsa/qca/qca8k-leds.c:406:31: error: 'struct led_classdev' has no member named 'hw_control_get_device'
     406 |                 port_led->cdev.hw_control_get_device = qca8k_cled_hw_control_get_device;
         |                               ^
   drivers/net/dsa/qca/qca8k-leds.c:407:31: error: 'struct led_classdev' has no member named 'hw_control_trigger'
     407 |                 port_led->cdev.hw_control_trigger = "netdev";
         |                               ^


vim +406 drivers/net/dsa/qca/qca8k-leds.c

   342	
   343	static int
   344	qca8k_parse_port_leds(struct qca8k_priv *priv, struct fwnode_handle *port, int port_num)
   345	{
   346		struct fwnode_handle *led = NULL, *leds = NULL;
   347		struct led_init_data init_data = { };
   348		struct dsa_switch *ds = priv->ds;
   349		enum led_default_state state;
   350		struct qca8k_led *port_led;
   351		int led_num, led_index;
   352		int ret;
   353	
   354		leds = fwnode_get_named_child_node(port, "leds");
   355		if (!leds) {
   356			dev_dbg(priv->dev, "No Leds node specified in device tree for port %d!\n",
   357				port_num);
   358			return 0;
   359		}
   360	
   361		fwnode_for_each_child_node(leds, led) {
   362			/* Reg represent the led number of the port.
   363			 * Each port can have at most 3 leds attached
   364			 * Commonly:
   365			 * 1. is gigabit led
   366			 * 2. is mbit led
   367			 * 3. additional status led
   368			 */
   369			if (fwnode_property_read_u32(led, "reg", &led_num))
   370				continue;
   371	
   372			if (led_num >= QCA8K_LED_PORT_COUNT) {
   373				dev_warn(priv->dev, "Invalid LED reg %d defined for port %d",
   374					 led_num, port_num);
   375				continue;
   376			}
   377	
   378			led_index = QCA8K_LED_PORT_INDEX(port_num, led_num);
   379	
   380			port_led = &priv->ports_led[led_index];
   381			port_led->port_num = port_num;
   382			port_led->led_num = led_num;
   383			port_led->priv = priv;
   384	
   385			state = led_init_default_state_get(led);
   386			switch (state) {
   387			case LEDS_DEFSTATE_ON:
   388				port_led->cdev.brightness = 1;
   389				qca8k_led_brightness_set(port_led, 1);
   390				break;
   391			case LEDS_DEFSTATE_KEEP:
   392				port_led->cdev.brightness =
   393						qca8k_led_brightness_get(port_led);
   394				break;
   395			default:
   396				port_led->cdev.brightness = 0;
   397				qca8k_led_brightness_set(port_led, 0);
   398			}
   399	
   400			port_led->cdev.max_brightness = 1;
   401			port_led->cdev.brightness_set_blocking = qca8k_cled_brightness_set_blocking;
   402			port_led->cdev.blink_set = qca8k_cled_blink_set;
   403			port_led->cdev.hw_control_is_supported = qca8k_cled_hw_control_is_supported;
   404			port_led->cdev.hw_control_set = qca8k_cled_hw_control_set;
   405			port_led->cdev.hw_control_get = qca8k_cled_hw_control_get;
 > 406			port_led->cdev.hw_control_get_device = qca8k_cled_hw_control_get_device;
   407			port_led->cdev.hw_control_trigger = "netdev";
   408			init_data.default_label = ":port";
   409			init_data.fwnode = led;
   410			init_data.devname_mandatory = true;
   411			init_data.devicename = kasprintf(GFP_KERNEL, "%s:0%d", ds->slave_mii_bus->id,
   412							 port_num);
   413			if (!init_data.devicename)
   414				return -ENOMEM;
   415	
   416			ret = devm_led_classdev_register_ext(priv->dev, &port_led->cdev, &init_data);
   417			if (ret)
   418				dev_warn(priv->dev, "Failed to init LED %d for port %d", led_num, port_num);
   419	
   420			kfree(init_data.devicename);
   421		}
   422	
   423		return 0;
   424	}
   425	

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




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux