From: Tony Nguyen <anthony.l.nguyen@intel.com>
To: Jedrzej Jagielski <jedrzej.jagielski@intel.com>,
<intel-wired-lan@lists.osuosl.org>
Cc: Jacob Keller <jacob.e.keller@intel.com>, netdev@vger.kernel.org
Subject: Re: [Intel-wired-lan] [PATCH iwl-next v2] ixgbe: Convert ret val type from s32 to int
Date: Fri, 5 Jan 2024 13:49:42 -0800 [thread overview]
Message-ID: <5221bfaf-31bf-630f-9036-284c83c3eb76@intel.com> (raw)
In-Reply-To: <20240105103120.393911-1-jedrzej.jagielski@intel.com>
On 1/5/2024 2:31 AM, Jedrzej Jagielski wrote:
> Currently big amount of the functions returning standard error codes
> are of type s32. Convert them to regular ints as typdefs here are
> not necessary to return standard error codes.
>
> Suggested-by: Jacob Keller <jacob.e.keller@intel.com>
> Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>
> Signed-off-by: Jedrzej Jagielski <jedrzej.jagielski@intel.com>
> ---
> v2: fix smatch warnings,
These changes aren't mentioned in the commit message, however, it should
probably be in it's own commit to keep the changes separate and easier
to see/review (since they pre-existed this patch).
Also, not seeing changes/fixes to the second warning [1]
New smatch warnings:
...
drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c:3130
ixgbe_enter_lplu_t_x550em() warn: missing error code? 'status'
> alter the commit msg
> ---
...
> @@ -93,11 +93,11 @@ static s32 ixgbe_get_invariants_82598(struct ixgbe_hw *hw)
> * not known. Perform the SFP init if necessary.
> *
> **/
> -static s32 ixgbe_init_phy_ops_82598(struct ixgbe_hw *hw)
> +static int ixgbe_init_phy_ops_82598(struct ixgbe_hw *hw)
> {
> struct ixgbe_mac_info *mac = &hw->mac;
> struct ixgbe_phy_info *phy = &hw->phy;
> - s32 ret_val;
> + int ret_val;
> u16 list_offset, data_offset;
Should we RCT what we're touching? (many other instances in the patch as
well)
...
> @@ -1866,9 +1866,9 @@ static s32 ixgbe_enable_rx_dma_82599(struct ixgbe_hw *hw, u32 regval)
> * Returns IXGBE_ERR_EEPROM_VERSION if the FW is not present or
> * if the FW version is not supported.
> **/
> -static s32 ixgbe_verify_fw_version_82599(struct ixgbe_hw *hw)
> +static int ixgbe_verify_fw_version_82599(struct ixgbe_hw *hw)
> {
> - s32 status = IXGBE_ERR_EEPROM_VERSION;
> + int status = IXGBE_ERR_EEPROM_VERSION;
Does IXGBE_ERR_EEPROM_VERSION exist anymore after your other patch? [2]
> u16 fw_offset, fw_ptp_cfg_offset;
> u16 offset;
> u16 fw_version = 0;
...
> @@ -2062,12 +2062,12 @@ static s32 ixgbe_reset_pipeline_82599(struct ixgbe_hw *hw)
> * Performs byte read operation to SFP module's EEPROM over I2C interface at
> * a specified device address.
> **/
> -static s32 ixgbe_read_i2c_byte_82599(struct ixgbe_hw *hw, u8 byte_offset,
> +static int ixgbe_read_i2c_byte_82599(struct ixgbe_hw *hw, u8 byte_offset,
> u8 dev_addr, u8 *data)
> {
> u32 esdp;
> - s32 status;
> - s32 timeout = 200;
> + int status;
> + int timeout = 200;
unrelated change (at least a few others in this patch as well)
>
> if (hw->phy.qsfp_shared_i2c_bus == true) {
> /* Acquire I2C bus ownership. */
> @@ -2116,12 +2116,12 @@ static s32 ixgbe_read_i2c_byte_82599(struct ixgbe_hw *hw, u8 byte_offset,
> * Performs byte write operation to SFP module's EEPROM over I2C interface at
> * a specified device address.
> **/
> -static s32 ixgbe_write_i2c_byte_82599(struct ixgbe_hw *hw, u8 byte_offset,
> +static int ixgbe_write_i2c_byte_82599(struct ixgbe_hw *hw, u8 byte_offset,
> u8 dev_addr, u8 data)
> {
> u32 esdp;
> - s32 status;
> - s32 timeout = 200;
> + int status;
> + int timeout = 200;
>
> if (hw->phy.qsfp_shared_i2c_bus == true) {
> /* Acquire I2C bus ownership. */
Thanks,
Tony
[1]
https://lore.kernel.org/intel-wired-lan/08d8b75e-af80-438b-8006-9121b8444f49@moroto.mountain/
[2]
https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git/commit?id=5795f533f30a80aa0473652876296ebc9129e33a
next prev parent reply other threads:[~2024-01-05 21:56 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-05 10:31 [Intel-wired-lan] [PATCH iwl-next v2] ixgbe: Convert ret val type from s32 to int Jedrzej Jagielski
2024-01-05 21:49 ` Tony Nguyen [this message]
2024-01-10 11:51 ` Jagielski, Jedrzej
2024-01-10 18:56 ` Tony Nguyen
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=5221bfaf-31bf-630f-9036-284c83c3eb76@intel.com \
--to=anthony.l.nguyen@intel.com \
--cc=intel-wired-lan@lists.osuosl.org \
--cc=jacob.e.keller@intel.com \
--cc=jedrzej.jagielski@intel.com \
--cc=netdev@vger.kernel.org \
/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