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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Tue, 9 Apr 2024 18:33:46 +0300
From: Vladimir Oltean <olteanv@...il.com>
To: "Russell King (Oracle)" <rmk+kernel@...linux.org.uk>
Cc: Andrew Lunn <andrew@...n.ch>, "David S. Miller" <davem@...emloft.net>,
	Eric Dumazet <edumazet@...gle.com>,
	Florian Fainelli <f.fainelli@...il.com>,
	Jakub Kicinski <kuba@...nel.org>, netdev@...r.kernel.org,
	Paolo Abeni <pabeni@...hat.com>
Subject: Re: [PATCH net-next 2/3] net: dsa: allow DSA switch drivers to
 provide their own phylink mac ops

On Tue, Apr 09, 2024 at 03:37:31PM +0300, Vladimir Oltean wrote:
> On Mon, Apr 08, 2024 at 12:19:25PM +0100, Russell King (Oracle) wrote:
> > +static void dsa_shared_port_link_down(struct dsa_port *dp)
> > +{
> > +	struct dsa_switch *ds = dp->ds;
> > +
> > +	if (ds->phylink_mac_ops) {
> > +		if (ds->phylink_mac_ops->mac_link_down)
> > +			ds->phylink_mac_ops->mac_link_down(&dp->pl_config,
> > +							   MLO_AN_FIXED,
> > +							   PHY_INTERFACE_MODE_NA);
> > +	} else {
> > +		if (ds->ops->phylink_mac_link_down)
> > +			ds->ops->phylink_mac_link_down(ds, dp->index,
> > +				MLO_AN_FIXED, PHY_INTERFACE_MODE_NA);
> > +	}
> > +}
> 
> Please roll this other change into the patch when respinning:
> 
> else {
> 	if { }
> }
> 
> becomes
> 
> else if {}
> 
> Also please align the arguments of the phylink_mac_link_down() call with
> the open parenthesis.

Something like this:

static void dsa_shared_port_link_down(struct dsa_port *dp)
{
	struct dsa_switch *ds = dp->ds;

	if (ds->phylink_mac_ops && ds->phylink_mac_ops->mac_link_down) {
		ds->phylink_mac_ops->mac_link_down(&dp->pl_config, MLO_AN_FIXED,
						   PHY_INTERFACE_MODE_NA);
	} else if (ds->ops->phylink_mac_link_down) {
		ds->ops->phylink_mac_link_down(ds, dp->index, MLO_AN_FIXED,
					       PHY_INTERFACE_MODE_NA);
	}
}

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ