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: <202209262216.P1lCxZ2J-lkp@intel.com>
Date:   Mon, 26 Sep 2022 23:26:36 +0800
From:   kernel test robot <lkp@...el.com>
To:     Jiri Pirko <jiri@...dia.com>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org
Subject: [jpirko-mlxsw:jiri_devel_devlink_locking 22/35]
 drivers/net/ethernet/mscc/ocelot_vsc7514.c:382:38: warning: variable 'dlp'
 set but not used

tree:   https://github.com/jpirko/linux_mlxsw jiri_devel_devlink_locking
head:   b95a23dee00b6159c76aed1d843d2b7dd6177ffa
commit: b4ff3030f4c5c475e1dd8f9f23e24bf856b80df6 [22/35] net: make drivers to use SET_NETDEV_DEVLINK_PORT to set devlink_port
config: ia64-allyesconfig
compiler: ia64-linux-gcc (GCC) 12.1.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://github.com/jpirko/linux_mlxsw/commit/b4ff3030f4c5c475e1dd8f9f23e24bf856b80df6
        git remote add jpirko-mlxsw https://github.com/jpirko/linux_mlxsw
        git fetch --no-tags jpirko-mlxsw jiri_devel_devlink_locking
        git checkout b4ff3030f4c5c475e1dd8f9f23e24bf856b80df6
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=ia64 SHELL=/bin/bash drivers/net/ethernet/mscc/

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@...el.com>

All warnings (new ones prefixed by >>):

   drivers/net/ethernet/mscc/ocelot_vsc7514.c: In function 'mscc_ocelot_init_ports':
>> drivers/net/ethernet/mscc/ocelot_vsc7514.c:382:38: warning: variable 'dlp' set but not used [-Wunused-but-set-variable]
     382 |                 struct devlink_port *dlp;
         |                                      ^~~
>> drivers/net/ethernet/mscc/ocelot_vsc7514.c:380:45: warning: variable 'priv' set but not used [-Wunused-but-set-variable]
     380 |                 struct ocelot_port_private *priv;
         |                                             ^~~~
   {standard input}: Assembler messages:
   {standard input}:314: Error: Register number out of range 0..2
   {standard input}:316: Error: Register number out of range 0..2
   {standard input}:316: Warning: Use of 'mov' violates WAW dependency 'GR%, % in 1 - 127' (impliedf), specific resource number is 39
   {standard input}:316: Warning: Only the first path encountering the conflict is reported
   {standard input}:314: Warning: This is the location of the conflicting usage
   {standard input}:317: Error: Register number out of range 0..2
   {standard input}:317: Warning: Use of 'mov' violates WAW dependency 'GR%, % in 1 - 127' (impliedf), specific resource number is 39
   {standard input}:317: Warning: Only the first path encountering the conflict is reported
   {standard input}:314: Warning: This is the location of the conflicting usage
   {standard input}:317: Warning: Use of 'mov' violates WAW dependency 'GR%, % in 1 - 127' (impliedf), specific resource number is 39
   {standard input}:317: Warning: Only the first path encountering the conflict is reported
   {standard input}:316: Warning: This is the location of the conflicting usage
   {standard input}:318: Error: Register number out of range 0..2
   {standard input}:318: Warning: Use of 'mov' violates WAW dependency 'GR%, % in 1 - 127' (impliedf), specific resource number is 39
   {standard input}:318: Warning: Only the first path encountering the conflict is reported
   {standard input}:314: Warning: This is the location of the conflicting usage
   {standard input}:318: Warning: Use of 'mov' violates WAW dependency 'GR%, % in 1 - 127' (impliedf), specific resource number is 39
   {standard input}:318: Warning: Only the first path encountering the conflict is reported
   {standard input}:316: Warning: This is the location of the conflicting usage
   {standard input}:318: Warning: Use of 'mov' violates WAW dependency 'GR%, % in 1 - 127' (impliedf), specific resource number is 39
   {standard input}:318: Warning: Only the first path encountering the conflict is reported
   {standard input}:317: Warning: This is the location of the conflicting usage
   {standard input}:322: Error: Register number out of range 0..2
   {standard input}:704: Error: Register number out of range 0..5
   {standard input}:708: Error: Register number out of range 0..5
   {standard input}:924: Error: Register number out of range 0..1
   {standard input}:925: Error: Register number out of range 0..1
   {standard input}:925: Warning: Use of 'mov' violates WAW dependency 'GR%, % in 1 - 127' (impliedf), specific resource number is 42
   {standard input}:924: Warning: This is the location of the conflicting usage
   {standard input}:927: Error: Register number out of range 0..1
   {standard input}:927: Warning: Use of 'mov' violates WAW dependency 'GR%, % in 1 - 127' (impliedf), specific resource number is 42
   {standard input}:924: Warning: This is the location of the conflicting usage
   {standard input}:927: Warning: Use of 'mov' violates WAW dependency 'GR%, % in 1 - 127' (impliedf), specific resource number is 42
   {standard input}:925: Warning: This is the location of the conflicting usage
   {standard input}:928: Error: Register number out of range 0..1
   {standard input}:928: Warning: Use of 'mov' violates WAW dependency 'GR%, % in 1 - 127' (impliedf), specific resource number is 42
   {standard input}:924: Warning: This is the location of the conflicting usage
   {standard input}:928: Warning: Use of 'mov' violates WAW dependency 'GR%, % in 1 - 127' (impliedf), specific resource number is 42
   {standard input}:925: Warning: This is the location of the conflicting usage
   {standard input}:928: Warning: Use of 'mov' violates WAW dependency 'GR%, % in 1 - 127' (impliedf), specific resource number is 42
   {standard input}:927: Warning: This is the location of the conflicting usage
   {standard input}:929: Error: Register number out of range 0..1
   {standard input}:929: Warning: Use of 'mov' violates WAW dependency 'GR%, % in 1 - 127' (impliedf), specific resource number is 42
   {standard input}:924: Warning: This is the location of the conflicting usage
   {standard input}:929: Warning: Use of 'mov' violates WAW dependency 'GR%, % in 1 - 127' (impliedf), specific resource number is 42
   {standard input}:925: Warning: This is the location of the conflicting usage
   {standard input}:929: Warning: Use of 'mov' violates WAW dependency 'GR%, % in 1 - 127' (impliedf), specific resource number is 42
   {standard input}:927: Warning: This is the location of the conflicting usage
   {standard input}:929: Warning: Use of 'mov' violates WAW dependency 'GR%, % in 1 - 127' (impliedf), specific resource number is 42
   {standard input}:928: Warning: This is the location of the conflicting usage
   {standard input}:933: Error: Register number out of range 0..1
   {standard input}:1427: Error: Register number out of range 0..4
   {standard input}:1428: Error: Register number out of range 0..4
   {standard input}:1428: Warning: Use of 'mov' violates WAW dependency 'GR%, % in 1 - 127' (impliedf), specific resource number is 49
   {standard input}:1428: Warning: Only the first path encountering the conflict is reported
   {standard input}:1427: Warning: This is the location of the conflicting usage
   {standard input}:1432: Error: Register number out of range 0..4
   {standard input}:2469: Error: Register number out of range 0..6


vim +/dlp +382 drivers/net/ethernet/mscc/ocelot_vsc7514.c

22cdb493de54ca Vladimir Oltean 2020-09-18  357  
7c411799e1b3e0 Vladimir Oltean 2020-09-18  358  static int mscc_ocelot_init_ports(struct platform_device *pdev,
7c411799e1b3e0 Vladimir Oltean 2020-09-18  359  				  struct device_node *ports)
7c411799e1b3e0 Vladimir Oltean 2020-09-18  360  {
7c411799e1b3e0 Vladimir Oltean 2020-09-18  361  	struct ocelot *ocelot = platform_get_drvdata(pdev);
e0c16233577fb8 Dan Carpenter   2021-02-02  362  	u32 devlink_ports_registered = 0;
7c411799e1b3e0 Vladimir Oltean 2020-09-18  363  	struct device_node *portnp;
6c30384eb1dec9 Vladimir Oltean 2021-01-15  364  	int port, err;
6c30384eb1dec9 Vladimir Oltean 2021-01-15  365  	u32 reg;
7c411799e1b3e0 Vladimir Oltean 2020-09-18  366  
7c411799e1b3e0 Vladimir Oltean 2020-09-18  367  	ocelot->ports = devm_kcalloc(ocelot->dev, ocelot->num_phys_ports,
7c411799e1b3e0 Vladimir Oltean 2020-09-18  368  				     sizeof(struct ocelot_port *), GFP_KERNEL);
7c411799e1b3e0 Vladimir Oltean 2020-09-18  369  	if (!ocelot->ports)
7c411799e1b3e0 Vladimir Oltean 2020-09-18  370  		return -ENOMEM;
7c411799e1b3e0 Vladimir Oltean 2020-09-18  371  
6c30384eb1dec9 Vladimir Oltean 2021-01-15  372  	ocelot->devlink_ports = devm_kcalloc(ocelot->dev,
6c30384eb1dec9 Vladimir Oltean 2021-01-15  373  					     ocelot->num_phys_ports,
6c30384eb1dec9 Vladimir Oltean 2021-01-15  374  					     sizeof(*ocelot->devlink_ports),
6c30384eb1dec9 Vladimir Oltean 2021-01-15  375  					     GFP_KERNEL);
6c30384eb1dec9 Vladimir Oltean 2021-01-15  376  	if (!ocelot->devlink_ports)
6c30384eb1dec9 Vladimir Oltean 2021-01-15  377  		return -ENOMEM;
6c30384eb1dec9 Vladimir Oltean 2021-01-15  378  
7c411799e1b3e0 Vladimir Oltean 2020-09-18  379  	for_each_available_child_of_node(ports, portnp) {
7c411799e1b3e0 Vladimir Oltean 2020-09-18 @380  		struct ocelot_port_private *priv;
7c411799e1b3e0 Vladimir Oltean 2020-09-18  381  		struct ocelot_port *ocelot_port;
6c30384eb1dec9 Vladimir Oltean 2021-01-15 @382  		struct devlink_port *dlp;
7c411799e1b3e0 Vladimir Oltean 2020-09-18  383  		struct regmap *target;
7c411799e1b3e0 Vladimir Oltean 2020-09-18  384  		struct resource *res;
7c411799e1b3e0 Vladimir Oltean 2020-09-18  385  		char res_name[8];
7c411799e1b3e0 Vladimir Oltean 2020-09-18  386  
6c30384eb1dec9 Vladimir Oltean 2021-01-15  387  		if (of_property_read_u32(portnp, "reg", &reg))
7c411799e1b3e0 Vladimir Oltean 2020-09-18  388  			continue;
7c411799e1b3e0 Vladimir Oltean 2020-09-18  389  
6c30384eb1dec9 Vladimir Oltean 2021-01-15  390  		port = reg;
e0c16233577fb8 Dan Carpenter   2021-02-02  391  		if (port < 0 || port >= ocelot->num_phys_ports) {
e0c16233577fb8 Dan Carpenter   2021-02-02  392  			dev_err(ocelot->dev,
e0c16233577fb8 Dan Carpenter   2021-02-02  393  				"invalid port number: %d >= %d\n", port,
e0c16233577fb8 Dan Carpenter   2021-02-02  394  				ocelot->num_phys_ports);
e0c16233577fb8 Dan Carpenter   2021-02-02  395  			continue;
e0c16233577fb8 Dan Carpenter   2021-02-02  396  		}
6c30384eb1dec9 Vladimir Oltean 2021-01-15  397  
7c411799e1b3e0 Vladimir Oltean 2020-09-18  398  		snprintf(res_name, sizeof(res_name), "port%d", port);
7c411799e1b3e0 Vladimir Oltean 2020-09-18  399  
7c411799e1b3e0 Vladimir Oltean 2020-09-18  400  		res = platform_get_resource_byname(pdev, IORESOURCE_MEM,
7c411799e1b3e0 Vladimir Oltean 2020-09-18  401  						   res_name);
7c411799e1b3e0 Vladimir Oltean 2020-09-18  402  		target = ocelot_regmap_init(ocelot, res);
e0c16233577fb8 Dan Carpenter   2021-02-02  403  		if (IS_ERR(target)) {
e0c16233577fb8 Dan Carpenter   2021-02-02  404  			err = PTR_ERR(target);
d1a7b9e4696584 Wan Jiabing     2021-10-17  405  			of_node_put(portnp);
e0c16233577fb8 Dan Carpenter   2021-02-02  406  			goto out_teardown;
e0c16233577fb8 Dan Carpenter   2021-02-02  407  		}
7c411799e1b3e0 Vladimir Oltean 2020-09-18  408  
6c30384eb1dec9 Vladimir Oltean 2021-01-15  409  		err = ocelot_port_devlink_init(ocelot, port,
6c30384eb1dec9 Vladimir Oltean 2021-01-15  410  					       DEVLINK_PORT_FLAVOUR_PHYSICAL);
6c30384eb1dec9 Vladimir Oltean 2021-01-15  411  		if (err) {
6c30384eb1dec9 Vladimir Oltean 2021-01-15  412  			of_node_put(portnp);
6c30384eb1dec9 Vladimir Oltean 2021-01-15  413  			goto out_teardown;
6c30384eb1dec9 Vladimir Oltean 2021-01-15  414  		}
6c30384eb1dec9 Vladimir Oltean 2021-01-15  415  
e6e12df625f23e Vladimir Oltean 2021-08-15  416  		err = ocelot_probe_port(ocelot, port, target, portnp);
7c411799e1b3e0 Vladimir Oltean 2020-09-18  417  		if (err) {
5c8bb71dbdf816 Vladimir Oltean 2021-08-19  418  			ocelot_port_devlink_teardown(ocelot, port);
5c8bb71dbdf816 Vladimir Oltean 2021-08-19  419  			continue;
7c411799e1b3e0 Vladimir Oltean 2020-09-18  420  		}
7c411799e1b3e0 Vladimir Oltean 2020-09-18  421  
5c8bb71dbdf816 Vladimir Oltean 2021-08-19  422  		devlink_ports_registered |= BIT(port);
5c8bb71dbdf816 Vladimir Oltean 2021-08-19  423  
7c411799e1b3e0 Vladimir Oltean 2020-09-18  424  		ocelot_port = ocelot->ports[port];
7c411799e1b3e0 Vladimir Oltean 2020-09-18  425  		priv = container_of(ocelot_port, struct ocelot_port_private,
7c411799e1b3e0 Vladimir Oltean 2020-09-18  426  				    port);
6c30384eb1dec9 Vladimir Oltean 2021-01-15  427  		dlp = &ocelot->devlink_ports[port];
7c411799e1b3e0 Vladimir Oltean 2020-09-18  428  	}
7c411799e1b3e0 Vladimir Oltean 2020-09-18  429  
6c30384eb1dec9 Vladimir Oltean 2021-01-15  430  	/* Initialize unused devlink ports at the end */
6c30384eb1dec9 Vladimir Oltean 2021-01-15  431  	for (port = 0; port < ocelot->num_phys_ports; port++) {
e0c16233577fb8 Dan Carpenter   2021-02-02  432  		if (devlink_ports_registered & BIT(port))
6c30384eb1dec9 Vladimir Oltean 2021-01-15  433  			continue;
6c30384eb1dec9 Vladimir Oltean 2021-01-15  434  
6c30384eb1dec9 Vladimir Oltean 2021-01-15  435  		err = ocelot_port_devlink_init(ocelot, port,
6c30384eb1dec9 Vladimir Oltean 2021-01-15  436  					       DEVLINK_PORT_FLAVOUR_UNUSED);
e0c16233577fb8 Dan Carpenter   2021-02-02  437  		if (err)
6c30384eb1dec9 Vladimir Oltean 2021-01-15  438  			goto out_teardown;
6c30384eb1dec9 Vladimir Oltean 2021-01-15  439  
e0c16233577fb8 Dan Carpenter   2021-02-02  440  		devlink_ports_registered |= BIT(port);
e0c16233577fb8 Dan Carpenter   2021-02-02  441  	}
6c30384eb1dec9 Vladimir Oltean 2021-01-15  442  
7c411799e1b3e0 Vladimir Oltean 2020-09-18  443  	return 0;
6c30384eb1dec9 Vladimir Oltean 2021-01-15  444  
6c30384eb1dec9 Vladimir Oltean 2021-01-15  445  out_teardown:
6c30384eb1dec9 Vladimir Oltean 2021-01-15  446  	/* Unregister the network interfaces */
6c30384eb1dec9 Vladimir Oltean 2021-01-15  447  	mscc_ocelot_release_ports(ocelot);
6c30384eb1dec9 Vladimir Oltean 2021-01-15  448  	/* Tear down devlink ports for the registered network interfaces */
6c30384eb1dec9 Vladimir Oltean 2021-01-15  449  	for (port = 0; port < ocelot->num_phys_ports; port++) {
e0c16233577fb8 Dan Carpenter   2021-02-02  450  		if (devlink_ports_registered & BIT(port))
6c30384eb1dec9 Vladimir Oltean 2021-01-15  451  			ocelot_port_devlink_teardown(ocelot, port);
6c30384eb1dec9 Vladimir Oltean 2021-01-15  452  	}
6c30384eb1dec9 Vladimir Oltean 2021-01-15  453  	return err;
7c411799e1b3e0 Vladimir Oltean 2020-09-18  454  }
7c411799e1b3e0 Vladimir Oltean 2020-09-18  455  

:::::: The code at line 382 was first introduced by commit
:::::: 6c30384eb1dec96b678ff9c01c15134b1a0e81f4 net: mscc: ocelot: register devlink ports

:::::: TO: Vladimir Oltean <vladimir.oltean@....com>
:::::: CC: Jakub Kicinski <kuba@...nel.org>

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

View attachment "config" of type "text/plain" (318604 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ