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] [thread-next>] [day] [month] [year] [list]
Message-ID: <20241003145103.i23tx4mpjtg4e6df@skbuf>
Date: Thu, 3 Oct 2024 17:51:03 +0300
From: Vladimir Oltean <olteanv@...il.com>
To: "Russell King (Oracle)" <rmk+kernel@...linux.org.uk>
Cc: Andrew Lunn <andrew@...n.ch>, Heiner Kallweit <hkallweit1@...il.com>,
	Florian Fainelli <f.fainelli@...il.com>,
	"David S. Miller" <davem@...emloft.net>,
	Eric Dumazet <edumazet@...gle.com>,
	Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
	netdev@...r.kernel.org
Subject: Re: [PATCH net-next v2] net: dsa: remove obsolete phylink dsa_switch
 operations

On Thu, Oct 03, 2024 at 12:52:17PM +0100, Russell King (Oracle) wrote:
> No driver now uses the DSA switch phylink members, so we can now remove
> the method pointers, but we need to leave empty shim functions to allow
> those drivers that do not provide phylink MAC operations structure to
> continue functioning.
> 
> Signed-off-by: Russell King (oracle) <rmk+kernel@...linux.org.uk>
> ---
> diff --git a/net/dsa/dsa.c b/net/dsa/dsa.c
> index 668c729946ea..09d2f5d4b3dd 100644
> --- a/net/dsa/dsa.c
> +++ b/net/dsa/dsa.c
> diff --git a/net/dsa/port.c b/net/dsa/port.c
> index 25258b33e59e..f1e96706a701 100644
> --- a/net/dsa/port.c
> +++ b/net/dsa/port.c
> @@ -1579,40 +1579,19 @@ static struct phylink_pcs *
>  dsa_port_phylink_mac_select_pcs(struct phylink_config *config,
>  				phy_interface_t interface)
>  {
> -	struct dsa_port *dp = dsa_phylink_to_port(config);
> -	struct phylink_pcs *pcs = ERR_PTR(-EOPNOTSUPP);
> -	struct dsa_switch *ds = dp->ds;
> -
> -	if (ds->ops->phylink_mac_select_pcs)
> -		pcs = ds->ops->phylink_mac_select_pcs(ds, dp->index, interface);
> -
> -	return pcs;
> +	return ERR_PTR(-EOPNOTSUPP);
>  }

dsa_port_phylink_mac_select_pcs() didn't have to stay, as phylink_mac_select_pcs()
is entirely optional in phylink. Otherwise:

Reviewed-by: Vladimir Oltean <vladimir.oltean@....com>
Tested-by: Vladimir Oltean <vladimir.oltean@....com> # sja1105, felix, dsa_loop

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ