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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <08d8b75e-af80-438b-8006-9121b8444f49@moroto.mountain>
Date: Thu, 4 Jan 2024 17:47:39 +0300
From: Dan Carpenter <dan.carpenter@...aro.org>
To: oe-kbuild@...ts.linux.dev,
	Jedrzej Jagielski <jedrzej.jagielski@...el.com>,
	intel-wired-lan@...ts.osuosl.org
Cc: lkp@...el.com, oe-kbuild-all@...ts.linux.dev,
	anthony.l.nguyen@...el.com, netdev@...r.kernel.org,
	Jedrzej Jagielski <jedrzej.jagielski@...el.com>,
	Jacob Keller <jacob.e.keller@...el.com>
Subject: Re: [PATCH iwl-next v1] ixgbe: Convert ret val type from s32 to int

Hi Jedrzej,

kernel test robot noticed the following build warnings:

https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Jedrzej-Jagielski/ixgbe-Convert-ret-val-type-from-s32-to-int/20240103-182213
base:   https://git.kernel.org/pub/scm/linux/kernel/git/horms/ipvs.git master
patch link:    https://lore.kernel.org/r/20240103101135.386891-1-jedrzej.jagielski%40intel.com
patch subject: [PATCH iwl-next v1] ixgbe: Convert ret val type from s32 to int
config: i386-randconfig-141-20240104 (https://download.01.org/0day-ci/archive/20240104/202401041701.6QKTsZmx-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0

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>
| Reported-by: Dan Carpenter <dan.carpenter@...aro.org>
| Closes: https://lore.kernel.org/r/202401041701.6QKTsZmx-lkp@intel.com/

New smatch warnings:
drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c:2884 ixgbe_get_lcd_t_x550em() warn: missing error code? 'status'
drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c:3130 ixgbe_enter_lplu_t_x550em() warn: missing error code? 'status'

Old smatch warnings:
drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c:2890 ixgbe_get_lcd_t_x550em() warn: missing error code? 'status'

vim +/status +2884 drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c

9ea222bfe41f87 Jedrzej Jagielski 2024-01-03  2866  static int ixgbe_get_lcd_t_x550em(struct ixgbe_hw *hw,
6ac7439459606a Don Skidmore      2015-06-17  2867  				  ixgbe_link_speed *lcd_speed)
6ac7439459606a Don Skidmore      2015-06-17  2868  {
6ac7439459606a Don Skidmore      2015-06-17  2869  	u16 an_lp_status;
9ea222bfe41f87 Jedrzej Jagielski 2024-01-03  2870  	int status;
6ac7439459606a Don Skidmore      2015-06-17  2871  	u16 word = hw->eeprom.ctrl_word_3;
6ac7439459606a Don Skidmore      2015-06-17  2872  
6ac7439459606a Don Skidmore      2015-06-17  2873  	*lcd_speed = IXGBE_LINK_SPEED_UNKNOWN;
6ac7439459606a Don Skidmore      2015-06-17  2874  
6ac7439459606a Don Skidmore      2015-06-17  2875  	status = hw->phy.ops.read_reg(hw, IXGBE_AUTO_NEG_LP_STATUS,
4dc4000b35119f Emil Tantilov     2016-09-26  2876  				      MDIO_MMD_AN,
6ac7439459606a Don Skidmore      2015-06-17  2877  				      &an_lp_status);
6ac7439459606a Don Skidmore      2015-06-17  2878  	if (status)
6ac7439459606a Don Skidmore      2015-06-17  2879  		return status;
6ac7439459606a Don Skidmore      2015-06-17  2880  
6ac7439459606a Don Skidmore      2015-06-17  2881  	/* If link partner advertised 1G, return 1G */
6ac7439459606a Don Skidmore      2015-06-17  2882  	if (an_lp_status & IXGBE_AUTO_NEG_LP_1000BASE_CAP) {
6ac7439459606a Don Skidmore      2015-06-17  2883  		*lcd_speed = IXGBE_LINK_SPEED_1GB_FULL;
6ac7439459606a Don Skidmore      2015-06-17 @2884  		return status;

Smatch only warns about missing error codes when the function returns an
int.  :P  The bug predates your patch obvoiusly.

6ac7439459606a Don Skidmore      2015-06-17  2885  	}
6ac7439459606a Don Skidmore      2015-06-17  2886  
6ac7439459606a Don Skidmore      2015-06-17  2887  	/* If 10G disabled for LPLU via NVM D10GMP, then return no valid LCD */
6ac7439459606a Don Skidmore      2015-06-17  2888  	if ((hw->bus.lan_id && (word & NVM_INIT_CTRL_3_D10GMP_PORT1)) ||
6ac7439459606a Don Skidmore      2015-06-17  2889  	    (word & NVM_INIT_CTRL_3_D10GMP_PORT0))
6ac7439459606a Don Skidmore      2015-06-17  2890  		return status;
6ac7439459606a Don Skidmore      2015-06-17  2891  
6ac7439459606a Don Skidmore      2015-06-17  2892  	/* Link partner not capable of lower speeds, return 10G */
6ac7439459606a Don Skidmore      2015-06-17  2893  	*lcd_speed = IXGBE_LINK_SPEED_10GB_FULL;
6ac7439459606a Don Skidmore      2015-06-17  2894  	return status;
6ac7439459606a Don Skidmore      2015-06-17  2895  }

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