netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Vladimir Oltean <olteanv@gmail.com>
To: "Russell King (Oracle)" <rmk+kernel@armlinux.org.uk>
Cc: Andrew Lunn <andrew@lunn.ch>,
	Heiner Kallweit <hkallweit1@gmail.com>,
	Florian Fainelli <f.fainelli@gmail.com>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	netdev@vger.kernel.org
Subject: Re: [PATCH net-next v2] net: dsa: remove obsolete phylink dsa_switch operations
Date: Thu, 3 Oct 2024 17:51:03 +0300	[thread overview]
Message-ID: <20241003145103.i23tx4mpjtg4e6df@skbuf> (raw)
In-Reply-To: <E1swKNV-0060oN-1b@rmk-PC.armlinux.org.uk> <E1swKNV-0060oN-1b@rmk-PC.armlinux.org.uk>

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@armlinux.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@nxp.com>
Tested-by: Vladimir Oltean <vladimir.oltean@nxp.com> # sja1105, felix, dsa_loop

  reply	other threads:[~2024-10-03 14:51 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-03 11:52 [PATCH net-next v2] net: dsa: remove obsolete phylink dsa_switch operations Russell King (Oracle)
2024-10-03 14:51 ` Vladimir Oltean [this message]
2024-10-03 15:28   ` Russell King (Oracle)
2024-10-03 22:28     ` Vladimir Oltean
2024-10-07 23:40 ` patchwork-bot+netdevbpf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20241003145103.i23tx4mpjtg4e6df@skbuf \
    --to=olteanv@gmail.com \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=f.fainelli@gmail.com \
    --cc=hkallweit1@gmail.com \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=rmk+kernel@armlinux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).