> -----Original Message-----
> From: Stephen Hemminger <[email protected]>
> Sent: Thursday, June 25, 2026 10:26 AM
> To: Jiawen Wu <[email protected]>; Jiawen Wu <[email protected]>
> Cc: 'Zaiyu Wang' <[email protected]>; [email protected]; [email protected];
> 'Zaiyu Wang'
> <[email protected]>; [email protected]; [email protected]
> Subject: Re: [PATCH v10 13/21] net/txgbe: fix link stability for 40G NIC
>
> On Thu, 25 Jun 2026 09:44:07 +0800
> Jiawen Wu <[email protected]> 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;
> > > +}
> >
> > Alternatively, it can be declared as a static function. It is only invoked
> > in this .c file.
> >
> >
>
> Checkpatch complains about the extra return (it is old BSD stylism).
> Like I said, not a big deal; just showing it.
>
Thanks.
Since this is not a critical issue and the current patch series has already
been applied,
I would prefer to leave these returns as-is for now. I will address them
together with
the upcoming PHY configuration updates in a future patch series.