lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <pgr3jnzao7jeoz6sutt2nk6wrtzvjl42lxmorncyddzeouuzvu@jpznq4ycta6f>
Date:   Thu, 26 Oct 2023 17:48:04 +0300
From:   Serge Semin <fancer.lancer@...il.com>
To:     Raju Lakkaraju <Raju.Lakkaraju@...rochip.com>
Cc:     "Russell King (Oracle)" <linux@...linux.org.uk>,
        netdev@...r.kernel.org, davem@...emloft.net, kuba@...nel.org,
        linux-kernel@...r.kernel.org, andrew@...n.ch,
        Jose.Abreu@...opsys.com, UNGLinuxDriver@...rochip.com
Subject: Re: [PATCH net-next V2] net: pcs: xpcs: Add 2500BASE-X case in get
 state for XPCS drivers

On Thu, Oct 26, 2023 at 12:03:39PM +0100, Russell King (Oracle) wrote:
> On Thu, Oct 26, 2023 at 03:46:42PM +0530, Raju Lakkaraju wrote:
> > Add DW_2500BASEX case in xpcs_get_state( ) to update speed, duplex and pause
> > 
> > Signed-off-by: Raju Lakkaraju <Raju.Lakkaraju@...rochip.com>
> 
> Sorry for not doing a fuller review with the earlier iteration today.
> 
> Also, please note that on netdev, it's customary not to post more than
> one version of a patch per day. Please see the netdev FAQ for guidance.
> 
> > +static int xpcs_get_state_2500basex(struct dw_xpcs *xpcs,
> > +				    struct phylink_link_state *state)
> > +{

> > +	int sts;
> > +
> > +	sts = xpcs_read(xpcs, MDIO_MMD_VEND2, DW_VR_MII_MMD_STS);
> 
> 	if (sts < 0) {
> 		state->link = 0;
> 		return sts;

My 5cents to this note. Please use "ret" variable name as it's implied
by the local naming convention.

-Serge(y)

> 	}
> 
> especially as a negative errno value could result in state->link being
> true.
> 
> Thanks.
> 
> -- 
> RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
> FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ