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>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202308260616.Sf8QzI7c-lkp@intel.com>
Date: Sat, 26 Aug 2023 06:21:58 +0800
From: kernel test robot <lkp@...el.com>
To: Pawel Chmielewski <pawel.chmielewski@...el.com>,
	intel-wired-lan@...osl.org
Cc: oe-kbuild-all@...ts.linux.dev, netdev@...r.kernel.org,
	aelior@...vell.com, manishc@...vell.com, andrew@...n.ch
Subject: Re: [Intel-wired-lan] [PATCH iwl-next v3 2/8] ethtool: Add forced
 speed to supported link modes maps

Hi Pawel,

kernel test robot noticed the following build errors:

[auto build test ERROR on tnguy-next-queue/dev-queue]

url:    https://github.com/intel-lab-lkp/linux/commits/Pawel-Chmielewski/ice-Add-E830-device-IDs-MAC-type-and-registers/20230824-021235
base:   https://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue.git dev-queue
patch link:    https://lore.kernel.org/r/20230823180633.2450617-3-pawel.chmielewski%40intel.com
patch subject: [Intel-wired-lan] [PATCH iwl-next v3 2/8] ethtool: Add forced speed to supported link modes maps
config: x86_64-allyesconfig (https://download.01.org/0day-ci/archive/20230826/202308260616.Sf8QzI7c-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce: (https://download.01.org/0day-ci/archive/20230826/202308260616.Sf8QzI7c-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@...el.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202308260616.Sf8QzI7c-lkp@intel.com/

All errors (new ones prefixed by >>):

   drivers/net/ethernet/qlogic/qede/qede_ethtool.c: In function 'qede_set_link_ksettings':
>> drivers/net/ethernet/qlogic/qede/qede_ethtool.c:584:29: error: assignment to 'const struct qede_forced_speed_map *' from incompatible pointer type 'struct ethtool_forced_speed_map *' [-Werror=incompatible-pointer-types]
     584 |                         map = qede_forced_speed_maps + i;
         |                             ^
>> drivers/net/ethernet/qlogic/qede/qede_ethtool.c:586:47: error: invalid use of undefined type 'const struct qede_forced_speed_map'
     586 |                         if (base->speed != map->speed ||
         |                                               ^~
   drivers/net/ethernet/qlogic/qede/qede_ethtool.c:588:53: error: invalid use of undefined type 'const struct qede_forced_speed_map'
     588 |                                                  map->caps))
         |                                                     ^~
   drivers/net/ethernet/qlogic/qede/qede_ethtool.c:592:70: error: invalid use of undefined type 'const struct qede_forced_speed_map'
     592 |                                      current_link.supported_caps, map->caps);
         |                                                                      ^~
   cc1: some warnings being treated as errors


vim +584 drivers/net/ethernet/qlogic/qede/qede_ethtool.c

133fac0eedc355 Sudarsana Kalluru            2015-10-26  546  
054c67d1c82afd Sudarsana Reddy Kalluru      2016-08-09  547  static int qede_set_link_ksettings(struct net_device *dev,
054c67d1c82afd Sudarsana Reddy Kalluru      2016-08-09  548  				   const struct ethtool_link_ksettings *cmd)
133fac0eedc355 Sudarsana Kalluru            2015-10-26  549  {
054c67d1c82afd Sudarsana Reddy Kalluru      2016-08-09  550  	const struct ethtool_link_settings *base = &cmd->base;
133fac0eedc355 Sudarsana Kalluru            2015-10-26  551  	struct qede_dev *edev = netdev_priv(dev);
1d4e4ecccb1144 Alexander Lobakin            2020-07-20  552  	const struct qede_forced_speed_map *map;
133fac0eedc355 Sudarsana Kalluru            2015-10-26  553  	struct qed_link_output current_link;
133fac0eedc355 Sudarsana Kalluru            2015-10-26  554  	struct qed_link_params params;
1d4e4ecccb1144 Alexander Lobakin            2020-07-20  555  	u32 i;
133fac0eedc355 Sudarsana Kalluru            2015-10-26  556  
fe7cd2bfdac4d8 Yuval Mintz                  2016-04-22  557  	if (!edev->ops || !edev->ops->common->can_link_change(edev->cdev)) {
054c67d1c82afd Sudarsana Reddy Kalluru      2016-08-09  558  		DP_INFO(edev, "Link settings are not allowed to be changed\n");
133fac0eedc355 Sudarsana Kalluru            2015-10-26  559  		return -EOPNOTSUPP;
133fac0eedc355 Sudarsana Kalluru            2015-10-26  560  	}
133fac0eedc355 Sudarsana Kalluru            2015-10-26  561  	memset(&current_link, 0, sizeof(current_link));
133fac0eedc355 Sudarsana Kalluru            2015-10-26  562  	memset(&params, 0, sizeof(params));
133fac0eedc355 Sudarsana Kalluru            2015-10-26  563  	edev->ops->common->get_link(edev->cdev, &current_link);
133fac0eedc355 Sudarsana Kalluru            2015-10-26  564  
133fac0eedc355 Sudarsana Kalluru            2015-10-26  565  	params.override_flags |= QED_LINK_OVERRIDE_SPEED_ADV_SPEEDS;
133fac0eedc355 Sudarsana Kalluru            2015-10-26  566  	params.override_flags |= QED_LINK_OVERRIDE_SPEED_AUTONEG;
bdb5d8ec47611c Alexander Lobakin            2020-07-20  567  
054c67d1c82afd Sudarsana Reddy Kalluru      2016-08-09  568  	if (base->autoneg == AUTONEG_ENABLE) {
bdb5d8ec47611c Alexander Lobakin            2020-07-20  569  		if (!phylink_test(current_link.supported_caps, Autoneg)) {
161adb046b9119 sudarsana.kalluru@...ium.com 2017-05-04  570  			DP_INFO(edev, "Auto negotiation is not supported\n");
161adb046b9119 sudarsana.kalluru@...ium.com 2017-05-04  571  			return -EOPNOTSUPP;
161adb046b9119 sudarsana.kalluru@...ium.com 2017-05-04  572  		}
161adb046b9119 sudarsana.kalluru@...ium.com 2017-05-04  573  
133fac0eedc355 Sudarsana Kalluru            2015-10-26  574  		params.autoneg = true;
133fac0eedc355 Sudarsana Kalluru            2015-10-26  575  		params.forced_speed = 0;
bdb5d8ec47611c Alexander Lobakin            2020-07-20  576  
bdb5d8ec47611c Alexander Lobakin            2020-07-20  577  		linkmode_copy(params.adv_speeds, cmd->link_modes.advertising);
133fac0eedc355 Sudarsana Kalluru            2015-10-26  578  	} else {		/* forced speed */
133fac0eedc355 Sudarsana Kalluru            2015-10-26  579  		params.override_flags |= QED_LINK_OVERRIDE_SPEED_FORCED_SPEED;
133fac0eedc355 Sudarsana Kalluru            2015-10-26  580  		params.autoneg = false;
054c67d1c82afd Sudarsana Reddy Kalluru      2016-08-09  581  		params.forced_speed = base->speed;
bdb5d8ec47611c Alexander Lobakin            2020-07-20  582  
1d4e4ecccb1144 Alexander Lobakin            2020-07-20  583  		for (i = 0; i < ARRAY_SIZE(qede_forced_speed_maps); i++) {
1d4e4ecccb1144 Alexander Lobakin            2020-07-20 @584  			map = qede_forced_speed_maps + i;
bdb5d8ec47611c Alexander Lobakin            2020-07-20  585  
1d4e4ecccb1144 Alexander Lobakin            2020-07-20 @586  			if (base->speed != map->speed ||
1d4e4ecccb1144 Alexander Lobakin            2020-07-20  587  			    !linkmode_intersects(current_link.supported_caps,
1d4e4ecccb1144 Alexander Lobakin            2020-07-20  588  						 map->caps))
1d4e4ecccb1144 Alexander Lobakin            2020-07-20  589  				continue;
bdb5d8ec47611c Alexander Lobakin            2020-07-20  590  
1d4e4ecccb1144 Alexander Lobakin            2020-07-20  591  			linkmode_and(params.adv_speeds,
1d4e4ecccb1144 Alexander Lobakin            2020-07-20  592  				     current_link.supported_caps, map->caps);
1d4e4ecccb1144 Alexander Lobakin            2020-07-20  593  			goto set_link;
bdb5d8ec47611c Alexander Lobakin            2020-07-20  594  		}
bdb5d8ec47611c Alexander Lobakin            2020-07-20  595  
1d4e4ecccb1144 Alexander Lobakin            2020-07-20  596  		DP_INFO(edev, "Unsupported speed %u\n", base->speed);
1d4e4ecccb1144 Alexander Lobakin            2020-07-20  597  		return -EINVAL;
133fac0eedc355 Sudarsana Kalluru            2015-10-26  598  	}
133fac0eedc355 Sudarsana Kalluru            2015-10-26  599  
1d4e4ecccb1144 Alexander Lobakin            2020-07-20  600  set_link:
133fac0eedc355 Sudarsana Kalluru            2015-10-26  601  	params.link_up = true;
133fac0eedc355 Sudarsana Kalluru            2015-10-26  602  	edev->ops->common->set_link(edev->cdev, &params);
133fac0eedc355 Sudarsana Kalluru            2015-10-26  603  
133fac0eedc355 Sudarsana Kalluru            2015-10-26  604  	return 0;
133fac0eedc355 Sudarsana Kalluru            2015-10-26  605  }
133fac0eedc355 Sudarsana Kalluru            2015-10-26  606  

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