Module Name:    src
Committed By:   msaitoh
Date:           Fri Dec 10 11:20:13 UTC 2021

Modified Files:
        src/sys/dev/pci/ixgbe: ixgbe_82599.c ixgbe_common.c ixgbe_common.h
            ixgbe_phy.c ixgbe_x540.c

Log Message:
Remove unnecessary return value check.

  FreeBSD: 3a89005394bc5d82ce9b6baa9e7f8dee362354ae
  DPDK:    4b0ee6529b7897c2a08dd56669f07ac1f46a8474


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 src/sys/dev/pci/ixgbe/ixgbe_82599.c \
    src/sys/dev/pci/ixgbe/ixgbe_phy.c
cvs rdiff -u -r1.34 -r1.35 src/sys/dev/pci/ixgbe/ixgbe_common.c
cvs rdiff -u -r1.14 -r1.15 src/sys/dev/pci/ixgbe/ixgbe_common.h
cvs rdiff -u -r1.19 -r1.20 src/sys/dev/pci/ixgbe/ixgbe_x540.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/pci/ixgbe/ixgbe_82599.c
diff -u src/sys/dev/pci/ixgbe/ixgbe_82599.c:1.24 src/sys/dev/pci/ixgbe/ixgbe_82599.c:1.25
--- src/sys/dev/pci/ixgbe/ixgbe_82599.c:1.24	Fri Dec 10 11:16:54 2021
+++ src/sys/dev/pci/ixgbe/ixgbe_82599.c	Fri Dec 10 11:20:13 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: ixgbe_82599.c,v 1.24 2021/12/10 11:16:54 msaitoh Exp $ */
+/* $NetBSD: ixgbe_82599.c,v 1.25 2021/12/10 11:20:13 msaitoh Exp $ */
 
 /******************************************************************************
   SPDX-License-Identifier: BSD-3-Clause
@@ -36,7 +36,7 @@
 /*$FreeBSD: head/sys/dev/ixgbe/ixgbe_82599.c 331224 2018-03-19 20:55:05Z erj $*/
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ixgbe_82599.c,v 1.24 2021/12/10 11:16:54 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ixgbe_82599.c,v 1.25 2021/12/10 11:20:13 msaitoh Exp $");
 
 #include "ixgbe_type.h"
 #include "ixgbe_82599.h"
@@ -2144,9 +2144,7 @@ s32 ixgbe_start_hw_82599(struct ixgbe_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;
Index: src/sys/dev/pci/ixgbe/ixgbe_phy.c
diff -u src/sys/dev/pci/ixgbe/ixgbe_phy.c:1.24 src/sys/dev/pci/ixgbe/ixgbe_phy.c:1.25
--- src/sys/dev/pci/ixgbe/ixgbe_phy.c:1.24	Fri Apr 30 06:55:32 2021
+++ src/sys/dev/pci/ixgbe/ixgbe_phy.c	Fri Dec 10 11:20:13 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: ixgbe_phy.c,v 1.24 2021/04/30 06:55:32 msaitoh Exp $ */
+/* $NetBSD: ixgbe_phy.c,v 1.25 2021/12/10 11:20:13 msaitoh Exp $ */
 
 /******************************************************************************
   SPDX-License-Identifier: BSD-3-Clause
@@ -36,7 +36,7 @@
 /*$FreeBSD: head/sys/dev/ixgbe/ixgbe_phy.c 331224 2018-03-19 20:55:05Z erj $*/
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ixgbe_phy.c,v 1.24 2021/04/30 06:55:32 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ixgbe_phy.c,v 1.25 2021/12/10 11:20:13 msaitoh Exp $");
 
 #include "ixgbe_api.h"
 #include "ixgbe_common.h"
@@ -46,10 +46,10 @@ __KERNEL_RCSID(0, "$NetBSD: ixgbe_phy.c,
 
 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);
@@ -84,11 +84,7 @@ static s32 ixgbe_out_i2c_byte_ack(struct
  */
 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);
 }
@@ -161,8 +157,7 @@ s32 ixgbe_read_i2c_combined_generic_int(
 		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;
@@ -2125,9 +2120,7 @@ static s32 ixgbe_read_i2c_byte_generic_i
 		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)
@@ -2373,7 +2366,7 @@ static void ixgbe_i2c_stop(struct ixgbe_
  *
  *  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;
@@ -2385,8 +2378,6 @@ static s32 ixgbe_clock_in_i2c_byte(struc
 		ixgbe_clock_in_i2c_bit(hw, &bit);
 		*data |= bit << i;
 	}
-
-	return IXGBE_SUCCESS;
 }
 
 /**
@@ -2482,7 +2473,7 @@ static s32 ixgbe_get_i2c_ack(struct ixgb
  *
  *  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);
@@ -2507,8 +2498,6 @@ static s32 ixgbe_clock_in_i2c_bit(struct
 
 	/* Minimum low period of clock is 4.7 us */
 	usec_delay(IXGBE_I2C_T_LOW);
-
-	return IXGBE_SUCCESS;
 }
 
 /**

Index: src/sys/dev/pci/ixgbe/ixgbe_common.c
diff -u src/sys/dev/pci/ixgbe/ixgbe_common.c:1.34 src/sys/dev/pci/ixgbe/ixgbe_common.c:1.35
--- src/sys/dev/pci/ixgbe/ixgbe_common.c:1.34	Fri Dec 10 11:16:54 2021
+++ src/sys/dev/pci/ixgbe/ixgbe_common.c	Fri Dec 10 11:20:13 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: ixgbe_common.c,v 1.34 2021/12/10 11:16:54 msaitoh Exp $ */
+/* $NetBSD: ixgbe_common.c,v 1.35 2021/12/10 11:20:13 msaitoh Exp $ */
 
 /******************************************************************************
   SPDX-License-Identifier: BSD-3-Clause
@@ -36,7 +36,7 @@
 /*$FreeBSD: head/sys/dev/ixgbe/ixgbe_common.c 331224 2018-03-19 20:55:05Z erj $*/
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ixgbe_common.c,v 1.34 2021/12/10 11:16:54 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ixgbe_common.c,v 1.35 2021/12/10 11:20:13 msaitoh Exp $");
 
 #include "ixgbe_common.h"
 #include "ixgbe_phy.h"
@@ -462,7 +462,7 @@ s32 ixgbe_start_hw_generic(struct ixgbe_
  *     82599
  *     X540
  **/
-s32 ixgbe_start_hw_gen2(struct ixgbe_hw *hw)
+void ixgbe_start_hw_gen2(struct ixgbe_hw *hw)
 {
 	u32 i;
 	u32 regval;
@@ -489,8 +489,6 @@ s32 ixgbe_start_hw_gen2(struct ixgbe_hw 
 			    IXGBE_DCA_RXCTRL_HEAD_WRO_EN);
 		IXGBE_WRITE_REG(hw, IXGBE_DCA_RXCTRL(i), regval);
 	}
-
-	return IXGBE_SUCCESS;
 }
 
 /**

Index: src/sys/dev/pci/ixgbe/ixgbe_common.h
diff -u src/sys/dev/pci/ixgbe/ixgbe_common.h:1.14 src/sys/dev/pci/ixgbe/ixgbe_common.h:1.15
--- src/sys/dev/pci/ixgbe/ixgbe_common.h:1.14	Thu Jun 27 05:55:40 2019
+++ src/sys/dev/pci/ixgbe/ixgbe_common.h	Fri Dec 10 11:20:13 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: ixgbe_common.h,v 1.14 2019/06/27 05:55:40 msaitoh Exp $ */
+/* $NetBSD: ixgbe_common.h,v 1.15 2021/12/10 11:20:13 msaitoh Exp $ */
 
 /******************************************************************************
   SPDX-License-Identifier: BSD-3-Clause
@@ -58,7 +58,7 @@ u16 ixgbe_get_pcie_msix_count_generic(st
 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,

Index: src/sys/dev/pci/ixgbe/ixgbe_x540.c
diff -u src/sys/dev/pci/ixgbe/ixgbe_x540.c:1.19 src/sys/dev/pci/ixgbe/ixgbe_x540.c:1.20
--- src/sys/dev/pci/ixgbe/ixgbe_x540.c:1.19	Wed May 19 08:19:20 2021
+++ src/sys/dev/pci/ixgbe/ixgbe_x540.c	Fri Dec 10 11:20:13 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: ixgbe_x540.c,v 1.19 2021/05/19 08:19:20 msaitoh Exp $ */
+/* $NetBSD: ixgbe_x540.c,v 1.20 2021/12/10 11:20:13 msaitoh Exp $ */
 
 /******************************************************************************
   SPDX-License-Identifier: BSD-3-Clause
@@ -36,7 +36,7 @@
 /*$FreeBSD: head/sys/dev/ixgbe/ixgbe_x540.c 331224 2018-03-19 20:55:05Z erj $*/
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ixgbe_x540.c,v 1.19 2021/05/19 08:19:20 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ixgbe_x540.c,v 1.20 2021/12/10 11:20:13 msaitoh Exp $");
 
 #include "ixgbe_x540.h"
 #include "ixgbe_type.h"
@@ -328,7 +328,7 @@ s32 ixgbe_start_hw_X540(struct ixgbe_hw 
 	if (ret_val != IXGBE_SUCCESS)
 		goto out;
 
-	ret_val = ixgbe_start_hw_gen2(hw);
+	ixgbe_start_hw_gen2(hw);
 
 out:
 	return ret_val;

Reply via email to