Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/pci/ixgbe Remove unnecessary return value check.
details: https://anonhg.NetBSD.org/src/rev/0f2cc2a2b72c
branches: trunk
changeset: 1027196:0f2cc2a2b72c
user: msaitoh <msaitoh%NetBSD.org@localhost>
date: Fri Dec 10 11:20:13 2021 +0000
description:
Remove unnecessary return value check.
FreeBSD: 3a89005394bc5d82ce9b6baa9e7f8dee362354ae
DPDK: 4b0ee6529b7897c2a08dd56669f07ac1f46a8474
diffstat:
sys/dev/pci/ixgbe/ixgbe_82599.c | 8 +++-----
sys/dev/pci/ixgbe/ixgbe_common.c | 8 +++-----
sys/dev/pci/ixgbe/ixgbe_common.h | 4 ++--
sys/dev/pci/ixgbe/ixgbe_phy.c | 29 +++++++++--------------------
sys/dev/pci/ixgbe/ixgbe_x540.c | 6 +++---
5 files changed, 20 insertions(+), 35 deletions(-)
diffs (211 lines):
diff -r a55f8c211829 -r 0f2cc2a2b72c sys/dev/pci/ixgbe/ixgbe_82599.c
--- a/sys/dev/pci/ixgbe/ixgbe_82599.c Fri Dec 10 11:18:30 2021 +0000
+++ b/sys/dev/pci/ixgbe/ixgbe_82599.c Fri Dec 10 11:20:13 2021 +0000
@@ -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 @@
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 -r a55f8c211829 -r 0f2cc2a2b72c sys/dev/pci/ixgbe/ixgbe_common.c
--- a/sys/dev/pci/ixgbe/ixgbe_common.c Fri Dec 10 11:18:30 2021 +0000
+++ b/sys/dev/pci/ixgbe/ixgbe_common.c Fri Dec 10 11:20:13 2021 +0000
@@ -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 @@
* 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 @@
IXGBE_DCA_RXCTRL_HEAD_WRO_EN);
IXGBE_WRITE_REG(hw, IXGBE_DCA_RXCTRL(i), regval);
}
-
- return IXGBE_SUCCESS;
}
/**
diff -r a55f8c211829 -r 0f2cc2a2b72c sys/dev/pci/ixgbe/ixgbe_common.h
--- a/sys/dev/pci/ixgbe/ixgbe_common.h Fri Dec 10 11:18:30 2021 +0000
+++ b/sys/dev/pci/ixgbe/ixgbe_common.h Fri Dec 10 11:20:13 2021 +0000
@@ -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 @@
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 -r a55f8c211829 -r 0f2cc2a2b72c sys/dev/pci/ixgbe/ixgbe_phy.c
--- a/sys/dev/pci/ixgbe/ixgbe_phy.c Fri Dec 10 11:18:30 2021 +0000
+++ b/sys/dev/pci/ixgbe/ixgbe_phy.c Fri Dec 10 11:20:13 2021 +0000
@@ -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 @@
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_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 @@
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 @@
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 @@
*
* 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 @@
ixgbe_clock_in_i2c_bit(hw, &bit);
*data |= bit << i;
}
-
- return IXGBE_SUCCESS;
}
/**
@@ -2482,7 +2473,7 @@
*
* 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 @@
/* Minimum low period of clock is 4.7 us */
usec_delay(IXGBE_I2C_T_LOW);
-
- return IXGBE_SUCCESS;
}
/**
diff -r a55f8c211829 -r 0f2cc2a2b72c sys/dev/pci/ixgbe/ixgbe_x540.c
--- a/sys/dev/pci/ixgbe/ixgbe_x540.c Fri Dec 10 11:18:30 2021 +0000
+++ b/sys/dev/pci/ixgbe/ixgbe_x540.c Fri Dec 10 11:20:13 2021 +0000
@@ -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 @@
if (ret_val != IXGBE_SUCCESS)
goto out;
- ret_val = ixgbe_start_hw_gen2(hw);
+ ixgbe_start_hw_gen2(hw);
out:
return ret_val;
Home |
Main Index |
Thread Index |
Old Index