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>] [day] [month] [year] [list]
Message-ID: <202306011219.NQCSpIEG-lkp@intel.com>
Date: Thu, 1 Jun 2023 12:11:36 +0800
From: kernel test robot <lkp@...el.com>
To: Christian Marangi <ansuelsmth@...il.com>
Cc: llvm@...ts.linux.dev, oe-kbuild-all@...ts.linux.dev,
	netdev@...r.kernel.org, Andrew Lunn <andrew@...n.ch>
Subject: [net-next:main 12/26] drivers/net/dsa/qca/qca8k-leds.c:377:18:
 error: no member named 'hw_control_is_supported' in 'struct led_classdev'

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git main
head:   60cbd38bb0ad9e4395fba9c6994f258f1d6cad51
commit: e0256648c831af13cbfe4a1787327fcec01c2807 [12/26] net: dsa: qca8k: implement hw_control ops
config: mips-randconfig-r003-20230531 (https://download.01.org/0day-ci/archive/20230601/202306011219.NQCSpIEG-lkp@intel.com/config)
compiler: clang version 17.0.0 (https://github.com/llvm/llvm-project 4faf3aaf28226a4e950c103a14f6fc1d1fdabb1b)
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
        # install mips cross compiling tool for clang build
        # apt-get install binutils-mipsel-linux-gnu
        # https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git/commit/?id=e0256648c831af13cbfe4a1787327fcec01c2807
        git remote add net-next https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git
        git fetch --no-tags net-next main
        git checkout e0256648c831af13cbfe4a1787327fcec01c2807
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang ~/bin/make.cross W=1 O=build_dir ARCH=mips olddefconfig
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang ~/bin/make.cross W=1 O=build_dir ARCH=mips SHELL=/bin/bash drivers/net/dsa/qca/

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

All errors (new ones prefixed by >>):

>> drivers/net/dsa/qca/qca8k-leds.c:377:18: error: no member named 'hw_control_is_supported' in 'struct led_classdev'
                   port_led->cdev.hw_control_is_supported = qca8k_cled_hw_control_is_supported;
                   ~~~~~~~~~~~~~~ ^
>> drivers/net/dsa/qca/qca8k-leds.c:378:18: error: no member named 'hw_control_set' in 'struct led_classdev'
                   port_led->cdev.hw_control_set = qca8k_cled_hw_control_set;
                   ~~~~~~~~~~~~~~ ^
>> drivers/net/dsa/qca/qca8k-leds.c:379:18: error: no member named 'hw_control_get' in 'struct led_classdev'
                   port_led->cdev.hw_control_get = qca8k_cled_hw_control_get;
                   ~~~~~~~~~~~~~~ ^
>> drivers/net/dsa/qca/qca8k-leds.c:380:18: error: no member named 'hw_control_trigger' in 'struct led_classdev'
                   port_led->cdev.hw_control_trigger = "netdev";
                   ~~~~~~~~~~~~~~ ^
   4 errors generated.


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

   316	
   317	static int
   318	qca8k_parse_port_leds(struct qca8k_priv *priv, struct fwnode_handle *port, int port_num)
   319	{
   320		struct fwnode_handle *led = NULL, *leds = NULL;
   321		struct led_init_data init_data = { };
   322		struct dsa_switch *ds = priv->ds;
   323		enum led_default_state state;
   324		struct qca8k_led *port_led;
   325		int led_num, led_index;
   326		int ret;
   327	
   328		leds = fwnode_get_named_child_node(port, "leds");
   329		if (!leds) {
   330			dev_dbg(priv->dev, "No Leds node specified in device tree for port %d!\n",
   331				port_num);
   332			return 0;
   333		}
   334	
   335		fwnode_for_each_child_node(leds, led) {
   336			/* Reg represent the led number of the port.
   337			 * Each port can have at most 3 leds attached
   338			 * Commonly:
   339			 * 1. is gigabit led
   340			 * 2. is mbit led
   341			 * 3. additional status led
   342			 */
   343			if (fwnode_property_read_u32(led, "reg", &led_num))
   344				continue;
   345	
   346			if (led_num >= QCA8K_LED_PORT_COUNT) {
   347				dev_warn(priv->dev, "Invalid LED reg %d defined for port %d",
   348					 led_num, port_num);
   349				continue;
   350			}
   351	
   352			led_index = QCA8K_LED_PORT_INDEX(port_num, led_num);
   353	
   354			port_led = &priv->ports_led[led_index];
   355			port_led->port_num = port_num;
   356			port_led->led_num = led_num;
   357			port_led->priv = priv;
   358	
   359			state = led_init_default_state_get(led);
   360			switch (state) {
   361			case LEDS_DEFSTATE_ON:
   362				port_led->cdev.brightness = 1;
   363				qca8k_led_brightness_set(port_led, 1);
   364				break;
   365			case LEDS_DEFSTATE_KEEP:
   366				port_led->cdev.brightness =
   367						qca8k_led_brightness_get(port_led);
   368				break;
   369			default:
   370				port_led->cdev.brightness = 0;
   371				qca8k_led_brightness_set(port_led, 0);
   372			}
   373	
   374			port_led->cdev.max_brightness = 1;
   375			port_led->cdev.brightness_set_blocking = qca8k_cled_brightness_set_blocking;
   376			port_led->cdev.blink_set = qca8k_cled_blink_set;
 > 377			port_led->cdev.hw_control_is_supported = qca8k_cled_hw_control_is_supported;
 > 378			port_led->cdev.hw_control_set = qca8k_cled_hw_control_set;
 > 379			port_led->cdev.hw_control_get = qca8k_cled_hw_control_get;
 > 380			port_led->cdev.hw_control_trigger = "netdev";
   381			init_data.default_label = ":port";
   382			init_data.fwnode = led;
   383			init_data.devname_mandatory = true;
   384			init_data.devicename = kasprintf(GFP_KERNEL, "%s:0%d", ds->slave_mii_bus->id,
   385							 port_num);
   386			if (!init_data.devicename)
   387				return -ENOMEM;
   388	
   389			ret = devm_led_classdev_register_ext(priv->dev, &port_led->cdev, &init_data);
   390			if (ret)
   391				dev_warn(priv->dev, "Failed to init LED %d for port %d", led_num, port_num);
   392	
   393			kfree(init_data.devicename);
   394		}
   395	
   396		return 0;
   397	}
   398	

-- 
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