From: Przemek Kitszel <przemyslaw.kitszel@intel.com>
To: Dan Carpenter <dan.carpenter@linaro.org>,
<oe-kbuild@lists.linux.dev>,
Jedrzej Jagielski <jedrzej.jagielski@intel.com>,
<intel-wired-lan@lists.osuosl.org>
Cc: Jacob Keller <jacob.e.keller@intel.com>,
netdev@vger.kernel.org, anthony.l.nguyen@intel.com,
oe-kbuild-all@lists.linux.dev
Subject: Re: [Intel-wired-lan] [PATCH iwl-next v1] ixgbe: Convert ret val type from s32 to int
Date: Fri, 5 Jan 2024 08:14:22 +0100 [thread overview]
Message-ID: <a89dcad5-1c99-411e-843d-baf1fc8e5fc0@intel.com> (raw)
In-Reply-To: <08d8b75e-af80-438b-8006-9121b8444f49@moroto.mountain>
On 1/4/24 15:47, Dan Carpenter wrote:
> 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@intel.com>
> | Reported-by: Dan Carpenter <dan.carpenter@linaro.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;
indeed, 'return 0' would be clearer here
>
> Smatch only warns about missing error codes when the function returns an
> int. :P The bug predates your patch obvoiusly.
:D
>
> 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 }
>
prev parent reply other threads:[~2024-01-05 7:14 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-03 10:11 [Intel-wired-lan] [PATCH iwl-next v1] ixgbe: Convert ret val type from s32 to int Jedrzej Jagielski
2024-01-04 7:26 ` Paul Menzel
2024-01-04 14:47 ` Dan Carpenter
2024-01-05 7:14 ` Przemek Kitszel [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=a89dcad5-1c99-411e-843d-baf1fc8e5fc0@intel.com \
--to=przemyslaw.kitszel@intel.com \
--cc=anthony.l.nguyen@intel.com \
--cc=dan.carpenter@linaro.org \
--cc=intel-wired-lan@lists.osuosl.org \
--cc=jacob.e.keller@intel.com \
--cc=jedrzej.jagielski@intel.com \
--cc=netdev@vger.kernel.org \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=oe-kbuild@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox