[PATCH v10 13/21] net/txgbe: fix link stability for 40G NIC

Stephen Hemminger stephen at networkplumber.org
Wed Jun 24 18:18:58 CEST 2026


On Wed, 24 Jun 2026 19:52:45 +0800
Zaiyu Wang <zaiyuwang at trustnetic.com> wrote:

> +
> +void txgbe_e56_rx_rd_second_code_40g(struct txgbe_hw *hw, int *SECOND_CODE, int lane)
> +{
> +	int i, median;
> +	unsigned int rdata;
> +	u32 addr;
> +	int RXS_BBCDR_SECOND_ORDER_ST[RXS_READ_COUNT];
> +
> +	/* Set ovrd_en=0 to read ASIC value */
> +	addr = E56G__RXS0_ANA_OVRDEN_1_ADDR + (lane *  E56PHY_RXS_OFFSET);
> +	rdata = rd32_ephy(hw, addr);
> +	EPHY_XFLD(E56G__RXS0_ANA_OVRDEN_1, ovrd_en_ana_bbcdr_int_cstm_i) = 0;
> +	wr32_ephy(hw, addr, rdata);
> +
> +	/*
> +	 * As status update from RXS hardware is asynchronous to read status of SECOND_ORDER,
> +	 * follow sequence mentioned below.
> +	 */
> +	for (i = 0; i < RXS_READ_COUNT; i = i + 1) {
> +		addr = E56G__RXS0_ANA_OVRDVAL_5_ADDR + (lane *  E56PHY_RXS_OFFSET);
> +		rdata = rd32_ephy(hw, addr);
> +		RXS_BBCDR_SECOND_ORDER_ST[i] = EPHY_XFLD(E56G__RXS0_ANA_OVRDVAL_5,
> +							 ana_bbcdr_int_cstm_i);
> +		usec_delay(100);
> +	}
> +
> +	/* sort array RXS_BBCDR_SECOND_ORDER_ST[i] */
> +	qsort(RXS_BBCDR_SECOND_ORDER_ST, RXS_READ_COUNT, sizeof(int), txgbe_e56_int_cmp);
> +
> +	median = ((RXS_READ_COUNT + 1) / 2) - 1;
> +	*SECOND_CODE = RXS_BBCDR_SECOND_ORDER_ST[median];
> +
> +	return;
> +}

These extra returns are causing extra checkpatch warnings.
I know this is base code but if possible could you remove them.


WARNING:RETURN_VOID: void function return statements are not generally useful
#707: FILE: drivers/net/txgbe/base/txgbe_e56.c:1806:
+	return;
+}

WARNING:RETURN_VOID: void function return statements are not generally useful
#736: FILE: drivers/net/txgbe/base/txgbe_e56.c:1835:
+	return;
+}


More information about the dev mailing list