netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Simon Horman <horms@kernel.org>
To: Sean Anderson <sean.anderson@linux.dev>
Cc: Radhey Shyam Pandey <radhey.shyam.pandey@amd.com>,
	Andrew Lunn <andrew+netdev@lunn.ch>,
	"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, linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Michal Simek <michal.simek@amd.com>,
	Leon Romanovsky <leon@kernel.org>
Subject: Re: [PATCH net-next v4 4/7] net: axienet: Simplify axienet_mdio_setup
Date: Tue, 5 Aug 2025 21:35:12 +0100	[thread overview]
Message-ID: <20250805203512.GD61519@horms.kernel.org> (raw)
In-Reply-To: <20250805153456.1313661-5-sean.anderson@linux.dev>

On Tue, Aug 05, 2025 at 11:34:53AM -0400, Sean Anderson wrote:
> We always put the mdio_node and disable the bus after probing, so
> perform these steps unconditionally.
> 
> Signed-off-by: Sean Anderson <sean.anderson@linux.dev>
> ---
> 
> (no changes since v1)
> 
>  drivers/net/ethernet/xilinx/xilinx_axienet_mdio.c | 15 +++++----------
>  1 file changed, 5 insertions(+), 10 deletions(-)
> 
> diff --git a/drivers/net/ethernet/xilinx/xilinx_axienet_mdio.c b/drivers/net/ethernet/xilinx/xilinx_axienet_mdio.c
> index dd5f961801dc..1903a1d50b05 100644
> --- a/drivers/net/ethernet/xilinx/xilinx_axienet_mdio.c
> +++ b/drivers/net/ethernet/xilinx/xilinx_axienet_mdio.c
> @@ -302,19 +302,14 @@ int axienet_mdio_setup(struct axienet_local *lp)
>  	ret = axienet_mdio_enable(bus, mdio_node);
>  	if (ret < 0)
>  		goto unregister;
> +
>  	ret = of_mdiobus_register(bus, mdio_node);
> -	if (ret)
> -		goto unregister_mdio_enabled;
>  	of_node_put(mdio_node);
>  	axienet_mdio_mdc_disable(lp);
> -	return 0;
> -
> -unregister_mdio_enabled:
> -	axienet_mdio_mdc_disable(lp);
> -unregister:

Hi Sean,

This function still has code that jumps to unregister.
So this causes a compile error.

This does appear to be addressed in patch 6/7.
So I guess it is just an artefact of refactoring the patches
or something like that.

> -	of_node_put(mdio_node);
> -	mdiobus_free(bus);
> -	lp->mii_bus = NULL;
> +	if (ret) {
> +		mdiobus_free(bus);
> +		lp->mii_bus = NULL;
> +	}
>  	return ret;
>  }

## Form letter - net-next-closed

The merge window for v6.17 has begun and therefore net-next is closed
for new drivers, features, code refactoring and optimizations. We are
currently accepting bug fixes only.

Please repost when net-next reopens after 11th August.

RFC patches sent for review only are obviously welcome at any time.

See: https://www.kernel.org/doc/html/next/process/maintainer-netdev.html#development-cycle

-- 
pw-bot: defer

  reply	other threads:[~2025-08-05 20:35 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-05 15:34 [PATCH net-next v4 0/7] net: axienet: Fix deferred probe loop Sean Anderson
2025-08-05 15:34 ` [PATCH net-next v4 1/7] net: axienet: Fix resource release ordering Sean Anderson
2025-08-05 20:59   ` Andrew Lunn
2025-08-05 15:34 ` [PATCH net-next v4 2/7] net: axienet: Use ioread32/iowrite32 directly Sean Anderson
2025-08-05 21:04   ` Andrew Lunn
2025-08-05 15:34 ` [PATCH net-next v4 3/7] net: axienet: Use MDIO bus device in prints Sean Anderson
2025-08-05 21:07   ` Andrew Lunn
2025-08-05 21:15     ` Sean Anderson
2025-08-05 15:34 ` [PATCH net-next v4 4/7] net: axienet: Simplify axienet_mdio_setup Sean Anderson
2025-08-05 20:35   ` Simon Horman [this message]
2025-08-05 15:34 ` [PATCH net-next v4 5/7] net: axienet: Use device variable in probe Sean Anderson
2025-08-05 21:12   ` Andrew Lunn
2025-08-05 15:34 ` [PATCH net-next v4 6/7] net: axienet: Rearrange lifetime functions Sean Anderson
2025-08-05 20:39   ` Simon Horman
2025-08-05 21:32   ` Andrew Lunn
2025-08-05 21:52     ` Sean Anderson
2025-08-05 15:34 ` [PATCH net-next v4 7/7] net: axienet: Split into MAC and MDIO drivers Sean Anderson
2025-08-05 21:40   ` Andrew Lunn
2025-08-05 22:02     ` Sean Anderson

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=20250805203512.GD61519@horms.kernel.org \
    --to=horms@kernel.org \
    --cc=andrew+netdev@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=kuba@kernel.org \
    --cc=leon@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=michal.simek@amd.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=radhey.shyam.pandey@amd.com \
    --cc=sean.anderson@linux.dev \
    /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).