netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Simon Horman <horms@kernel.org>
To: Florian Fainelli <florian.fainelli@broadcom.com>
Cc: netdev@vger.kernel.org, Andrew Lunn <andrew@lunn.ch>,
	Florian Fainelli <f.fainelli@gmail.com>,
	Vladimir Oltean <olteanv@gmail.com>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Russell King <linux@armlinux.org.uk>,
	open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH net-next v2 2/2] net: dsa: Remove adjust_link paths
Date: Mon, 29 Apr 2024 21:00:39 +0100	[thread overview]
Message-ID: <20240429200039.GH516117@kernel.org> (raw)
In-Reply-To: <20240429165405.2298962-3-florian.fainelli@broadcom.com>

On Mon, Apr 29, 2024 at 09:54:05AM -0700, Florian Fainelli wrote:
> Now that we no longer any drivers using PHYLIB's adjust_link callback,
> remove all paths that made use of adjust_link as well as the associated
> functions.
> 
> Signed-off-by: Florian Fainelli <florian.fainelli@broadcom.com>

...

> @@ -1616,17 +1597,13 @@ static void dsa_port_phylink_mac_link_down(struct phylink_config *config,
>  					   phy_interface_t interface)
>  {
>  	struct dsa_port *dp = dsa_phylink_to_port(config);
> -	struct phy_device *phydev = NULL;

Hi Florian,

I'm wondering if some changes got lost somewhere.

phydev is removed here...

>  	struct dsa_switch *ds = dp->ds;
>  
>  	if (dsa_port_is_user(dp))
>  		phydev = dp->user->phydev;

... assigned here, but not used.

Perhaps the three lines above should be removed?

>  
> -	if (!ds->ops->phylink_mac_link_down) {
> -		if (ds->ops->adjust_link && phydev)
> -			ds->ops->adjust_link(ds, dp->index, phydev);
> +	if (!ds->ops->phylink_mac_link_down)
>  		return;
> -	}
>  
>  	ds->ops->phylink_mac_link_down(ds, dp->index, mode, interface);
>  }

...

-- 
pw-client: changes-requested

  reply	other threads:[~2024-04-29 20:02 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-29 16:54 [PATCH net-next v2 0/2] net: dsa: adjust_link removal Florian Fainelli
2024-04-29 16:54 ` [PATCH net-next v2 1/2] net: dsa: Remove fixed_link_update member Florian Fainelli
2024-04-29 16:54 ` [PATCH net-next v2 2/2] net: dsa: Remove adjust_link paths Florian Fainelli
2024-04-29 20:00   ` Simon Horman [this message]
2024-04-29 21:47     ` Florian Fainelli
2024-04-30  2:33   ` kernel test robot
2024-04-30  4:20   ` kernel test robot

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=20240429200039.GH516117@kernel.org \
    --to=horms@kernel.org \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=f.fainelli@gmail.com \
    --cc=florian.fainelli@broadcom.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=netdev@vger.kernel.org \
    --cc=olteanv@gmail.com \
    --cc=pabeni@redhat.com \
    /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).