mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Simon Horman <horms@kernel.org>
To: Rosen Penev <rosenp@gmail.com>
Cc: netdev@vger.kernel.org, Sunil Goutham <sgoutham@marvell.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>,
	"moderated list:ARM/CAVIUM THUNDER NETWORK DRIVER"
	<linux-arm-kernel@lists.infradead.org>,
	open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] net: thunder_bgx: use OF loop instead of fwnode
Date: Mon, 1 Sep 2025 16:23:52 +0100	[thread overview]
Message-ID: <20250901152352.GG15473@horms.kernel.org> (raw)
In-Reply-To: <20250830214217.74801-1-rosenp@gmail.com>

On Sat, Aug 30, 2025 at 02:42:17PM -0700, Rosen Penev wrote:
> The loop ends up converting fwnode to device_node anyway.
> 
> While at it, handle return value of of_get_mac_address in case of NVMEM.

I think that this part should be a separate patch.
Possibly targeted at net with a Fixes tag.

> 
> Simplify while loop iteration.
> 
> Signed-off-by: Rosen Penev <rosenp@gmail.com>

...

> @@ -1514,14 +1510,13 @@ static int bgx_init_of_phy(struct bgx *bgx)
>  	/* We are bailing out, try not to leak device reference counts
>  	 * for phy devices we may have already found.
>  	 */
> -	while (lmac) {
> +	while (lmac--) {
>  		if (bgx->lmac[lmac].phydev) {
>  			put_device(&bgx->lmac[lmac].phydev->mdio.dev);
>  			bgx->lmac[lmac].phydev = NULL;
>  		}
> -		lmac--;
>  	}

The update to this look looks correct to me, even without the rest of
the patch separate. If so, I'm wondering if it should also be a separate
patch. Again, possibly for net with a Fixes tag.

> -	of_node_put(node);
> +	of_node_put(child);
>  	return -EPROBE_DEFER;
>  }

...

  reply	other threads:[~2025-09-01 15:23 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-30 21:42 Rosen Penev
2025-09-01 15:23 ` Simon Horman [this message]
2025-09-01 21:23   ` Rosen Penev

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=20250901152352.GG15473@horms.kernel.org \
    --to=horms@kernel.org \
    --cc=andrew+netdev@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=kuba@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=rosenp@gmail.com \
    --cc=sgoutham@marvell.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

all inboxes | Powered by JetHome®