From: Guinan Sun <guinanx.sun@intel.com>
To: dev@dpdk.org
Cc: Jeff Guo <jia.guo@intel.com>, Zhao1 Wei <wei.zhao1@intel.com>,
Guinan Sun <guinanx.sun@intel.com>,
Jakub Chylkowski <jakubx.chylkowski@intel.com>
Subject: [dpdk-dev] [PATCH v3 11/19] net/ixgbe/base: remove unnecessary return value check
Date: Thu, 9 Jul 2020 08:00:38 +0000 [thread overview]
Message-ID: <20200709080046.65879-12-guinanx.sun@intel.com> (raw)
In-Reply-To: <20200709080046.65879-1-guinanx.sun@intel.com>
Remove unnecessary return value check.
Signed-off-by: Jakub Chylkowski <jakubx.chylkowski@intel.com>
Signed-off-by: Guinan Sun <guinanx.sun@intel.com>
Reviewed-by: Wei Zhao <wei.zhao1@intel.com>
---
drivers/net/ixgbe/base/ixgbe_82599.c | 4 +---
drivers/net/ixgbe/base/ixgbe_common.c | 4 +---
drivers/net/ixgbe/base/ixgbe_common.h | 2 +-
drivers/net/ixgbe/base/ixgbe_phy.c | 25 +++++++------------------
drivers/net/ixgbe/base/ixgbe_x540.c | 2 +-
5 files changed, 11 insertions(+), 26 deletions(-)
diff --git a/drivers/net/ixgbe/base/ixgbe_82599.c b/drivers/net/ixgbe/base/ixgbe_82599.c
index 38ab58d54..e425f28af 100644
--- a/drivers/net/ixgbe/base/ixgbe_82599.c
+++ b/drivers/net/ixgbe/base/ixgbe_82599.c
@@ -2093,9 +2093,7 @@ s32 ixgbe_start_hw_82599(struct ixgbe_hw *hw)
if (ret_val != IXGBE_SUCCESS)
goto out;
- ret_val = ixgbe_start_hw_gen2(hw);
- if (ret_val != IXGBE_SUCCESS)
- goto out;
+ ixgbe_start_hw_gen2(hw);
/* We need to run link autotry after the driver loads */
hw->mac.autotry_restart = true;
diff --git a/drivers/net/ixgbe/base/ixgbe_common.c b/drivers/net/ixgbe/base/ixgbe_common.c
index a53286eb0..4e5d909ca 100644
--- a/drivers/net/ixgbe/base/ixgbe_common.c
+++ b/drivers/net/ixgbe/base/ixgbe_common.c
@@ -421,7 +421,7 @@ s32 ixgbe_start_hw_generic(struct ixgbe_hw *hw)
* 82599
* X540
**/
-s32 ixgbe_start_hw_gen2(struct ixgbe_hw *hw)
+void ixgbe_start_hw_gen2(struct ixgbe_hw *hw)
{
u32 i;
u32 regval;
@@ -446,8 +446,6 @@ s32 ixgbe_start_hw_gen2(struct ixgbe_hw *hw)
IXGBE_DCA_RXCTRL_HEAD_WRO_EN);
IXGBE_WRITE_REG(hw, IXGBE_DCA_RXCTRL(i), regval);
}
-
- return IXGBE_SUCCESS;
}
/**
diff --git a/drivers/net/ixgbe/base/ixgbe_common.h b/drivers/net/ixgbe/base/ixgbe_common.h
index 7a31f088c..5bdb48440 100644
--- a/drivers/net/ixgbe/base/ixgbe_common.h
+++ b/drivers/net/ixgbe/base/ixgbe_common.h
@@ -23,7 +23,7 @@ u16 ixgbe_get_pcie_msix_count_generic(struct ixgbe_hw *hw);
s32 ixgbe_init_ops_generic(struct ixgbe_hw *hw);
s32 ixgbe_init_hw_generic(struct ixgbe_hw *hw);
s32 ixgbe_start_hw_generic(struct ixgbe_hw *hw);
-s32 ixgbe_start_hw_gen2(struct ixgbe_hw *hw);
+void ixgbe_start_hw_gen2(struct ixgbe_hw *hw);
s32 ixgbe_clear_hw_cntrs_generic(struct ixgbe_hw *hw);
s32 ixgbe_read_pba_num_generic(struct ixgbe_hw *hw, u32 *pba_num);
s32 ixgbe_read_pba_string_generic(struct ixgbe_hw *hw, u8 *pba_num,
diff --git a/drivers/net/ixgbe/base/ixgbe_phy.c b/drivers/net/ixgbe/base/ixgbe_phy.c
index 620154a41..f859b152e 100644
--- a/drivers/net/ixgbe/base/ixgbe_phy.c
+++ b/drivers/net/ixgbe/base/ixgbe_phy.c
@@ -8,10 +8,10 @@
STATIC void ixgbe_i2c_start(struct ixgbe_hw *hw);
STATIC void ixgbe_i2c_stop(struct ixgbe_hw *hw);
-STATIC s32 ixgbe_clock_in_i2c_byte(struct ixgbe_hw *hw, u8 *data);
+STATIC void ixgbe_clock_in_i2c_byte(struct ixgbe_hw *hw, u8 *data);
STATIC s32 ixgbe_clock_out_i2c_byte(struct ixgbe_hw *hw, u8 data);
STATIC s32 ixgbe_get_i2c_ack(struct ixgbe_hw *hw);
-STATIC s32 ixgbe_clock_in_i2c_bit(struct ixgbe_hw *hw, bool *data);
+STATIC void ixgbe_clock_in_i2c_bit(struct ixgbe_hw *hw, bool *data);
STATIC s32 ixgbe_clock_out_i2c_bit(struct ixgbe_hw *hw, bool data);
STATIC void ixgbe_raise_i2c_clk(struct ixgbe_hw *hw, u32 *i2cctl);
STATIC void ixgbe_lower_i2c_clk(struct ixgbe_hw *hw, u32 *i2cctl);
@@ -46,11 +46,7 @@ STATIC s32 ixgbe_out_i2c_byte_ack(struct ixgbe_hw *hw, u8 byte)
*/
STATIC s32 ixgbe_in_i2c_byte_ack(struct ixgbe_hw *hw, u8 *byte)
{
- s32 status;
-
- status = ixgbe_clock_in_i2c_byte(hw, byte);
- if (status)
- return status;
+ ixgbe_clock_in_i2c_byte(hw, byte);
/* ACK */
return ixgbe_clock_out_i2c_bit(hw, false);
}
@@ -123,8 +119,7 @@ s32 ixgbe_read_i2c_combined_generic_int(struct ixgbe_hw *hw, u8 addr, u16 reg,
if (ixgbe_in_i2c_byte_ack(hw, &low_bits))
goto fail;
/* Get csum */
- if (ixgbe_clock_in_i2c_byte(hw, &csum_byte))
- goto fail;
+ ixgbe_clock_in_i2c_byte(hw, &csum_byte);
/* NACK */
if (ixgbe_clock_out_i2c_bit(hw, false))
goto fail;
@@ -2034,9 +2029,7 @@ STATIC s32 ixgbe_read_i2c_byte_generic_int(struct ixgbe_hw *hw, u8 byte_offset,
if (status != IXGBE_SUCCESS)
goto fail;
- status = ixgbe_clock_in_i2c_byte(hw, data);
- if (status != IXGBE_SUCCESS)
- goto fail;
+ ixgbe_clock_in_i2c_byte(hw, data);
status = ixgbe_clock_out_i2c_bit(hw, nack);
if (status != IXGBE_SUCCESS)
@@ -2281,7 +2274,7 @@ STATIC void ixgbe_i2c_stop(struct ixgbe_hw *hw)
*
* Clocks in one byte data via I2C data/clock
**/
-STATIC s32 ixgbe_clock_in_i2c_byte(struct ixgbe_hw *hw, u8 *data)
+STATIC void ixgbe_clock_in_i2c_byte(struct ixgbe_hw *hw, u8 *data)
{
s32 i;
bool bit = 0;
@@ -2293,8 +2286,6 @@ STATIC s32 ixgbe_clock_in_i2c_byte(struct ixgbe_hw *hw, u8 *data)
ixgbe_clock_in_i2c_bit(hw, &bit);
*data |= bit << i;
}
-
- return IXGBE_SUCCESS;
}
/**
@@ -2390,7 +2381,7 @@ STATIC s32 ixgbe_get_i2c_ack(struct ixgbe_hw *hw)
*
* Clocks in one bit via I2C data/clock
**/
-STATIC s32 ixgbe_clock_in_i2c_bit(struct ixgbe_hw *hw, bool *data)
+STATIC void ixgbe_clock_in_i2c_bit(struct ixgbe_hw *hw, bool *data)
{
u32 i2cctl = IXGBE_READ_REG(hw, IXGBE_I2CCTL_BY_MAC(hw));
u32 data_oe_bit = IXGBE_I2C_DATA_OE_N_EN_BY_MAC(hw);
@@ -2415,8 +2406,6 @@ STATIC s32 ixgbe_clock_in_i2c_bit(struct ixgbe_hw *hw, bool *data)
/* Minimum low period of clock is 4.7 us */
usec_delay(IXGBE_I2C_T_LOW);
-
- return IXGBE_SUCCESS;
}
/**
diff --git a/drivers/net/ixgbe/base/ixgbe_x540.c b/drivers/net/ixgbe/base/ixgbe_x540.c
index 838bfc8b5..4cea16a81 100644
--- a/drivers/net/ixgbe/base/ixgbe_x540.c
+++ b/drivers/net/ixgbe/base/ixgbe_x540.c
@@ -288,7 +288,7 @@ s32 ixgbe_start_hw_X540(struct ixgbe_hw *hw)
if (ret_val != IXGBE_SUCCESS)
goto out;
- ret_val = ixgbe_start_hw_gen2(hw);
+ ixgbe_start_hw_gen2(hw);
out:
return ret_val;
--
2.17.1
next prev parent reply other threads:[~2020-07-09 8:16 UTC|newest]
Thread overview: 99+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-12 3:23 [dpdk-dev] [PATCH 00/21] update ixgbe base code Guinan Sun
2020-06-12 3:23 ` [dpdk-dev] [PATCH 01/21] net/ixgbe/base: clear VFMBMEM and toggle VF's Tx queues Guinan Sun
2020-06-22 11:58 ` Ferruh Yigit
2020-06-30 1:57 ` Sun, GuinanX
2020-06-12 3:23 ` [dpdk-dev] [PATCH 02/21] net/ixgbe/base: change in the condition for response HI Guinan Sun
2020-06-22 11:58 ` Ferruh Yigit
2020-06-29 9:27 ` Yang, Qiming
2020-06-30 2:17 ` Sun, GuinanX
2020-06-12 3:23 ` [dpdk-dev] [PATCH 03/21] net/ixgbe/base: hange flow for "Apply Update" command Guinan Sun
2020-06-22 11:58 ` Ferruh Yigit
2020-06-30 2:24 ` Sun, GuinanX
2020-06-12 3:23 ` [dpdk-dev] [PATCH 04/21] net/ixgbe/base: x550em 10G NIC driver issue Guinan Sun
2020-06-22 11:59 ` Ferruh Yigit
2020-07-01 2:54 ` Sun, GuinanX
2020-06-12 3:23 ` [dpdk-dev] [PATCH 05/21] net/ixgbe/base: added API for NVM update Guinan Sun
2020-06-22 11:59 ` Ferruh Yigit
2020-06-30 2:37 ` Sun, GuinanX
2020-06-12 3:23 ` [dpdk-dev] [PATCH 06/21] net/ixgbe/base: resolve infinite recursion on PCIe link down Guinan Sun
2020-06-12 3:23 ` [dpdk-dev] [PATCH 07/21] net/ixgbe/base: added register definitions for NVM update Guinan Sun
2020-06-12 3:23 ` [dpdk-dev] [PATCH 08/21] net/ixgbe/base: cleanup spelling mistakes in comments Guinan Sun
2020-06-12 3:23 ` [dpdk-dev] [PATCH 09/21] net/ixgbe/base: remove whitespace in function comments Guinan Sun
2020-06-12 3:23 ` [dpdk-dev] [PATCH 10/21] net/ixgbe/base: move increments after evaluations Guinan Sun
2020-06-22 11:59 ` Ferruh Yigit
2020-06-30 2:51 ` Sun, GuinanX
2020-06-12 3:24 ` [dpdk-dev] [PATCH 11/21] net/ixgbe/base: modify loop accounting for retries Guinan Sun
2020-06-22 11:59 ` Ferruh Yigit
2020-06-30 2:52 ` Sun, GuinanX
2020-06-12 3:24 ` [dpdk-dev] [PATCH 12/21] net/ixgbe/base: create dedicated func to restart auto nego Guinan Sun
2020-06-22 11:59 ` Ferruh Yigit
2020-06-12 3:24 ` [dpdk-dev] [PATCH 13/21] net/ixgbe/base: modify Klocwork hits for DDK 7.0 Guinan Sun
2020-06-22 12:00 ` Ferruh Yigit
2020-07-01 4:52 ` Sun, GuinanX
2020-06-12 3:24 ` [dpdk-dev] [PATCH 14/21] net/ixgbe/base: add defines for min rollback revision fields Guinan Sun
2020-06-22 12:00 ` Ferruh Yigit
2020-07-01 5:08 ` Sun, GuinanX
2020-06-12 3:24 ` [dpdk-dev] [PATCH 15/21] net/ixgbe/base: remove unnecessary log message FC autonego Guinan Sun
2020-06-12 3:24 ` [dpdk-dev] [PATCH 16/21] net/ixgbe/base: initialize data field in struct buffer Guinan Sun
2020-06-12 3:24 ` [dpdk-dev] [PATCH 17/21] net/ixgbe/base: improve log about autonego being disabled Guinan Sun
2020-06-22 12:00 ` Ferruh Yigit
2020-07-01 5:19 ` Sun, GuinanX
2020-06-12 3:24 ` [dpdk-dev] [PATCH 18/21] net/ixgbe/base: ipv6 Mask for purpose FDIR VLAN Port Feature Guinan Sun
2020-06-22 12:00 ` Ferruh Yigit
2020-07-01 5:21 ` Sun, GuinanX
2020-06-12 3:24 ` [dpdk-dev] [PATCH 19/21] net/ixgbe/base: remove default advertising for 2.5G and 5G Guinan Sun
2020-06-22 12:00 ` Ferruh Yigit
2020-07-01 6:24 ` Sun, GuinanX
2020-06-12 3:24 ` [dpdk-dev] [PATCH 20/21] net/ixgbe/base: check Host Interface Return Status Guinan Sun
2020-06-12 3:24 ` [dpdk-dev] [PATCH 21/21] net/ixgbe/base: update version Guinan Sun
2020-06-22 12:01 ` Ferruh Yigit
2020-07-01 6:27 ` Sun, GuinanX
2020-06-15 5:47 ` [dpdk-dev] [PATCH 00/21] update ixgbe base code Zhao1, Wei
2020-06-15 5:59 ` Sun, GuinanX
2020-06-22 2:42 ` Zhao1, Wei
2020-06-22 3:50 ` Zhang, Qi Z
2020-07-02 3:13 ` [dpdk-dev] [PATCH v2 00/20] " Guinan Sun
2020-07-02 3:13 ` [dpdk-dev] [PATCH v2 01/20] net/ixgbe/base: toggle VF's Tx queues Guinan Sun
2020-07-02 3:13 ` [dpdk-dev] [PATCH v2 02/20] net/ixgbe/base: add support to clear VFMBMEM Guinan Sun
2020-07-02 3:13 ` [dpdk-dev] [PATCH v2 03/20] net/ixgbe/base: fix host interface shadow RAM read Guinan Sun
2020-07-02 3:13 ` [dpdk-dev] [PATCH v2 04/20] net/ixgbe/base: change flow for "Apply Update" command Guinan Sun
2020-07-02 3:13 ` [dpdk-dev] [PATCH v2 05/20] net/ixgbe/base: fix x550em 10G NIC link status report Guinan Sun
2020-07-02 3:13 ` [dpdk-dev] [PATCH v2 06/20] net/ixgbe/base: resolve infinite recursion on PCIe link down Guinan Sun
2020-07-02 3:13 ` [dpdk-dev] [PATCH v2 07/20] net/ixgbe/base: added register definitions for NVM update Guinan Sun
2020-07-02 3:13 ` [dpdk-dev] [PATCH v2 08/20] net/ixgbe/base: cleanup spelling mistakes in comments Guinan Sun
2020-07-02 3:13 ` [dpdk-dev] [PATCH v2 09/20] net/ixgbe/base: remove whitespace in function comments Guinan Sun
2020-07-02 3:13 ` [dpdk-dev] [PATCH v2 10/20] net/ixgbe/base: move increments after evaluations Guinan Sun
2020-07-02 3:13 ` [dpdk-dev] [PATCH v2 11/20] net/ixgbe/base: create dedicated func to restart auto nego Guinan Sun
2020-07-02 3:13 ` [dpdk-dev] [PATCH v2 12/20] net/ixgbe/base: modify coding style Guinan Sun
2020-07-08 15:26 ` Ferruh Yigit
2020-07-09 7:58 ` Sun, GuinanX
2020-07-02 3:13 ` [dpdk-dev] [PATCH v2 13/20] net/ixgbe/base: remove unnecessary log message FC autonego Guinan Sun
2020-07-02 3:13 ` [dpdk-dev] [PATCH v2 14/20] net/ixgbe/base: initialize data field in struct buffer Guinan Sun
2020-07-02 3:13 ` [dpdk-dev] [PATCH v2 15/20] net/ixgbe/base: improve log about autonego being disabled Guinan Sun
2020-07-02 3:13 ` [dpdk-dev] [PATCH v2 16/20] net/ixgbe/base: add ipv6 mask for FDIR feature Guinan Sun
2020-07-02 3:13 ` [dpdk-dev] [PATCH v2 17/20] net/ixgbe/base: remove default advertising for x550 2.5G/5G Guinan Sun
2020-07-02 3:13 ` [dpdk-dev] [PATCH v2 18/20] net/ixgbe/base: check host interface return status Guinan Sun
2020-07-02 3:13 ` [dpdk-dev] [PATCH v2 19/20] net/ixgbe/base: cleanup pre-processor tags Guinan Sun
2020-07-02 3:13 ` [dpdk-dev] [PATCH v2 20/20] net/ixgbe/base: update version Guinan Sun
2020-07-08 0:50 ` [dpdk-dev] [PATCH v2 00/20] update ixgbe base code Zhang, Qi Z
2020-07-09 8:00 ` [dpdk-dev] [PATCH v3 00/19] " Guinan Sun
2020-07-09 8:00 ` [dpdk-dev] [PATCH v3 01/19] net/ixgbe/base: fix host interface shadow RAM read Guinan Sun
2020-07-09 8:00 ` [dpdk-dev] [PATCH v3 02/19] net/ixgbe/base: change flow for "Apply Update" command Guinan Sun
2020-07-09 8:00 ` [dpdk-dev] [PATCH v3 03/19] net/ixgbe/base: fix x550em 10G NIC link status report Guinan Sun
2020-07-09 8:00 ` [dpdk-dev] [PATCH v3 04/19] net/ixgbe/base: resolve infinite recursion on PCIe link down Guinan Sun
2020-07-09 8:00 ` [dpdk-dev] [PATCH v3 05/19] net/ixgbe/base: added register definitions for NVM update Guinan Sun
2020-07-09 8:00 ` [dpdk-dev] [PATCH v3 06/19] net/ixgbe/base: cleanup spelling mistakes in comments Guinan Sun
2020-07-09 8:00 ` [dpdk-dev] [PATCH v3 07/19] net/ixgbe/base: remove whitespace in function comments Guinan Sun
2020-07-09 8:00 ` [dpdk-dev] [PATCH v3 08/19] net/ixgbe/base: move increments after evaluations Guinan Sun
2020-07-09 8:00 ` [dpdk-dev] [PATCH v3 09/19] net/ixgbe/base: create dedicated func to restart auto nego Guinan Sun
2020-07-09 8:00 ` [dpdk-dev] [PATCH v3 10/19] net/ixgbe/base: add typecast for type mismatch Guinan Sun
2020-07-09 8:00 ` Guinan Sun [this message]
2020-07-09 8:00 ` [dpdk-dev] [PATCH v3 12/19] net/ixgbe/base: remove unnecessary log message FC autonego Guinan Sun
2020-07-09 8:00 ` [dpdk-dev] [PATCH v3 13/19] net/ixgbe/base: initialize data field in struct buffer Guinan Sun
2020-07-09 8:00 ` [dpdk-dev] [PATCH v3 14/19] net/ixgbe/base: improve log about autonego being disabled Guinan Sun
2020-07-09 8:00 ` [dpdk-dev] [PATCH v3 15/19] net/ixgbe/base: add ipv6 mask for FDIR feature Guinan Sun
2020-07-09 8:00 ` [dpdk-dev] [PATCH v3 16/19] net/ixgbe/base: remove default advertising for x550 2.5G/5G Guinan Sun
2020-07-09 8:00 ` [dpdk-dev] [PATCH v3 17/19] net/ixgbe/base: check host interface return status Guinan Sun
2020-07-09 8:00 ` [dpdk-dev] [PATCH v3 18/19] net/ixgbe/base: cleanup pre-processor tags Guinan Sun
2020-07-09 8:00 ` [dpdk-dev] [PATCH v3 19/19] net/ixgbe/base: update version Guinan Sun
2020-07-09 10:46 ` [dpdk-dev] [PATCH v3 00/19] update ixgbe base code Zhang, Qi Z
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=20200709080046.65879-12-guinanx.sun@intel.com \
--to=guinanx.sun@intel.com \
--cc=dev@dpdk.org \
--cc=jakubx.chylkowski@intel.com \
--cc=jia.guo@intel.com \
--cc=wei.zhao1@intel.com \
/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;
as well as URLs for NNTP newsgroup(s).